Chromium Code Reviews| OLD | NEW |
|---|---|
| (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.char ging ? "Charging" : "Discharging"); | |
| 16 document.getElementById("p2").innerHTML= "Charging Time: " + battery.chargin gTime; | |
| 17 document.getElementById("p3").innerHTML= "Discharging Time: " + battery.disc hargingTime; | |
| 18 document.getElementById("p4").innerHTML = "Percentage: " + battery.level *100; | |
|
abarth-chromium
2014/02/28 06:45:14
Can you clean up the style a bit here? Generally,
| |
| 19 </script> | |
| 20 </html> | |
| OLD | NEW |