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

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

Issue 2963593002: Split DumpPixelsAsync in pixel_dump.h into more granular functions. (Closed)
Patch Set: Addressed CR feedback from alexmos@. Created 3 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
« no previous file with comments | « content/shell/test_runner/test_runner.cc ('k') | content/shell/test_runner/web_test_runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 71310091fbda39a284e90dca3f49eb8a2d1ca305..6253afff7be306ca6864ba734c7653a9690b0696 100644
--- a/content/shell/test_runner/test_runner_for_specific_view.cc
+++ b/content/shell/test_runner/test_runner_for_specific_view.cc
@@ -233,10 +233,14 @@ void TestRunnerForSpecificView::CapturePixelsAsyncThen(
v8::UniquePersistent<v8::Function> persistent_callback(
blink::MainThreadIsolate(), callback);
+ CHECK(web_view()->MainFrame()->IsWebLocalFrame())
+ << "Layout tests harness doesn't currently support running "
+ << "testRuner.capturePixelsAsyncThen from an OOPIF";
+
web_view_test_proxy_base_->test_interfaces()
->GetTestRunner()
->DumpPixelsAsync(
- web_view(),
+ web_view()->MainFrame()->ToWebLocalFrame(),
base::Bind(&TestRunnerForSpecificView::CapturePixelsCallback,
weak_factory_.GetWeakPtr(),
base::Passed(std::move(persistent_callback))));
@@ -289,8 +293,14 @@ void TestRunnerForSpecificView::CopyImageAtAndCapturePixelsAsyncThen(
v8::UniquePersistent<v8::Function> persistent_callback(
blink::MainThreadIsolate(), callback);
+ // TODO(lukasza): Support image capture in OOPIFs for
+ // https://crbug.com/477150.
+ CHECK(web_view()->MainFrame()->IsWebLocalFrame())
+ << "Layout tests harness doesn't support calling "
+ << "testRunner.copyImageAtAndCapturePixelsAsyncThen from an OOPIF.";
+
CopyImageAtAndCapturePixels(
- web_view(), x, y,
+ web_view()->MainFrame()->ToWebLocalFrame(), x, y,
base::Bind(&TestRunnerForSpecificView::CapturePixelsCallback,
weak_factory_.GetWeakPtr(),
base::Passed(std::move(persistent_callback))));
« no previous file with comments | « content/shell/test_runner/test_runner.cc ('k') | content/shell/test_runner/web_test_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698