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

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

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

Powered by Google App Engine
This is Rietveld 408576698