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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/test_runner/test_runner_for_specific_view.h" 5 #include "components/test_runner/test_runner_for_specific_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 web_view()->focusedFrame()->executeCommand(WebString::fromUTF8(command), 447 web_view()->focusedFrame()->executeCommand(WebString::fromUTF8(command),
448 WebString::fromUTF8(value)); 448 WebString::fromUTF8(value));
449 } 449 }
450 450
451 bool TestRunnerForSpecificView::IsCommandEnabled(const std::string& command) { 451 bool TestRunnerForSpecificView::IsCommandEnabled(const std::string& command) {
452 return web_view()->focusedFrame()->isCommandEnabled( 452 return web_view()->focusedFrame()->isCommandEnabled(
453 WebString::fromUTF8(command)); 453 WebString::fromUTF8(command));
454 } 454 }
455 455
456 bool TestRunnerForSpecificView::HasCustomPageSizeStyle(int page_index) { 456 bool TestRunnerForSpecificView::HasCustomPageSizeStyle(int page_index) {
457 // TODO(dcheng): This class has many implicit assumptions that the frames it
458 // operates on are always local.
457 WebFrame* frame = web_view()->mainFrame(); 459 WebFrame* frame = web_view()->mainFrame();
458 if (!frame) 460 if (!frame || frame->isWebRemoteFrame())
459 return false; 461 return false;
460 return frame->hasCustomPageSizeStyle(page_index); 462 return frame->toWebLocalFrame()->hasCustomPageSizeStyle(page_index);
461 } 463 }
462 464
463 void TestRunnerForSpecificView::ForceRedSelectionColors() { 465 void TestRunnerForSpecificView::ForceRedSelectionColors() {
464 web_view()->setSelectionColors( 466 web_view()->setSelectionColors(
465 0xffee0000, 0xff00ee00, 0xff000000, 0xffc0c0c0); 467 0xffee0000, 0xff00ee00, 0xff000000, 0xffc0c0c0);
466 } 468 }
467 469
468 void TestRunnerForSpecificView::SetPageVisibility( 470 void TestRunnerForSpecificView::SetPageVisibility(
469 const std::string& new_visibility) { 471 const std::string& new_visibility) {
470 if (new_visibility == "visible") 472 if (new_visibility == "visible")
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 686
685 blink::WebView* TestRunnerForSpecificView::web_view() { 687 blink::WebView* TestRunnerForSpecificView::web_view() {
686 return web_test_proxy_base_->web_view(); 688 return web_test_proxy_base_->web_view();
687 } 689 }
688 690
689 WebTestDelegate* TestRunnerForSpecificView::delegate() { 691 WebTestDelegate* TestRunnerForSpecificView::delegate() {
690 return web_test_proxy_base_->delegate(); 692 return web_test_proxy_base_->delegate();
691 } 693 }
692 694
693 } // namespace test_runner 695 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698