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

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

Issue 16026006: Introduce the notion of a "layout test mode" instead of turning individual flags on and off (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/renderer/devtools/devtools_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 9
10 namespace WebKit { 10 namespace WebKit {
11 class WebGamepads; 11 class WebGamepads;
12 struct WebSize; 12 struct WebSize;
13 } 13 }
14 14
15 namespace WebTestRunner { 15 namespace WebTestRunner {
16 class WebTestProxyBase; 16 class WebTestProxyBase;
17 } 17 }
18 18
19 namespace content { 19 namespace content {
20 20
21 class RenderView; 21 class RenderView;
22 22
23 // Turn the browser process into layout test mode.
24 void EnableBrowserLayoutTestMode();
25
26 ///////////////////////////////////////////////////////////////////////////////
27 // The following methods are meant to be used from a renderer.
28
29 // Turn a renderer into layout test mode.
30 void EnableRendererLayoutTestMode();
31
23 // Enable injecting of a WebTestProxy between WebViews and RenderViews. 32 // Enable injecting of a WebTestProxy between WebViews and RenderViews.
24 // |callback| is invoked with a pointer to WebTestProxyBase for each created 33 // |callback| is invoked with a pointer to WebTestProxyBase for each created
25 // WebTestProxy. 34 // WebTestProxy.
26 void EnableWebTestProxyCreation(const base::Callback< 35 void EnableWebTestProxyCreation(const base::Callback<
27 void(RenderView*, WebTestRunner::WebTestProxyBase*)>& callback); 36 void(RenderView*, WebTestRunner::WebTestProxyBase*)>& callback);
28 37
29 // Sets the WebGamepads that should be returned by 38 // Sets the WebGamepads that should be returned by
30 // WebKitPlatformSupport::sampleGamepads(). 39 // WebKitPlatformSupport::sampleGamepads().
31 void SetMockGamepads(const WebKit::WebGamepads& pads); 40 void SetMockGamepads(const WebKit::WebGamepads& pads);
32 41
33 // Disable logging to the console from the appcache system.
34 void DisableAppCacheLogging();
35
36 // Enable testing support in the devtools client.
37 void EnableDevToolsFrontendTesting();
38
39 // Returns the length of the local session history of a render view. 42 // Returns the length of the local session history of a render view.
40 int GetLocalSessionHistoryLength(RenderView* render_view); 43 int GetLocalSessionHistoryLength(RenderView* render_view);
41 44
42 void SetAllowOSMesaImageTransportForTesting();
43
44 // Suppress sending focus events from the renderer to the browser.
45 void DoNotSendFocusEvents();
46
47 // Sync the current session history to the browser process. 45 // Sync the current session history to the browser process.
48 void SyncNavigationState(RenderView* render_view); 46 void SyncNavigationState(RenderView* render_view);
49 47
50 // Sets the focus of the render view depending on |enable|. This only overrides 48 // Sets the focus of the render view depending on |enable|. This only overrides
51 // the state of the renderer, and does not sync the focus to the browser 49 // the state of the renderer, and does not sync the focus to the browser
52 // process. 50 // process.
53 void SetFocusAndActivate(RenderView* render_view, bool enable); 51 void SetFocusAndActivate(RenderView* render_view, bool enable);
54 52
55 // When WebKit requests a size change, immediately report the new sizes back to
56 // WebKit instead of waiting for the browser to acknowledge the new size.
57 void EnableShortCircuitSizeUpdates();
58
59 // Changes the window rect of the given render view. 53 // Changes the window rect of the given render view.
60 void ForceResizeRenderView(RenderView* render_view, 54 void ForceResizeRenderView(RenderView* render_view,
61 const WebKit::WebSize& new_size); 55 const WebKit::WebSize& new_size);
62 56
63 // Never display error pages when a navigation fails.
64 void DisableNavigationErrorPages();
65
66 // Set the device scale factor and force the compositor to resize. 57 // Set the device scale factor and force the compositor to resize.
67 void SetDeviceScaleFactor(RenderView* render_view, float factor); 58 void SetDeviceScaleFactor(RenderView* render_view, float factor);
68 59
69 // Disable system calls related to drag & drop.
70 void DisableSystemDragDrop();
71
72 // Don't show modal popup menus.
73 void DisableModalPopupMenus();
74
75 // Control auto resize mode. 60 // Control auto resize mode.
76 void EnableAutoResizeMode(RenderView* render_view, 61 void EnableAutoResizeMode(RenderView* render_view,
77 const WebKit::WebSize& min_size, 62 const WebKit::WebSize& min_size,
78 const WebKit::WebSize& max_size); 63 const WebKit::WebSize& max_size);
79 void DisableAutoResizeMode(RenderView* render_view, 64 void DisableAutoResizeMode(RenderView* render_view,
80 const WebKit::WebSize& new_size); 65 const WebKit::WebSize& new_size);
81 66
82 } // namespace content 67 } // namespace content
83 68
84 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ 69 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/devtools/devtools_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698