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

Side by Side Diff: content/public/test/layouttest_support.h

Issue 1821923003: Extract WebFrameClient implementation out of WebTestProxyBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 8 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 (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_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ 5 #ifndef CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_
6 #define CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ 6 #define CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 14 matching lines...) Expand all
25 struct WebSize; 25 struct WebSize;
26 class WebView; 26 class WebView;
27 class WebURLResponse; 27 class WebURLResponse;
28 } 28 }
29 29
30 namespace device { 30 namespace device {
31 class BluetoothAdapter; 31 class BluetoothAdapter;
32 } 32 }
33 33
34 namespace test_runner { 34 namespace test_runner {
35 class WebFrameTestProxyBase;
35 class WebTestProxyBase; 36 class WebTestProxyBase;
36 } 37 }
37 38
38 namespace content { 39 namespace content {
39 40
40 class PageState; 41 class PageState;
41 class RenderFrame; 42 class RenderFrame;
42 class RendererGamepadProvider; 43 class RendererGamepadProvider;
43 class RenderView; 44 class RenderView;
44 45
45 // Turn the browser process into layout test mode. 46 // Turn the browser process into layout test mode.
46 void EnableBrowserLayoutTestMode(); 47 void EnableBrowserLayoutTestMode();
47 48
48 /////////////////////////////////////////////////////////////////////////////// 49 ///////////////////////////////////////////////////////////////////////////////
49 // The following methods are meant to be used from a renderer. 50 // The following methods are meant to be used from a renderer.
50 51
51 // Turn a renderer into layout test mode. 52 // Turn a renderer into layout test mode.
52 void EnableRendererLayoutTestMode(); 53 void EnableRendererLayoutTestMode();
53 54
54 // Enable injecting of a WebTestProxy between WebViews and RenderViews. 55 // Enable injecting of a WebTestProxy between WebViews and RenderViews
55 // |callback| is invoked with a pointer to WebTestProxyBase for each created 56 // and WebFrameTestProxy between WebFrames and RenderFrames.
56 // WebTestProxy. 57 // |view_proxy_creation_callback| is invoked after creating WebTestProxy.
58 // |frame_proxy_creation_callback| is called after creating WebFrameTestProxy.
59 using ViewProxyCreationCallback =
60 base::Callback<void(RenderView*, test_runner::WebTestProxyBase*)>;
61 using FrameProxyCreationCallback =
62 base::Callback<void(RenderFrame*, test_runner::WebFrameTestProxyBase*)>;
57 void EnableWebTestProxyCreation( 63 void EnableWebTestProxyCreation(
58 const base::Callback<void(RenderView*, test_runner::WebTestProxyBase*)>& 64 const ViewProxyCreationCallback& view_proxy_creation_callback,
59 callback); 65 const FrameProxyCreationCallback& frame_proxy_creation_callback);
60 66
61 typedef base::Callback<void(const blink::WebURLResponse& response, 67 typedef base::Callback<void(const blink::WebURLResponse& response,
62 const std::string& data)> FetchManifestCallback; 68 const std::string& data)> FetchManifestCallback;
63 void FetchManifest(blink::WebView* view, const GURL& url, 69 void FetchManifest(blink::WebView* view, const GURL& url,
64 const FetchManifestCallback&); 70 const FetchManifestCallback&);
65 71
66 // Sets gamepad provider to be used for layout tests. 72 // Sets gamepad provider to be used for layout tests.
67 void SetMockGamepadProvider(scoped_ptr<RendererGamepadProvider> provider); 73 void SetMockGamepadProvider(scoped_ptr<RendererGamepadProvider> provider);
68 74
69 // Sets a double that should be used when registering 75 // Sets a double that should be used when registering
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void DisableAutoResizeMode(RenderView* render_view, 134 void DisableAutoResizeMode(RenderView* render_view,
129 const blink::WebSize& new_size); 135 const blink::WebSize& new_size);
130 136
131 // Provides a text dump of the contents of the given page state. 137 // Provides a text dump of the contents of the given page state.
132 std::string DumpBackForwardList(std::vector<PageState>& page_state, 138 std::string DumpBackForwardList(std::vector<PageState>& page_state,
133 size_t current_index); 139 size_t current_index);
134 140
135 } // namespace content 141 } // namespace content
136 142
137 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ 143 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698