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

Side by Side Diff: LayoutTests/battery-status/test-battery-status-basic.html

Issue 182613002: Add support to Battery Status API in blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed ActiveDOMWindow and added ContextLifeCycleObserver and other minor fixes. Created 6 years, 9 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
(Empty)
1 <html>
2 <body>
3 <p>This test prints the default battery status values.</p>
4 <p id="p1"></p>
5 <p id="p2"></p>
6 <p id="p3"></p>
7 <p id="p4"></p>
8 </body>
9 <script>
10 if (window.testRunner)
11 testRunner.dumpAsText();
12
13 var battery = navigator.battery;
14
15 document.getElementById("p1").innerHTML = "Charging Status: " + (battery.cha rging ? "Charging" : "Discharging");
16 document.getElementById("p2").innerHTML = "Charging Time: " + battery.chargi ngTime;
17 document.getElementById("p3").innerHTML = "Discharging Time: " + battery.dis chargingTime;
18 document.getElementById("p4").innerHTML = "Percentage: " + battery.level *100;
abarth-chromium 2014/03/04 06:42:12 You've still got some odd whitespace on this line.
19 </script>
20 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698