| Index: content/shell/test_runner/test_runner_for_specific_view.cc
|
| diff --git a/content/shell/test_runner/test_runner_for_specific_view.cc b/content/shell/test_runner/test_runner_for_specific_view.cc
|
| index cbd139b1d53620b70e371556029b54040d073fac..e90cbab4422817f5332172d6064f4dab421229ec 100644
|
| --- a/content/shell/test_runner/test_runner_for_specific_view.cc
|
| +++ b/content/shell/test_runner/test_runner_for_specific_view.cc
|
| @@ -679,8 +679,14 @@ std::string TestRunnerForSpecificView::SelectionAsMarkup() {
|
|
|
| void TestRunnerForSpecificView::SetViewSourceForFrame(const std::string& name,
|
| bool enabled) {
|
| + if (!web_view()->MainFrame()->IsWebLocalFrame()) {
|
| + CHECK(false) << "This function cannot be called if the main frame is not a "
|
| + "local frame.";
|
| + }
|
| +
|
| WebFrame* target_frame =
|
| - web_view()->FindFrameByName(WebString::FromUTF8(name));
|
| + web_view()->MainFrame()->ToWebLocalFrame()->FindFrameByName(
|
| + WebString::FromUTF8(name));
|
| if (target_frame)
|
| target_frame->EnableViewSourceMode(enabled);
|
| }
|
|
|