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

Unified Diff: components/test_runner/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/pixel_dump.cc ('k') | components/test_runner/test_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/test_runner.h
diff --git a/components/test_runner/test_runner.h b/components/test_runner/test_runner.h
index 8494845533e9349b00e6ccf1ccb9db512c48ee7f..80fa35b53c1848504327028f3eb53fd4680752e7 100644
--- a/components/test_runner/test_runner.h
+++ b/components/test_runner/test_runner.h
@@ -19,6 +19,7 @@
#include "components/test_runner/test_runner_export.h"
#include "components/test_runner/web_task.h"
#include "components/test_runner/web_test_runner.h"
+#include "third_party/WebKit/public/platform/WebImage.h"
#include "v8/include/v8.h"
class GURL;
@@ -76,6 +77,9 @@ class TestRunner : public WebTestRunner,
void GetAudioData(std::vector<unsigned char>* buffer_view) const override;
bool IsRecursiveLayoutDumpRequested() override;
std::string DumpLayout(blink::WebLocalFrame* frame) override;
+ void DumpPixelsAsync(
+ blink::WebView* web_view,
+ const base::Callback<void(const SkBitmap&)>& callback) override;
void ReplicateLayoutTestRuntimeFlagsChanges(
const base::DictionaryValue& changed_values) override;
bool HasCustomTextDump(std::string* custom_text_dump) const override;
@@ -87,7 +91,6 @@ class TestRunner : public WebTestRunner,
bool shouldStayOnPageAfterHandlingBeforeUnload() const;
MockScreenOrientationClient* getMockScreenOrientationClient();
MockWebUserMediaClient* getMockWebUserMediaClient();
- bool shouldDumpSelectionRect() const;
bool isPrinting() const;
bool shouldDumpAsTextWithPixelResults();
bool shouldDumpAsCustomText() const;
@@ -129,7 +132,7 @@ class TestRunner : public WebTestRunner,
void RequestPointerUnlock();
bool isPointerLocked();
void setToolTipText(const blink::WebString&);
- bool shouldDumpDragImage();
+ void setDragImage(const blink::WebImage& drag_image);
bool shouldDumpNavigationPolicy() const;
bool midiAccessorResult();
@@ -478,10 +481,9 @@ class TestRunner : public WebTestRunner,
// WebFrameClient receives a loadURLExternally() call.
void WaitUntilExternalURLLoad();
- // This function sets a flag which tells the WebTestProxy to dump the drag
- // image when the next drag-and-drop is initiated. It is equivalent to
- // DumpAsTextWithPixelResults but the pixel results will be the drag image
- // instead of a snapshot of the page.
+ // This function sets a flag to dump the drag image when the next drag&drop is
+ // initiated. It is equivalent to DumpAsTextWithPixelResults but the pixel
+ // results will be the drag image instead of a snapshot of the page.
void DumpDragImage();
// Sets a flag that tells the WebTestProxy to dump the default navigation
@@ -755,13 +757,6 @@ class TestRunner : public WebTestRunner,
// well.
bool dump_back_forward_list_;
- // If true, the test_shell will draw the bounds of the current selection rect
- // taking possible transforms of the selection rect into account.
- bool dump_selection_rect_;
-
- // If true, the test_shell will dump the drag image as pixel results.
- bool dump_drag_image_;
-
// If true, content_shell will dump the default navigation policy passed to
// WebFrameClient::decidePolicyForNavigation.
bool dump_navigation_policy_;
@@ -817,6 +812,9 @@ class TestRunner : public WebTestRunner,
// Number of currently active color choosers.
int chooser_count_;
+ // Captured drag image.
+ blink::WebImage drag_image_;
+
base::WeakPtrFactory<TestRunner> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(TestRunner);
« no previous file with comments | « components/test_runner/pixel_dump.cc ('k') | components/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698