Chromium Code Reviews| 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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "content/public/renderer/render_view_observer.h" | 12 #include "content/public/renderer/render_view_observer.h" |
| 13 #include "content/public/renderer/render_view_observer_tracker.h" | 13 #include "content/public/renderer/render_view_observer_tracker.h" |
| 14 #include "content/shell/shell_test_configuration.h" | 14 #include "content/shell/shell_test_configuration.h" |
| 15 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web Preferences.h" | 15 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web Preferences.h" |
| 16 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web TestDelegate.h" | 16 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web TestDelegate.h" |
| 17 #include "v8/include/v8.h" | 17 #include "v8/include/v8.h" |
| 18 | 18 |
| 19 class SkCanvas; | 19 class SkCanvas; |
| 20 | 20 |
| 21 namespace WebKit { | 21 namespace WebKit { |
| 22 class WebMediaPlayer; | |
| 23 class WebMediaPlayerClient; | |
| 22 struct WebRect; | 24 struct WebRect; |
| 23 } | 25 } |
| 24 | 26 |
| 25 namespace WebTestRunner { | 27 namespace WebTestRunner { |
| 26 class WebTestProxyBase; | 28 class WebTestProxyBase; |
| 27 } | 29 } |
| 28 | 30 |
| 31 namespace webkit_support { | |
| 32 class TestMediaStreamClient; | |
| 33 } | |
| 34 | |
| 29 namespace content { | 35 namespace content { |
| 30 | 36 |
| 31 // This is the renderer side of the webkit test runner. | 37 // This is the renderer side of the webkit test runner. |
| 32 class WebKitTestRunner : public RenderViewObserver, | 38 class WebKitTestRunner : public RenderViewObserver, |
| 33 public RenderViewObserverTracker<WebKitTestRunner>, | 39 public RenderViewObserverTracker<WebKitTestRunner>, |
| 34 public WebTestRunner::WebTestDelegate { | 40 public WebTestRunner::WebTestDelegate { |
| 35 public: | 41 public: |
| 36 explicit WebKitTestRunner(RenderView* render_view); | 42 explicit WebKitTestRunner(RenderView* render_view); |
| 37 virtual ~WebKitTestRunner(); | 43 virtual ~WebKitTestRunner(); |
| 38 | 44 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 virtual int navigationEntryCount(); | 89 virtual int navigationEntryCount(); |
| 84 virtual void goToOffset(int offset); | 90 virtual void goToOffset(int offset); |
| 85 virtual void reload(); | 91 virtual void reload(); |
| 86 virtual void loadURLForFrame(const WebKit::WebURL& url, | 92 virtual void loadURLForFrame(const WebKit::WebURL& url, |
| 87 const std::string& frame_name); | 93 const std::string& frame_name); |
| 88 virtual bool allowExternalPages(); | 94 virtual bool allowExternalPages(); |
| 89 virtual void captureHistoryForWindow( | 95 virtual void captureHistoryForWindow( |
| 90 WebTestRunner::WebTestProxyBase* proxy, | 96 WebTestRunner::WebTestProxyBase* proxy, |
| 91 WebKit::WebVector<WebKit::WebHistoryItem>* history, | 97 WebKit::WebVector<WebKit::WebHistoryItem>* history, |
| 92 size_t* currentEntryIndex); | 98 size_t* currentEntryIndex); |
| 99 virtual WebKit::WebMediaPlayer* createWebMediaPlayer( | |
| 100 WebKit::WebFrame*, | |
|
jochen (gone - plz use gerrit)
2013/04/02 07:02:21
the chromium coding style requires to list argumen
wjia(left Chromium)
2013/04/03 00:44:04
Done.
| |
| 101 const WebKit::WebURL&, | |
| 102 WebKit::WebMediaPlayerClient*); | |
| 103 | |
| 93 | 104 |
| 94 void Reset(); | 105 void Reset(); |
| 95 | 106 |
| 96 void set_proxy(::WebTestRunner::WebTestProxyBase* proxy) { proxy_ = proxy; } | 107 void set_proxy(::WebTestRunner::WebTestProxyBase* proxy) { proxy_ = proxy; } |
| 97 ::WebTestRunner::WebTestProxyBase* proxy() const { return proxy_; } | 108 ::WebTestRunner::WebTestProxyBase* proxy() const { return proxy_; } |
| 98 | 109 |
| 99 private: | 110 private: |
| 100 // Message handlers. | 111 // Message handlers. |
| 101 void OnSetTestConfiguration(const ShellTestConfiguration& params); | 112 void OnSetTestConfiguration(const ShellTestConfiguration& params); |
| 102 void OnSessionHistory( | 113 void OnSessionHistory( |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 118 ShellTestConfiguration test_config_; | 129 ShellTestConfiguration test_config_; |
| 119 | 130 |
| 120 std::vector<int> routing_ids_; | 131 std::vector<int> routing_ids_; |
| 121 std::vector<std::vector<std::string> > session_histories_; | 132 std::vector<std::vector<std::string> > session_histories_; |
| 122 std::vector<unsigned> current_entry_indexes_; | 133 std::vector<unsigned> current_entry_indexes_; |
| 123 | 134 |
| 124 bool is_main_window_; | 135 bool is_main_window_; |
| 125 | 136 |
| 126 bool focus_on_next_commit_; | 137 bool focus_on_next_commit_; |
| 127 | 138 |
| 139 scoped_ptr<webkit_support::TestMediaStreamClient> test_media_stream_client_; | |
| 140 | |
| 128 DISALLOW_COPY_AND_ASSIGN(WebKitTestRunner); | 141 DISALLOW_COPY_AND_ASSIGN(WebKitTestRunner); |
| 129 }; | 142 }; |
| 130 | 143 |
| 131 } // namespace content | 144 } // namespace content |
| 132 | 145 |
| 133 #endif // CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ | 146 #endif // CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ |
| OLD | NEW |