| 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() {
|
|
|