Roll src/third_party/WebKit f298044:aa8346d (svn 202628:202629)
[chromium-blink-merge.git] / components / test_runner / mock_color_chooser.h
blob4656d9bbd14a1db6c2991a5976a3c0e5d16418d8
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_TEST_RUNNER_MOCK_COLOR_CHOOSER_H_
6 #define COMPONENTS_TEST_RUNNER_MOCK_COLOR_CHOOSER_H_
8 #include "base/basictypes.h"
9 #include "components/test_runner/web_task.h"
10 #include "third_party/WebKit/public/web/WebColorChooser.h"
11 #include "third_party/WebKit/public/web/WebColorChooserClient.h"
13 namespace test_runner {
15 class WebTestDelegate;
16 class WebTestProxyBase;
18 class MockColorChooser : public blink::WebColorChooser {
19 public:
20 MockColorChooser(blink::WebColorChooserClient* client,
21 WebTestDelegate* delegate,
22 WebTestProxyBase* proxy);
23 virtual ~MockColorChooser();
25 // blink::WebColorChooser implementation.
26 virtual void setSelectedColor(const blink::WebColor color) override;
27 virtual void endChooser() override;
29 void InvokeDidEndChooser();
30 WebTaskList* mutable_task_list() { return &task_list_; }
32 private:
33 blink::WebColorChooserClient* client_;
34 WebTestDelegate* delegate_;
35 WebTestProxyBase* proxy_;
36 WebTaskList task_list_;
38 DISALLOW_COPY_AND_ASSIGN(MockColorChooser);
41 } // namespace test_runner
43 #endif // COMPONENTS_TEST_RUNNER_MOCK_COLOR_CHOOSER_H_