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

Unified Diff: LayoutTests/batterystatus/script-tests/updates.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
Index: LayoutTests/batterystatus/script-tests/updates.js
diff --git a/LayoutTests/batterystatus/script-tests/updates.js b/LayoutTests/batterystatus/script-tests/updates.js
deleted file mode 100644
index fe840ffeb16d6f82fa14d85b30d49e83d00827f5..0000000000000000000000000000000000000000
--- a/LayoutTests/batterystatus/script-tests/updates.js
+++ /dev/null
@@ -1,42 +0,0 @@
-description('Tests that updates to the battery event causes new events to fire.');
-
-var charging = false;
-var chargingTime = Number.POSITIVE_INFINITY;
-var dischargingTime = 6000;
-var level = 0.7;
-
-var battery = navigator.webkitBattery;
-
-function checkBatteryStatus() {
- shouldBe("battery.charging", "false");
- shouldBe("battery.chargingTime", "Infinity");
- shouldBe("battery.dischargingTime", "6000");
- shouldBe("battery.level", "0.7");
-}
-
-function setBatteryStatus() {
- internals.setBatteryStatus(document, 'chargingchange', charging, chargingTime, dischargingTime, level);
-}
-
-function firstListener() {
- checkBatteryStatus();
- battery.removeEventListener('chargingchange', firstListener);
- battery.addEventListener('chargingchange', updateListener);
- charging = true;
- chargingTime = 7000;
- dischargingTime = Number.POSITIVE_INFINITY;
- level = 0.3;
- setBatteryStatus();
-}
-
-function updateListener(event) {
- shouldBe("battery.charging", "true");
- shouldBe("battery.chargingTime", "7000");
- shouldBe("battery.dischargingTime", "Infinity");
- shouldBe("battery.level", "0.3");
- finishJSTest();
-}
-
-battery.addEventListener('chargingchange', firstListener);
-setBatteryStatus();
-window.jsTestIsAsync = true;
« no previous file with comments | « LayoutTests/batterystatus/script-tests/multiple-frames.js ('k') | LayoutTests/batterystatus/script-tests/window-property.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698