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. |