OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ |
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 explicit TestRunner(TestInterfaces*); | 44 explicit TestRunner(TestInterfaces*); |
45 virtual ~TestRunner(); | 45 virtual ~TestRunner(); |
46 | 46 |
47 void Install(blink::WebFrame* frame); | 47 void Install(blink::WebFrame* frame); |
48 | 48 |
49 void SetDelegate(WebTestDelegate*); | 49 void SetDelegate(WebTestDelegate*); |
50 void SetWebView(blink::WebView*, WebTestProxyBase*); | 50 void SetWebView(blink::WebView*, WebTestProxyBase*); |
51 | 51 |
52 void Reset(); | 52 void Reset(); |
53 | 53 |
54 WebTaskList* taskList() { return &task_list_; } | 54 WebTaskList* mutable_task_list() { return &task_list_; } |
55 | 55 |
56 void SetTestIsRunning(bool); | 56 void SetTestIsRunning(bool); |
57 bool TestIsRunning() const { return test_is_running_; } | 57 bool TestIsRunning() const { return test_is_running_; } |
58 | 58 |
59 bool UseMockTheme() const { return use_mock_theme_; } | 59 bool UseMockTheme() const { return use_mock_theme_; } |
60 | 60 |
61 void InvokeCallback(scoped_ptr<InvokeCallbackTask> callback); | 61 void InvokeCallback(scoped_ptr<InvokeCallbackTask> callback); |
62 | 62 |
63 // WebTestRunner implementation. | 63 // WebTestRunner implementation. |
64 virtual bool shouldGeneratePixelResults() OVERRIDE; | 64 virtual bool shouldGeneratePixelResults() OVERRIDE; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 virtual ~WorkQueue(); | 143 virtual ~WorkQueue(); |
144 void ProcessWorkSoon(); | 144 void ProcessWorkSoon(); |
145 | 145 |
146 // Reset the state of the class between tests. | 146 // Reset the state of the class between tests. |
147 void Reset(); | 147 void Reset(); |
148 | 148 |
149 void AddWork(WorkItem*); | 149 void AddWork(WorkItem*); |
150 | 150 |
151 void set_frozen(bool frozen) { frozen_ = frozen; } | 151 void set_frozen(bool frozen) { frozen_ = frozen; } |
152 bool is_empty() { return queue_.empty(); } | 152 bool is_empty() { return queue_.empty(); } |
153 WebTaskList* taskList() { return &task_list_; } | 153 WebTaskList* mutable_task_list() { return &task_list_; } |
154 | 154 |
155 private: | 155 private: |
156 void ProcessWork(); | 156 void ProcessWork(); |
157 | 157 |
158 class WorkQueueTask : public WebMethodTask<WorkQueue> { | 158 class WorkQueueTask : public WebMethodTask<WorkQueue> { |
159 public: | 159 public: |
160 WorkQueueTask(WorkQueue* object) : WebMethodTask<WorkQueue>(object) {} | 160 WorkQueueTask(WorkQueue* object) : WebMethodTask<WorkQueue>(object) {} |
161 | 161 |
162 virtual void runIfValid() OVERRIDE; | 162 virtual void runIfValid() OVERRIDE; |
163 }; | 163 }; |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 bool use_mock_theme_; | 709 bool use_mock_theme_; |
710 | 710 |
711 base::WeakPtrFactory<TestRunner> weak_factory_; | 711 base::WeakPtrFactory<TestRunner> weak_factory_; |
712 | 712 |
713 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 713 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
714 }; | 714 }; |
715 | 715 |
716 } // namespace content | 716 } // namespace content |
717 | 717 |
718 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 718 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ |
OLD | NEW |