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

Unified Diff: components/test_runner/test_runner_for_specific_view.cc

Issue 2122083002: Move CSS3 Paged Media interface into WebLocalFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More build fixes Created 4 years, 5 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: components/test_runner/test_runner_for_specific_view.cc
diff --git a/components/test_runner/test_runner_for_specific_view.cc b/components/test_runner/test_runner_for_specific_view.cc
index a314217d0d9962a4acb446e6c89096ffa769ad8d..3cc1fb7a9f1c331cbd0715647e6d908475a8ae47 100644
--- a/components/test_runner/test_runner_for_specific_view.cc
+++ b/components/test_runner/test_runner_for_specific_view.cc
@@ -454,10 +454,12 @@ bool TestRunnerForSpecificView::IsCommandEnabled(const std::string& command) {
}
bool TestRunnerForSpecificView::HasCustomPageSizeStyle(int page_index) {
+ // TODO(dcheng): This class has many implicit assumptions that the frames it
+ // operates on are always local.
WebFrame* frame = web_view()->mainFrame();
- if (!frame)
+ if (!frame || frame->isWebRemoteFrame())
return false;
- return frame->hasCustomPageSizeStyle(page_index);
+ return frame->toWebLocalFrame()->hasCustomPageSizeStyle(page_index);
}
void TestRunnerForSpecificView::ForceRedSelectionColors() {

Powered by Google App Engine
This is Rietveld 408576698