OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEBKIT_TEST_RUNNER_H_ | 5 #ifndef CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ |
6 #define CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ | 6 #define CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 // This is the renderer side of the webkit test runner. | 37 // This is the renderer side of the webkit test runner. |
38 class WebKitTestRunner : public RenderViewObserver, | 38 class WebKitTestRunner : public RenderViewObserver, |
39 public RenderViewObserverTracker<WebKitTestRunner>, | 39 public RenderViewObserverTracker<WebKitTestRunner>, |
40 public WebTestDelegate { | 40 public WebTestDelegate { |
41 public: | 41 public: |
42 explicit WebKitTestRunner(RenderView* render_view); | 42 explicit WebKitTestRunner(RenderView* render_view); |
43 virtual ~WebKitTestRunner(); | 43 virtual ~WebKitTestRunner(); |
44 | 44 |
45 // RenderViewObserver implementation. | 45 // RenderViewObserver implementation. |
46 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 46 virtual bool OnMessageReceived(const IPC::Message& message) override; |
47 virtual void DidClearWindowObject(blink::WebLocalFrame* frame) OVERRIDE; | 47 virtual void DidClearWindowObject(blink::WebLocalFrame* frame) override; |
48 virtual void Navigate(const GURL& url) OVERRIDE; | 48 virtual void Navigate(const GURL& url) override; |
49 virtual void DidCommitProvisionalLoad(blink::WebLocalFrame* frame, | 49 virtual void DidCommitProvisionalLoad(blink::WebLocalFrame* frame, |
50 bool is_new_navigation) OVERRIDE; | 50 bool is_new_navigation) override; |
51 virtual void DidFailProvisionalLoad(blink::WebLocalFrame* frame, | 51 virtual void DidFailProvisionalLoad(blink::WebLocalFrame* frame, |
52 const blink::WebURLError& error) OVERRIDE; | 52 const blink::WebURLError& error) override; |
53 | 53 |
54 // WebTestDelegate implementation. | 54 // WebTestDelegate implementation. |
55 virtual void ClearEditCommand() OVERRIDE; | 55 virtual void ClearEditCommand() override; |
56 virtual void SetEditCommand(const std::string& name, | 56 virtual void SetEditCommand(const std::string& name, |
57 const std::string& value) OVERRIDE; | 57 const std::string& value) override; |
58 virtual void SetGamepadProvider(scoped_ptr<RendererGamepadProvider>) OVERRIDE; | 58 virtual void SetGamepadProvider(scoped_ptr<RendererGamepadProvider>) override; |
59 virtual void SetDeviceLightData(const double data) OVERRIDE; | 59 virtual void SetDeviceLightData(const double data) override; |
60 virtual void SetDeviceMotionData( | 60 virtual void SetDeviceMotionData( |
61 const blink::WebDeviceMotionData& data) OVERRIDE; | 61 const blink::WebDeviceMotionData& data) override; |
62 virtual void SetDeviceOrientationData( | 62 virtual void SetDeviceOrientationData( |
63 const blink::WebDeviceOrientationData& data) OVERRIDE; | 63 const blink::WebDeviceOrientationData& data) override; |
64 virtual void SetScreenOrientation( | 64 virtual void SetScreenOrientation( |
65 const blink::WebScreenOrientationType& orientation) OVERRIDE; | 65 const blink::WebScreenOrientationType& orientation) override; |
66 virtual void ResetScreenOrientation() OVERRIDE; | 66 virtual void ResetScreenOrientation() override; |
67 virtual void DidChangeBatteryStatus( | 67 virtual void DidChangeBatteryStatus( |
68 const blink::WebBatteryStatus& status) OVERRIDE; | 68 const blink::WebBatteryStatus& status) override; |
69 virtual void PrintMessage(const std::string& message) OVERRIDE; | 69 virtual void PrintMessage(const std::string& message) override; |
70 virtual void PostTask(WebTask* task) OVERRIDE; | 70 virtual void PostTask(WebTask* task) override; |
71 virtual void PostDelayedTask(WebTask* task, long long ms) OVERRIDE; | 71 virtual void PostDelayedTask(WebTask* task, long long ms) override; |
72 virtual blink::WebString RegisterIsolatedFileSystem( | 72 virtual blink::WebString RegisterIsolatedFileSystem( |
73 const blink::WebVector<blink::WebString>& absolute_filenames) OVERRIDE; | 73 const blink::WebVector<blink::WebString>& absolute_filenames) override; |
74 virtual long long GetCurrentTimeInMillisecond() OVERRIDE; | 74 virtual long long GetCurrentTimeInMillisecond() override; |
75 virtual blink::WebString GetAbsoluteWebStringFromUTF8Path( | 75 virtual blink::WebString GetAbsoluteWebStringFromUTF8Path( |
76 const std::string& utf8_path) OVERRIDE; | 76 const std::string& utf8_path) override; |
77 virtual blink::WebURL LocalFileToDataURL( | 77 virtual blink::WebURL LocalFileToDataURL( |
78 const blink::WebURL& file_url) OVERRIDE; | 78 const blink::WebURL& file_url) override; |
79 virtual blink::WebURL RewriteLayoutTestsURL( | 79 virtual blink::WebURL RewriteLayoutTestsURL( |
80 const std::string& utf8_url) OVERRIDE; | 80 const std::string& utf8_url) override; |
81 virtual TestPreferences* Preferences() OVERRIDE; | 81 virtual TestPreferences* Preferences() override; |
82 virtual void ApplyPreferences() OVERRIDE; | 82 virtual void ApplyPreferences() override; |
83 virtual std::string makeURLErrorDescription(const blink::WebURLError& error); | 83 virtual std::string makeURLErrorDescription(const blink::WebURLError& error); |
84 virtual void UseUnfortunateSynchronousResizeMode(bool enable) OVERRIDE; | 84 virtual void UseUnfortunateSynchronousResizeMode(bool enable) override; |
85 virtual void EnableAutoResizeMode(const blink::WebSize& min_size, | 85 virtual void EnableAutoResizeMode(const blink::WebSize& min_size, |
86 const blink::WebSize& max_size) OVERRIDE; | 86 const blink::WebSize& max_size) override; |
87 virtual void DisableAutoResizeMode(const blink::WebSize& new_size) OVERRIDE; | 87 virtual void DisableAutoResizeMode(const blink::WebSize& new_size) override; |
88 virtual void ClearDevToolsLocalStorage() OVERRIDE; | 88 virtual void ClearDevToolsLocalStorage() override; |
89 virtual void ShowDevTools(const std::string& settings, | 89 virtual void ShowDevTools(const std::string& settings, |
90 const std::string& frontend_url) OVERRIDE; | 90 const std::string& frontend_url) override; |
91 virtual void CloseDevTools() OVERRIDE; | 91 virtual void CloseDevTools() override; |
92 virtual void EvaluateInWebInspector(long call_id, | 92 virtual void EvaluateInWebInspector(long call_id, |
93 const std::string& script) OVERRIDE; | 93 const std::string& script) override; |
94 virtual void ClearAllDatabases() OVERRIDE; | 94 virtual void ClearAllDatabases() override; |
95 virtual void SetDatabaseQuota(int quota) OVERRIDE; | 95 virtual void SetDatabaseQuota(int quota) override; |
96 virtual blink::WebNotificationPresenter::Permission | 96 virtual blink::WebNotificationPresenter::Permission |
97 CheckWebNotificationPermission(const GURL& origin) OVERRIDE; | 97 CheckWebNotificationPermission(const GURL& origin) override; |
98 virtual void GrantWebNotificationPermission(const GURL& origin, | 98 virtual void GrantWebNotificationPermission(const GURL& origin, |
99 bool permission_granted) OVERRIDE; | 99 bool permission_granted) override; |
100 virtual void ClearWebNotificationPermissions() OVERRIDE; | 100 virtual void ClearWebNotificationPermissions() override; |
101 virtual void SetDeviceScaleFactor(float factor) OVERRIDE; | 101 virtual void SetDeviceScaleFactor(float factor) override; |
102 virtual void SetDeviceColorProfile(const std::string& name) OVERRIDE; | 102 virtual void SetDeviceColorProfile(const std::string& name) override; |
103 virtual void SetFocus(WebTestProxyBase* proxy, bool focus) OVERRIDE; | 103 virtual void SetFocus(WebTestProxyBase* proxy, bool focus) override; |
104 virtual void SetAcceptAllCookies(bool accept) OVERRIDE; | 104 virtual void SetAcceptAllCookies(bool accept) override; |
105 virtual std::string PathToLocalResource(const std::string& resource) OVERRIDE; | 105 virtual std::string PathToLocalResource(const std::string& resource) override; |
106 virtual void SetLocale(const std::string& locale) OVERRIDE; | 106 virtual void SetLocale(const std::string& locale) override; |
107 virtual void TestFinished() OVERRIDE; | 107 virtual void TestFinished() override; |
108 virtual void CloseRemainingWindows() OVERRIDE; | 108 virtual void CloseRemainingWindows() override; |
109 virtual void DeleteAllCookies() OVERRIDE; | 109 virtual void DeleteAllCookies() override; |
110 virtual int NavigationEntryCount() OVERRIDE; | 110 virtual int NavigationEntryCount() override; |
111 virtual void GoToOffset(int offset) OVERRIDE; | 111 virtual void GoToOffset(int offset) override; |
112 virtual void Reload() OVERRIDE; | 112 virtual void Reload() override; |
113 virtual void LoadURLForFrame(const blink::WebURL& url, | 113 virtual void LoadURLForFrame(const blink::WebURL& url, |
114 const std::string& frame_name) OVERRIDE; | 114 const std::string& frame_name) override; |
115 virtual bool AllowExternalPages() OVERRIDE; | 115 virtual bool AllowExternalPages() override; |
116 virtual std::string DumpHistoryForWindow(WebTestProxyBase* proxy) OVERRIDE; | 116 virtual std::string DumpHistoryForWindow(WebTestProxyBase* proxy) override; |
117 | 117 |
118 void Reset(); | 118 void Reset(); |
119 | 119 |
120 void set_proxy(WebTestProxyBase* proxy) { proxy_ = proxy; } | 120 void set_proxy(WebTestProxyBase* proxy) { proxy_ = proxy; } |
121 WebTestProxyBase* proxy() const { return proxy_; } | 121 WebTestProxyBase* proxy() const { return proxy_; } |
122 | 122 |
123 void ReportLeakDetectionResult(const LeakDetectionResult& result); | 123 void ReportLeakDetectionResult(const LeakDetectionResult& result); |
124 | 124 |
125 private: | 125 private: |
126 // Message handlers. | 126 // Message handlers. |
(...skipping 30 matching lines...) Expand all Loading... |
157 | 157 |
158 scoped_ptr<LeakDetector> leak_detector_; | 158 scoped_ptr<LeakDetector> leak_detector_; |
159 bool needs_leak_detector_; | 159 bool needs_leak_detector_; |
160 | 160 |
161 DISALLOW_COPY_AND_ASSIGN(WebKitTestRunner); | 161 DISALLOW_COPY_AND_ASSIGN(WebKitTestRunner); |
162 }; | 162 }; |
163 | 163 |
164 } // namespace content | 164 } // namespace content |
165 | 165 |
166 #endif // CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ | 166 #endif // CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ |
OLD | NEW |