Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Side by Side Diff: content/shell/browser/layout_test/blink_test_controller.h

Issue 2837083003: DevTools: create test infrastructure so devtools drives the test (Closed)
Patch Set: all Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <ostream> 10 #include <ostream>
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 private: 188 private:
189 enum TestPhase { 189 enum TestPhase {
190 BETWEEN_TESTS, 190 BETWEEN_TESTS,
191 DURING_TEST, 191 DURING_TEST,
192 CLEAN_UP 192 CLEAN_UP
193 }; 193 };
194 194
195 static BlinkTestController* instance_; 195 static BlinkTestController* instance_;
196 196
197 Shell* SecondaryWindow();
198 void LoadDevToolsJSTest();
197 void DiscardMainWindow(); 199 void DiscardMainWindow();
198 200
199 // Message handlers. 201 // Message handlers.
200 void OnAudioDump(const std::vector<unsigned char>& audio_dump); 202 void OnAudioDump(const std::vector<unsigned char>& audio_dump);
201 void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image); 203 void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image);
202 void OnTextDump(const std::string& dump); 204 void OnTextDump(const std::string& dump);
203 void OnInitiateLayoutDump(); 205 void OnInitiateLayoutDump();
204 void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump); 206 void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump);
205 void OnPrintMessageToStderr(const std::string& message); 207 void OnPrintMessageToStderr(const std::string& message);
206 void OnPrintMessage(const std::string& message); 208 void OnPrintMessage(const std::string& message);
(...skipping 18 matching lines...) Expand all
225 const std::string& argument); 227 const std::string& argument);
226 mojom::LayoutTestControl* GetLayoutTestControlPtr(RenderFrameHost* frame); 228 mojom::LayoutTestControl* GetLayoutTestControlPtr(RenderFrameHost* frame);
227 void HandleLayoutTestControlError(RenderFrameHost* frame); 229 void HandleLayoutTestControlError(RenderFrameHost* frame);
228 230
229 std::unique_ptr<BlinkTestResultPrinter> printer_; 231 std::unique_ptr<BlinkTestResultPrinter> printer_;
230 232
231 base::FilePath current_working_directory_; 233 base::FilePath current_working_directory_;
232 base::FilePath temp_path_; 234 base::FilePath temp_path_;
233 235
234 Shell* main_window_; 236 Shell* main_window_;
237 Shell* secondary_window_;
235 Shell* devtools_window_; 238 Shell* devtools_window_;
236 239
237 std::unique_ptr<LayoutTestDevToolsBindings> devtools_bindings_; 240 std::unique_ptr<LayoutTestDevToolsBindings> devtools_bindings_;
238 241
239 // The PID of the render process of the render view host of main_window_. 242 // The PID of the render process of the render view host of main_window_.
240 int current_pid_; 243 int current_pid_;
241 244
242 // Tracks if (during the current test) we have already sent *initial* test 245 // Tracks if (during the current test) we have already sent *initial* test
243 // configuration to a renderer process (*initial* test configuration is 246 // configuration to a renderer process (*initial* test configuration is
244 // associated with some steps that should only be executed *once* per test - 247 // associated with some steps that should only be executed *once* per test -
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 #endif 302 #endif
300 303
301 SEQUENCE_CHECKER(sequence_checker_); 304 SEQUENCE_CHECKER(sequence_checker_);
302 305
303 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); 306 DISALLOW_COPY_AND_ASSIGN(BlinkTestController);
304 }; 307 };
305 308
306 } // namespace content 309 } // namespace content
307 310
308 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ 311 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698