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

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: fix 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 void LoadDevToolsJSTest();
197 void DiscardMainWindow(); 198 void DiscardMainWindow();
198 199
199 // Message handlers. 200 // Message handlers.
200 void OnAudioDump(const std::vector<unsigned char>& audio_dump); 201 void OnAudioDump(const std::vector<unsigned char>& audio_dump);
201 void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image); 202 void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image);
202 void OnTextDump(const std::string& dump); 203 void OnTextDump(const std::string& dump);
203 void OnInitiateLayoutDump(); 204 void OnInitiateLayoutDump();
204 void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump); 205 void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump);
205 void OnPrintMessageToStderr(const std::string& message); 206 void OnPrintMessageToStderr(const std::string& message);
206 void OnPrintMessage(const std::string& message); 207 void OnPrintMessage(const std::string& message);
(...skipping 18 matching lines...) Expand all
225 const std::string& argument); 226 const std::string& argument);
226 mojom::LayoutTestControl* GetLayoutTestControlPtr(RenderFrameHost* frame); 227 mojom::LayoutTestControl* GetLayoutTestControlPtr(RenderFrameHost* frame);
227 void HandleLayoutTestControlError(RenderFrameHost* frame); 228 void HandleLayoutTestControlError(RenderFrameHost* frame);
228 229
229 std::unique_ptr<BlinkTestResultPrinter> printer_; 230 std::unique_ptr<BlinkTestResultPrinter> printer_;
230 231
231 base::FilePath current_working_directory_; 232 base::FilePath current_working_directory_;
232 base::FilePath temp_path_; 233 base::FilePath temp_path_;
233 234
234 Shell* main_window_; 235 Shell* main_window_;
236 Shell* secondary_window_;
235 Shell* devtools_window_; 237 Shell* devtools_window_;
236 238
237 std::unique_ptr<LayoutTestDevToolsBindings> devtools_bindings_; 239 std::unique_ptr<LayoutTestDevToolsBindings> devtools_bindings_;
238 240
239 // The PID of the render process of the render view host of main_window_. 241 // The PID of the render process of the render view host of main_window_.
240 int current_pid_; 242 int current_pid_;
241 243
242 // Tracks if (during the current test) we have already sent *initial* test 244 // Tracks if (during the current test) we have already sent *initial* test
243 // configuration to a renderer process (*initial* test configuration is 245 // configuration to a renderer process (*initial* test configuration is
244 // associated with some steps that should only be executed *once* per test - 246 // 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 301 #endif
300 302
301 SEQUENCE_CHECKER(sequence_checker_); 303 SEQUENCE_CHECKER(sequence_checker_);
302 304
303 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); 305 DISALLOW_COPY_AND_ASSIGN(BlinkTestController);
304 }; 306 };
305 307
306 } // namespace content 308 } // namespace content
307 309
308 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ 310 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698