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

Unified Diff: components/test_runner/mock_color_chooser.h

Issue 1847893002: Extract WebFrameClient implementation out of WebTestProxyBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert some changes to mock_color_chooser.cc + fix counting of TestRunner::chooser_count_. 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/BUILD.gn ('k') | components/test_runner/mock_color_chooser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/mock_color_chooser.h
diff --git a/components/test_runner/mock_color_chooser.h b/components/test_runner/mock_color_chooser.h
index 0948aae8515203c74f65843ef3ced123fbc53918..7ff492017bf94b09840b840fe9c72a8603c44bad 100644
--- a/components/test_runner/mock_color_chooser.h
+++ b/components/test_runner/mock_color_chooser.h
@@ -12,30 +12,34 @@
namespace test_runner {
+class TestRunner;
class WebTestDelegate;
-class WebTestProxyBase;
class MockColorChooser : public blink::WebColorChooser {
-public:
- MockColorChooser(blink::WebColorChooserClient* client,
- WebTestDelegate* delegate,
- WebTestProxyBase* proxy);
- ~MockColorChooser() override;
-
- // blink::WebColorChooser implementation.
- void setSelectedColor(const blink::WebColor color) override;
- void endChooser() override;
-
- void InvokeDidEndChooser();
- WebTaskList* mutable_task_list() { return &task_list_; }
-
-private:
- blink::WebColorChooserClient* client_;
- WebTestDelegate* delegate_;
- WebTestProxyBase* proxy_;
- WebTaskList task_list_;
-
- DISALLOW_COPY_AND_ASSIGN(MockColorChooser);
+ public:
+ // Caller has to guarantee that |client| and |delegate| are alive
+ // until |WebColorChooserClient::didEndChooser| is called.
+ // Caller has to guarantee that |test_runner| lives longer
+ // than MockColorChooser.
+ MockColorChooser(blink::WebColorChooserClient* client,
+ WebTestDelegate* delegate,
+ TestRunner* test_runner);
+ ~MockColorChooser() override;
+
+ // blink::WebColorChooser implementation.
+ void setSelectedColor(const blink::WebColor color) override;
+ void endChooser() override;
+
+ void InvokeDidEndChooser();
+ WebTaskList* mutable_task_list() { return &task_list_; }
+
+ private:
+ blink::WebColorChooserClient* client_;
+ WebTestDelegate* delegate_;
+ TestRunner* test_runner_;
+ WebTaskList task_list_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockColorChooser);
};
} // namespace test_runner
« no previous file with comments | « components/test_runner/BUILD.gn ('k') | components/test_runner/mock_color_chooser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698