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

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

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Split a DCHECK in two as suggested by boliu@. Created 3 years, 6 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/shell/test_runner/accessibility_controller.cc ('k') | content/shell/test_runner/test_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/test_runner/pixel_dump.cc
diff --git a/content/shell/test_runner/pixel_dump.cc b/content/shell/test_runner/pixel_dump.cc
index 7711760e3999172b3e475a6c500e010ca3ef6dc8..fe3459b63ea38e15b55f89d93f79d4c81f5ffb39 100644
--- a/content/shell/test_runner/pixel_dump.cc
+++ b/content/shell/test_runner/pixel_dump.cc
@@ -75,10 +75,13 @@ void DrawSelectionRect(const PixelsDumpRequest& dump_request,
// The rect should be drawn after everything is laid out and painted.
if (!dump_request.layout_test_runtime_flags.dump_selection_rect())
return;
- // If there is a selection rect - draw a red 1px border enclosing rect
+
+ // TODO(lukasza): https://crbug.com/667551: Support OOPIFs in pixel dumps.
CHECK(dump_request.web_view->MainFrame()->IsWebLocalFrame())
<< "This function cannot be called if the main frame is not a "
"local frame.";
+
+ // If there is a selection rect - draw a red 1px border enclosing rect
blink::WebRect wr = dump_request.web_view->MainFrame()
->ToWebLocalFrame()
->GetSelectionBoundsRectForTesting();
@@ -100,6 +103,7 @@ void CapturePixelsForPrinting(std::unique_ptr<PixelsDumpRequest> dump_request) {
blink::WebSize page_size_in_pixels = dump_request->web_view->Size();
+ // TODO(lukasza): https://crbug.com/667551: Support OOPIFs in pixel dumps.
CHECK(dump_request->web_view->MainFrame()->IsWebLocalFrame())
<< "This function cannot be called if the main frame is not a "
"local frame.";
« no previous file with comments | « content/shell/test_runner/accessibility_controller.cc ('k') | content/shell/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698