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

Unified Diff: components/test_runner/web_test_runner.h

Issue 1835673002: Moving pixel-capturing code from web_test_proxy_base.* into pixel_dump.* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replicating-accept-languages
Patch Set: Rebasing... Created 4 years, 9 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 | « components/test_runner/web_test_proxy.cc ('k') | content/shell/renderer/layout_test/blink_test_runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/web_test_runner.h
diff --git a/components/test_runner/web_test_runner.h b/components/test_runner/web_test_runner.h
index 9080c9d119c53976f98e559b0f2bcf4dd4218001..93148a0f5d7feafb2ead9898ffe602f391421e14 100644
--- a/components/test_runner/web_test_runner.h
+++ b/components/test_runner/web_test_runner.h
@@ -8,6 +8,10 @@
#include <string>
#include <vector>
+#include "base/callback_forward.h"
+
+class SkBitmap;
+
namespace base {
class DictionaryValue;
}
@@ -15,6 +19,7 @@ class DictionaryValue;
namespace blink {
class WebContentSettingsClient;
class WebLocalFrame;
+class WebView;
}
namespace test_runner {
@@ -42,6 +47,13 @@ class WebTestRunner {
// (i.e. text mode if testRunner.dumpAsText() was called from javascript).
virtual std::string DumpLayout(blink::WebLocalFrame* frame) = 0;
+ // Snapshots image of |web_view| using the mode requested by the current test
+ // and calls |callback| with the result. Caller needs to ensure that
+ // |web_view| stays alive until |callback| is called.
+ virtual void DumpPixelsAsync(
+ blink::WebView* web_view,
+ const base::Callback<void(const SkBitmap&)>& callback) = 0;
+
// Replicates changes to layout test runtime flags
// (i.e. changes that happened in another renderer).
// See also WebTestDelegate::OnLayoutTestRuntimeFlagsChanged.
« no previous file with comments | « components/test_runner/web_test_proxy.cc ('k') | content/shell/renderer/layout_test/blink_test_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698