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 COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 6 #define COMPONENTS_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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "components/test_runner/test_runner_export.h" |
15 #include "components/test_runner/web_task.h" | 16 #include "components/test_runner/web_task.h" |
16 #include "components/test_runner/web_test_runner.h" | 17 #include "components/test_runner/web_test_runner.h" |
17 #include "v8/include/v8.h" | 18 #include "v8/include/v8.h" |
18 | 19 |
19 class GURL; | 20 class GURL; |
20 class SkBitmap; | 21 class SkBitmap; |
21 | 22 |
22 namespace blink { | 23 namespace blink { |
23 class WebContentSettingsClient; | 24 class WebContentSettingsClient; |
24 class WebFrame; | 25 class WebFrame; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 59 |
59 void SetTestIsRunning(bool); | 60 void SetTestIsRunning(bool); |
60 bool TestIsRunning() const { return test_is_running_; } | 61 bool TestIsRunning() const { return test_is_running_; } |
61 | 62 |
62 bool UseMockTheme() const { return use_mock_theme_; } | 63 bool UseMockTheme() const { return use_mock_theme_; } |
63 | 64 |
64 void InvokeCallback(scoped_ptr<InvokeCallbackTask> callback); | 65 void InvokeCallback(scoped_ptr<InvokeCallbackTask> callback); |
65 | 66 |
66 // WebTestRunner implementation. | 67 // WebTestRunner implementation. |
67 bool ShouldGeneratePixelResults() override; | 68 bool ShouldGeneratePixelResults() override; |
| 69 bool ShouldStayOnPageAfterHandlingBeforeUnload() const override; |
68 bool ShouldDumpAsAudio() const override; | 70 bool ShouldDumpAsAudio() const override; |
69 void GetAudioData(std::vector<unsigned char>* buffer_view) const override; | 71 void GetAudioData(std::vector<unsigned char>* buffer_view) const override; |
70 bool ShouldDumpBackForwardList() const override; | 72 bool ShouldDumpBackForwardList() const override; |
71 blink::WebContentSettingsClient* GetWebContentSettings() const override; | 73 blink::WebContentSettingsClient* GetWebContentSettings() const override; |
72 | 74 |
73 // Methods used by WebTestProxyBase. | 75 // Methods used by WebTestProxyBase. |
74 bool shouldDumpSelectionRect() const; | 76 bool shouldDumpSelectionRect() const; |
75 bool isPrinting() const; | 77 bool isPrinting() const; |
76 bool shouldDumpAsText(); | 78 bool shouldDumpAsText(); |
77 bool shouldDumpAsTextWithPixelResults(); | 79 bool shouldDumpAsTextWithPixelResults(); |
(...skipping 20 matching lines...) Expand all Loading... |
98 bool shouldDumpTitleChanges() const; | 100 bool shouldDumpTitleChanges() const; |
99 bool shouldDumpIconChanges() const; | 101 bool shouldDumpIconChanges() const; |
100 bool shouldDumpCreateView() const; | 102 bool shouldDumpCreateView() const; |
101 bool canOpenWindows() const; | 103 bool canOpenWindows() const; |
102 bool shouldDumpResourceLoadCallbacks() const; | 104 bool shouldDumpResourceLoadCallbacks() const; |
103 bool shouldDumpResourceRequestCallbacks() const; | 105 bool shouldDumpResourceRequestCallbacks() const; |
104 bool shouldDumpResourceResponseMIMETypes() const; | 106 bool shouldDumpResourceResponseMIMETypes() const; |
105 bool shouldDumpStatusCallbacks() const; | 107 bool shouldDumpStatusCallbacks() const; |
106 bool shouldDumpProgressFinishedCallback() const; | 108 bool shouldDumpProgressFinishedCallback() const; |
107 bool shouldDumpSpellCheckCallbacks() const; | 109 bool shouldDumpSpellCheckCallbacks() const; |
108 bool shouldStayOnPageAfterHandlingBeforeUnload() const; | |
109 bool shouldWaitUntilExternalURLLoad() const; | 110 bool shouldWaitUntilExternalURLLoad() const; |
110 const std::set<std::string>* httpHeadersToClear() const; | 111 const std::set<std::string>* httpHeadersToClear() const; |
111 void setTopLoadingFrame(blink::WebFrame*, bool); | 112 void setTopLoadingFrame(blink::WebFrame*, bool); |
112 blink::WebFrame* topLoadingFrame() const; | 113 blink::WebFrame* topLoadingFrame() const; |
113 void policyDelegateDone(); | 114 void policyDelegateDone(); |
114 bool policyDelegateEnabled() const; | 115 bool policyDelegateEnabled() const; |
115 bool policyDelegateIsPermissive() const; | 116 bool policyDelegateIsPermissive() const; |
116 bool policyDelegateShouldNotifyDone() const; | 117 bool policyDelegateShouldNotifyDone() const; |
117 bool shouldInterceptPostMessage() const; | 118 bool shouldInterceptPostMessage() const; |
118 bool shouldDumpResourcePriorities() const; | 119 bool shouldDumpResourcePriorities() const; |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 bool use_mock_theme_; | 819 bool use_mock_theme_; |
819 | 820 |
820 base::WeakPtrFactory<TestRunner> weak_factory_; | 821 base::WeakPtrFactory<TestRunner> weak_factory_; |
821 | 822 |
822 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 823 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
823 }; | 824 }; |
824 | 825 |
825 } // namespace test_runner | 826 } // namespace test_runner |
826 | 827 |
827 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 828 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
OLD | NEW |