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

Unified Diff: content/test/layouttest_support.cc

Issue 298263002: Battery Status API: add testing support for LayoutTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/renderer/webkit_test_runner.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/layouttest_support.cc
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index b045da9a3d98955be2334474c3f9d394c126ddf4..9e6433bcd76e8c289afbb42f145b971ef64a4d4c 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -18,6 +18,7 @@
#include "content/shell/renderer/test_runner/TestCommon.h"
#include "content/shell/renderer/test_runner/web_frame_test_proxy.h"
#include "content/shell/renderer/test_runner/web_test_proxy.h"
+#include "third_party/WebKit/public/platform/WebBatteryStatus.h"
#include "third_party/WebKit/public/platform/WebDeviceMotionData.h"
#include "third_party/WebKit/public/platform/WebDeviceOrientationData.h"
#include "third_party/WebKit/public/platform/WebGamepads.h"
@@ -27,6 +28,7 @@
#include "content/browser/renderer_host/popup_menu_helper_mac.h"
#endif
+using blink::WebBatteryStatus;
using blink::WebDeviceMotionData;
using blink::WebDeviceOrientationData;
using blink::WebGamepad;
@@ -114,6 +116,10 @@ void ResetMockScreenOrientation()
RendererWebKitPlatformSupportImpl::ResetMockScreenOrientationForTesting();
}
+void MockBatteryStatusChanged(const WebBatteryStatus& status) {
+ RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting(status);
+}
+
void EnableRendererLayoutTestMode() {
RenderThreadImpl::current()->set_layout_test_mode(true);
}
« no previous file with comments | « content/shell/renderer/webkit_test_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698