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

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

Issue 329723005: Battery Status API: blink promise implementation and layout tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert to a single resolver at a time Created 6 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 <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 ;
19 </script>
20 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698