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/common/page_state.h" |
12 #include "content/public/renderer/render_view_observer.h" | 13 #include "content/public/renderer/render_view_observer.h" |
13 #include "content/public/renderer/render_view_observer_tracker.h" | 14 #include "content/public/renderer/render_view_observer_tracker.h" |
14 #include "content/shell/common/shell_test_configuration.h" | 15 #include "content/shell/common/shell_test_configuration.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
Preferences.h" |
16 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web
TestDelegate.h" | 17 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web
TestDelegate.h" |
17 #include "v8/include/v8.h" | 18 #include "v8/include/v8.h" |
18 | 19 |
19 class SkCanvas; | 20 class SkCanvas; |
20 | 21 |
21 namespace WebKit { | 22 namespace WebKit { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 void Reset(); | 108 void Reset(); |
108 | 109 |
109 void set_proxy(::WebTestRunner::WebTestProxyBase* proxy) { proxy_ = proxy; } | 110 void set_proxy(::WebTestRunner::WebTestProxyBase* proxy) { proxy_ = proxy; } |
110 ::WebTestRunner::WebTestProxyBase* proxy() const { return proxy_; } | 111 ::WebTestRunner::WebTestProxyBase* proxy() const { return proxy_; } |
111 | 112 |
112 private: | 113 private: |
113 // Message handlers. | 114 // Message handlers. |
114 void OnSetTestConfiguration(const ShellTestConfiguration& params); | 115 void OnSetTestConfiguration(const ShellTestConfiguration& params); |
115 void OnSessionHistory( | 116 void OnSessionHistory( |
116 const std::vector<int>& routing_ids, | 117 const std::vector<int>& routing_ids, |
117 const std::vector<std::vector<std::string> >& session_histories, | 118 const std::vector<std::vector<PageState> >& session_histories, |
118 const std::vector<unsigned>& current_entry_indexes); | 119 const std::vector<unsigned>& current_entry_indexes); |
119 void OnReset(); | 120 void OnReset(); |
120 void OnNotifyDone(); | 121 void OnNotifyDone(); |
121 | 122 |
122 // After finishing the test, retrieves the audio, text, and pixel dumps from | 123 // After finishing the test, retrieves the audio, text, and pixel dumps from |
123 // the TestRunner library and sends them to the browser process. | 124 // the TestRunner library and sends them to the browser process. |
124 void CaptureDump(); | 125 void CaptureDump(); |
125 | 126 |
126 ::WebTestRunner::WebTestProxyBase* proxy_; | 127 ::WebTestRunner::WebTestProxyBase* proxy_; |
127 | 128 |
128 RenderView* focused_view_; | 129 RenderView* focused_view_; |
129 | 130 |
130 ::WebTestRunner::WebPreferences prefs_; | 131 ::WebTestRunner::WebPreferences prefs_; |
131 | 132 |
132 ShellTestConfiguration test_config_; | 133 ShellTestConfiguration test_config_; |
133 | 134 |
134 std::vector<int> routing_ids_; | 135 std::vector<int> routing_ids_; |
135 std::vector<std::vector<std::string> > session_histories_; | 136 std::vector<std::vector<PageState> > session_histories_; |
136 std::vector<unsigned> current_entry_indexes_; | 137 std::vector<unsigned> current_entry_indexes_; |
137 | 138 |
138 bool is_main_window_; | 139 bool is_main_window_; |
139 | 140 |
140 bool focus_on_next_commit_; | 141 bool focus_on_next_commit_; |
141 | 142 |
142 scoped_ptr<webkit_glue::TestMediaStreamClient> test_media_stream_client_; | 143 scoped_ptr<webkit_glue::TestMediaStreamClient> test_media_stream_client_; |
143 | 144 |
144 DISALLOW_COPY_AND_ASSIGN(WebKitTestRunner); | 145 DISALLOW_COPY_AND_ASSIGN(WebKitTestRunner); |
145 }; | 146 }; |
146 | 147 |
147 } // namespace content | 148 } // namespace content |
148 | 149 |
149 #endif // CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ | 150 #endif // CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ |
OLD | NEW |