1 // Copyright 2013 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 CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKCOLORCHOOSER_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKCOLORCHOOSER_H_
8 #include "base/basictypes.h"
9 #include "content/shell/renderer/test_runner/TestCommon.h"
10 #include "content/shell/renderer/test_runner/WebTask.h"
11 #include "third_party/WebKit/public/web/WebColorChooser.h"
12 #include "third_party/WebKit/public/web/WebColorChooserClient.h"
16 class WebTestDelegate;
17 class WebTestProxyBase;
19 class MockColorChooser : public blink::WebColorChooser {
21 MockColorChooser(blink::WebColorChooserClient*, WebTestDelegate*, WebTestProxyBase*);
22 virtual ~MockColorChooser();
24 // blink::WebColorChooser implementation.
25 virtual void setSelectedColor(const blink::WebColor) OVERRIDE;
26 virtual void endChooser() OVERRIDE;
28 void invokeDidEndChooser();
29 WebTaskList* taskList() { return &m_taskList; }
32 blink::WebColorChooserClient* m_client;
33 WebTestDelegate* m_delegate;
34 WebTestProxyBase* m_proxy;
35 WebTaskList m_taskList;
37 DISALLOW_COPY_AND_ASSIGN(MockColorChooser);
40 } // namespace content
42 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKCOLORCHOOSER_H_