| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 WebTaskList* mutable_task_list() { return &task_list_; } | 58 WebTaskList* mutable_task_list() { return &task_list_; } |
| 59 | 59 |
| 60 void SetTestIsRunning(bool); | 60 void SetTestIsRunning(bool); |
| 61 bool TestIsRunning() const { return test_is_running_; } | 61 bool TestIsRunning() const { return test_is_running_; } |
| 62 | 62 |
| 63 bool UseMockTheme() const { return use_mock_theme_; } | 63 bool UseMockTheme() const { return use_mock_theme_; } |
| 64 | 64 |
| 65 void InvokeCallback(scoped_ptr<InvokeCallbackTask> callback); | 65 void InvokeCallback(scoped_ptr<InvokeCallbackTask> callback); |
| 66 | 66 |
| 67 // WebTestRunner implementation. | 67 // WebTestRunner implementation. |
| 68 virtual bool ShouldGeneratePixelResults() override; | 68 bool ShouldGeneratePixelResults() override; |
| 69 virtual bool ShouldDumpAsAudio() const override; | 69 bool ShouldDumpAsAudio() const override; |
| 70 virtual void GetAudioData( | 70 void GetAudioData(std::vector<unsigned char>* buffer_view) const override; |
| 71 std::vector<unsigned char>* buffer_view) const override; | 71 bool ShouldDumpBackForwardList() const override; |
| 72 virtual bool ShouldDumpBackForwardList() const override; | 72 blink::WebPermissionClient* GetWebPermissions() const override; |
| 73 virtual blink::WebPermissionClient* GetWebPermissions() const override; | |
| 74 | 73 |
| 75 // Methods used by WebTestProxyBase. | 74 // Methods used by WebTestProxyBase. |
| 76 bool shouldDumpSelectionRect() const; | 75 bool shouldDumpSelectionRect() const; |
| 77 bool isPrinting() const; | 76 bool isPrinting() const; |
| 78 bool shouldDumpAsText(); | 77 bool shouldDumpAsText(); |
| 79 bool shouldDumpAsTextWithPixelResults(); | 78 bool shouldDumpAsTextWithPixelResults(); |
| 80 bool shouldDumpAsCustomText() const; | 79 bool shouldDumpAsCustomText() const; |
| 81 std:: string customDumpText() const; | 80 std:: string customDumpText() const; |
| 82 bool shouldDumpAsMarkup(); | 81 bool shouldDumpAsMarkup(); |
| 83 bool shouldDumpChildFrameScrollPositions() const; | 82 bool shouldDumpChildFrameScrollPositions() const; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 bool is_empty() { return queue_.empty(); } | 156 bool is_empty() { return queue_.empty(); } |
| 158 WebTaskList* mutable_task_list() { return &task_list_; } | 157 WebTaskList* mutable_task_list() { return &task_list_; } |
| 159 | 158 |
| 160 private: | 159 private: |
| 161 void ProcessWork(); | 160 void ProcessWork(); |
| 162 | 161 |
| 163 class WorkQueueTask : public WebMethodTask<WorkQueue> { | 162 class WorkQueueTask : public WebMethodTask<WorkQueue> { |
| 164 public: | 163 public: |
| 165 WorkQueueTask(WorkQueue* object) : WebMethodTask<WorkQueue>(object) {} | 164 WorkQueueTask(WorkQueue* object) : WebMethodTask<WorkQueue>(object) {} |
| 166 | 165 |
| 167 virtual void RunIfValid() override; | 166 void RunIfValid() override; |
| 168 }; | 167 }; |
| 169 | 168 |
| 170 WebTaskList task_list_; | 169 WebTaskList task_list_; |
| 171 std::deque<WorkItem*> queue_; | 170 std::deque<WorkItem*> queue_; |
| 172 bool frozen_; | 171 bool frozen_; |
| 173 TestRunner* controller_; | 172 TestRunner* controller_; |
| 174 }; | 173 }; |
| 175 | 174 |
| 176 /////////////////////////////////////////////////////////////////////////// | 175 /////////////////////////////////////////////////////////////////////////// |
| 177 // Methods dealing with the test logic | 176 // Methods dealing with the test logic |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 bool use_mock_theme_; | 775 bool use_mock_theme_; |
| 777 | 776 |
| 778 base::WeakPtrFactory<TestRunner> weak_factory_; | 777 base::WeakPtrFactory<TestRunner> weak_factory_; |
| 779 | 778 |
| 780 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 779 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
| 781 }; | 780 }; |
| 782 | 781 |
| 783 } // namespace content | 782 } // namespace content |
| 784 | 783 |
| 785 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 784 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ |
| OLD | NEW |