Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: content/shell/test_runner/test_runner_for_specific_view.cc

Issue 2907663004: FrameTree::Find only searches relative to local frames. (Closed)
Patch Set: Rebasing... Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | third_party/WebKit/Source/core/frame/Frame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | third_party/WebKit/Source/core/frame/Frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698