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

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: . 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
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..aaac02280c405d337c2663444f8a19b8f81c04a3 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,12 @@ std::string TestRunnerForSpecificView::SelectionAsMarkup() {
void TestRunnerForSpecificView::SetViewSourceForFrame(const std::string& name,
bool enabled) {
+ if (!web_view()->MainFrame()->IsWebLocalFrame())
dcheng 2017/05/26 18:28:05 Is this something we'll need to fix at some point?
Łukasz Anforowicz 2017/05/26 20:04:05 Possibly. For now, let me just do what other simi
+ return;
+
WebFrame* target_frame =
- web_view()->FindFrameByName(WebString::FromUTF8(name));
+ web_view()->MainFrame()->ToWebLocalFrame()->FindFrameByName(
+ WebString::FromUTF8(name));
if (target_frame)
target_frame->EnableViewSourceMode(enabled);
}

Powered by Google App Engine
This is Rietveld 408576698