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

Side by Side Diff: LayoutTests/batterystatus/script-tests/basic-operation.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 description('Tests the basic operation of BatteryStatus.');
2
3 var charging = false;
4 var chargingTime = Number.POSITIVE_INFINITY;
5 var dischargingTime = 6000;
6 var level = 0.7;
7
8 var battery = navigator.webkitBattery;
9
10 battery.addEventListener('chargingchange', function() {
11 shouldBe("battery.charging", "false");
12 shouldBe("battery.chargingTime", "Infinity");
13 shouldBe("battery.dischargingTime", "6000");
14 shouldBe("battery.level", "0.7");
15 finishJSTest();
16 });
17
18 internals.setBatteryStatus(document, 'chargingchange', charging, chargingTime, d ischargingTime, level);
19 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698