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

Side by Side Diff: content/shell/layout_test_controller_host.h

Issue 10860037: [content shell] rename layout_test_controller{,_host,_bindings}.* to webkit_test_runner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_SHELL_LAYOUT_TEST_CONTROLLER_HOST_H_
6 #define CONTENT_SHELL_LAYOUT_TEST_CONTROLLER_HOST_H_
7
8 #include <map>
9 #include <string>
10
11 #include "base/cancelable_callback.h"
12 #include "content/public/browser/render_view_host_observer.h"
13
14 class SkBitmap;
15
16 namespace content {
17
18 class LayoutTestControllerHost : public RenderViewHostObserver {
19 public:
20 static LayoutTestControllerHost* FromRenderViewHost(
21 RenderViewHost* render_view_host);
22
23 // Initialize the LayoutTestControllerHost for a given test.
24 static void Init(const std::string& expected_pixel_hash);
25
26 explicit LayoutTestControllerHost(RenderViewHost* render_view_host);
27 virtual ~LayoutTestControllerHost();
28
29 bool should_stay_on_page_after_handling_before_unload() const {
30 return should_stay_on_page_after_handling_before_unload_;
31 }
32
33 // RenderViewHostObserver implementation.
34 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
35
36 private:
37 void CaptureDump();
38 void TimeoutHandler();
39
40 // Message handlers.
41 void OnDidFinishLoad();
42 void OnTextDump(const std::string& dump);
43 void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image);
44
45 // testRunner handlers.
46 void OnNotifyDone();
47 void OnDumpAsText();
48 void OnDumpChildFramesAsText();
49 void OnSetPrinting();
50 void OnSetShouldStayOnPageAfterHandlingBeforeUnload(bool should_stay_on_page);
51 void OnWaitUntilDone();
52
53 void OnNotImplemented(const std::string& object_name,
54 const std::string& method_name);
55
56 static std::map<RenderViewHost*, LayoutTestControllerHost*> controllers_;
57 static std::string expected_pixel_hash_;
58
59 bool captured_dump_;
60
61 bool dump_as_text_;
62 bool dump_child_frames_;
63 bool is_printing_;
64 bool should_stay_on_page_after_handling_before_unload_;
65 bool wait_until_done_;
66
67 base::CancelableClosure watchdog_;
68
69 DISALLOW_COPY_AND_ASSIGN(LayoutTestControllerHost);
70 };
71
72 } // namespace content
73
74 #endif // CONTENT_SHELL_LAYOUT_TEST_CONTROLLER_HOST_H_
OLDNEW
« no previous file with comments | « content/shell/layout_test_controller_bindings.cc ('k') | content/shell/layout_test_controller_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698