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

Unified Diff: LayoutTests/batterystatus/script-tests/window-property.js

Issue 16298005: Remove Battery Status API support code from Blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/batterystatus/script-tests/updates.js ('k') | LayoutTests/batterystatus/updates.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/batterystatus/script-tests/window-property.js
diff --git a/LayoutTests/batterystatus/script-tests/window-property.js b/LayoutTests/batterystatus/script-tests/window-property.js
deleted file mode 100644
index fefe376bc807c8a1d82c463bf3ff68362fb67521..0000000000000000000000000000000000000000
--- a/LayoutTests/batterystatus/script-tests/window-property.js
+++ /dev/null
@@ -1,23 +0,0 @@
-description('Tests that the window.navigator.battery properties are present.');
-
-function hasOnBatteryProperty()
-{
- var result = 0;
- for (var property in navigator.webkitBattery) {
- if (property == 'onchargingchange' ||
- property == 'onchargingtimechange' ||
- property == 'ondischargingtimechange' ||
- property == 'onlevelchange')
- result += 1;
- }
- if (result == 4)
- return true;
- return false;
-}
-
-shouldBeTrue("typeof navigator.webkitBattery == 'object'");
-shouldBeTrue("hasOnBatteryProperty()");
-shouldBeTrue("navigator.webkitBattery.hasOwnProperty('onchargingchange')");
-shouldBeTrue("navigator.webkitBattery.hasOwnProperty('onchargingtimechange')");
-shouldBeTrue("navigator.webkitBattery.hasOwnProperty('ondischargingtimechange')");
-shouldBeTrue("navigator.webkitBattery.hasOwnProperty('onlevelchange')");
« no previous file with comments | « LayoutTests/batterystatus/script-tests/updates.js ('k') | LayoutTests/batterystatus/updates.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698