better descriptions
authorAnssi Kostiainen <anssi.kostiainen@nokia.com>
Wed, 31 Oct 2012 11:43:48 +0100
changeset 264 cda35cc7cd40
parent 263 0c19463d8e6a
child 265 b0ba6739390f
better descriptions
battery/tests/submissions/anssik/TODO.txt
battery/tests/submissions/anssik/battery-discharging.html
battery/tests/submissions/anssik/battery-plugged-in.html
battery/tests/submissions/anssik/battery-unplugged.html
--- a/battery/tests/submissions/anssik/TODO.txt	Wed Oct 31 00:42:19 2012 +0100
+++ b/battery/tests/submissions/anssik/TODO.txt	Wed Oct 31 11:43:48 2012 +0100
@@ -1,5 +1,4 @@
 ---+ TODO
   
    * proper {level | chargingtime | dischargingtime}change tests
-   * async tests for *change when plugged in
    * validate tests on a real device and tweak timeouts for async tests
\ No newline at end of file
--- a/battery/tests/submissions/anssik/battery-discharging.html	Wed Oct 31 00:42:19 2012 +0100
+++ b/battery/tests/submissions/anssik/battery-discharging.html	Wed Oct 31 11:43:48 2012 +0100
@@ -24,7 +24,6 @@
     </p>
     <div id="log"></div>
     <script>
-
     (function() {
 
       setup({ timeout: 5*60*1000 });
@@ -53,7 +52,7 @@
       w.postMessage('compute');
       w.onmessage = function (e) {
         document.querySelector('#prime').textContent = e.data;
-      }
+      };
       
       navigator.battery.onlevelchange = onlevelchange_test.step_func(function (e) {
         assert_true(navigator.battery.level < battery_level, 'The value of the level attribute must decrease, if the battery is discharging.');
--- a/battery/tests/submissions/anssik/battery-plugged-in.html	Wed Oct 31 00:42:19 2012 +0100
+++ b/battery/tests/submissions/anssik/battery-plugged-in.html	Wed Oct 31 11:43:48 2012 +0100
@@ -50,7 +50,7 @@
       var onlevelchange_test = async_test('When the battery\'s level changes, must fire a levelchange event.');
       var battery_level = navigator.battery.level;
       navigator.battery.onlevelchange = onlevelchange_test.step_func(function (e) {
-        assert_true(navigator.battery.level > 0 && navigator.battery.level < 1.0, 'The value of the level attribute must >0 and <1.0');
+        assert_true(navigator.battery.level > 0 && navigator.battery.level < 1.0, 'The level attribute must be set to the current battery level scaled from 0 to 1.0.');
         onlevelchange_test.done();
       });
 
--- a/battery/tests/submissions/anssik/battery-unplugged.html	Wed Oct 31 00:42:19 2012 +0100
+++ b/battery/tests/submissions/anssik/battery-unplugged.html	Wed Oct 31 11:43:48 2012 +0100
@@ -50,7 +50,7 @@
       var onlevelchange_test = async_test('When the battery\'s level changes, must fire a levelchange event.');
       var battery_level = navigator.battery.level;
       navigator.battery.onlevelchange = onlevelchange_test.step_func(function (e) {
-        assert_true(navigator.battery.level > 0 && navigator.battery.level < 1.0, 'The value of the level attribute must >0 and <1.0');
+        assert_true(navigator.battery.level > 0 && navigator.battery.level < 1.0, 'The level attribute must be set to the current battery level scaled from 0 to 1.0.');
         onlevelchange_test.done();
       });