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

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

Issue 298263002: Battery Status API: add testing support for LayoutTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: some style fixes Created 6 years, 7 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" 12 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h"
13 13
14 namespace blink { 14 namespace blink {
15 class WebBatteryStatus;
15 class WebDeviceMotionData; 16 class WebDeviceMotionData;
16 class WebDeviceOrientationData; 17 class WebDeviceOrientationData;
17 class WebGamepad; 18 class WebGamepad;
18 class WebGamepads; 19 class WebGamepads;
19 struct WebSize; 20 struct WebSize;
20 } 21 }
21 22
22 namespace content { 23 namespace content {
23 24
24 class PageState; 25 class PageState;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void SetMockDeviceOrientationData(const blink::WebDeviceOrientationData& data); 61 void SetMockDeviceOrientationData(const blink::WebDeviceOrientationData& data);
61 62
62 // Sets WebScreenOrientationType that should be used as a mock orientation. 63 // Sets WebScreenOrientationType that should be used as a mock orientation.
63 void SetMockScreenOrientation( 64 void SetMockScreenOrientation(
64 RenderView* render_view, 65 RenderView* render_view,
65 const blink::WebScreenOrientationType& orientation); 66 const blink::WebScreenOrientationType& orientation);
66 67
67 // Resets the mock screen orientation data. 68 // Resets the mock screen orientation data.
68 void ResetMockScreenOrientation(); 69 void ResetMockScreenOrientation();
69 70
71 // Notifies blink that battery status has changed.
72 void MockBatteryStatusChanged(const blink::WebBatteryStatus& status);
73
70 // Returns the length of the local session history of a render view. 74 // Returns the length of the local session history of a render view.
71 int GetLocalSessionHistoryLength(RenderView* render_view); 75 int GetLocalSessionHistoryLength(RenderView* render_view);
72 76
73 // Sync the current session history to the browser process. 77 // Sync the current session history to the browser process.
74 void SyncNavigationState(RenderView* render_view); 78 void SyncNavigationState(RenderView* render_view);
75 79
76 // Sets the focus of the render view depending on |enable|. This only overrides 80 // Sets the focus of the render view depending on |enable|. This only overrides
77 // the state of the renderer, and does not sync the focus to the browser 81 // the state of the renderer, and does not sync the focus to the browser
78 // process. 82 // process.
79 void SetFocusAndActivate(RenderView* render_view, bool enable); 83 void SetFocusAndActivate(RenderView* render_view, bool enable);
(...skipping 25 matching lines...) Expand all
105 // Forces the |render_frame| to use mock media streams. 109 // Forces the |render_frame| to use mock media streams.
106 void UseMockMediaStreams(RenderFrame* render_frame); 110 void UseMockMediaStreams(RenderFrame* render_frame);
107 111
108 // Provides a text dump of the contents of the given page state. 112 // Provides a text dump of the contents of the given page state.
109 std::string DumpBackForwardList(std::vector<PageState>& page_state, 113 std::string DumpBackForwardList(std::vector<PageState>& page_state,
110 size_t current_index); 114 size_t current_index);
111 115
112 } // namespace content 116 } // namespace content
113 117
114 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ 118 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698