fixed a few buggy tests after running agaist Aurora 15a2
authorMarcos Caceres <w3c@marcosc.com>
Mon, 16 Jul 2012 12:26:46 +0100
changeset 158 95fb886b157d
parent 157 2f67049e0a21
child 159 d17bab024374
fixed a few buggy tests after running agaist Aurora 15a2
light/tests/submissions/marcosc/DeviceLight_tests.js
temperature/Overview.html
--- a/light/tests/submissions/marcosc/DeviceLight_tests.js	Mon Jul 16 12:08:11 2012 +0100
+++ b/light/tests/submissions/marcosc/DeviceLight_tests.js	Mon Jul 16 12:26:46 2012 +0100
@@ -150,14 +150,14 @@
     var event = new DeviceLightEvent('test', {
       value: false
     });
-    assert_equals(event.value, 0, 'value set to false');
+    assert_equals(event.value, 0, 'value set to false, converts to 0.');
   }, 'value set to false');
 
   test(function() {
     var event = new DeviceLightEvent('test', {
       value: true
     });
-    assert_equals(event.value, 1, 'value set to true');
+    assert_equals(event.value, 1, 'value set to true, converts to 1.');
   }, 'value set to true');
 
 
@@ -167,7 +167,7 @@
     };
     assert_throws(TypeError(), function() {
       new DeviceLightEvent('test', prop);
-    }, 'value resolves to NaN');
+    }, 'value of undefined resolves to NaN, expected type error.');
   }, 'value resolves to NaN, expected type error');
 
   test(function() {
@@ -182,21 +182,21 @@
     var event = new DeviceLightEvent('test', {
       value: ''
     });
-    assert_equals(event.value, false, 'value must resolve to 0');
+    assert_equals(event.value, 0, 'value must resolve to 0');
   }, 'value must resolve to 0');
 
   test(function() {
     var event = new DeviceLightEvent('test', {
       value: '\u0020'
     });
-    assert_equals(event.value, true, 'value must resolve to 0');
+    assert_equals(event.value, 0, 'value must resolve to 0');
   }, 'value must resolve to 0');
 
   test(function() {
     var event = new DeviceLightEvent('test', {
       value: '\u0020\u0020\u0020\u0020\u0020\u0020'
     });
-    assert_equals(event.value, true, 'value must resolve to 0');
+    assert_equals(event.value, 0, 'value must resolve to 0');
   }, 'value must resolve to 0');
 
   test(function() {
@@ -238,7 +238,7 @@
   test(function() {
     var desc = 'Expected to find ondevicelight attribute on window object';
     assert_own_property(window, 'ondevicelight', desc);
-  }, 'ondevicelight exists');
+  }, 'ondevicelight event hander attr must be on window object');
 
   test(function() {
     var desc = 'window.ondevicelight must be null';
--- a/temperature/Overview.html	Mon Jul 16 12:08:11 2012 +0100
+++ b/temperature/Overview.html	Mon Jul 16 12:26:46 2012 +0100
@@ -105,12 +105,12 @@
         which this specification extends:
       </p>
       <dl title="partial interface Window" class="idl">
-        <dt>attribute EventHandler onambienttemp</dt>
+        <dt>attribute EventHandler ontemperature</dt>
         <dd>
         </dd>
       </dl>
       <p>
-        The <code>onambienttemp</code> event handler and its corresponding
+        The <code>ontemperature</code> event handler and its corresponding
         event handler event type <code>ambienttemperature</code> MUST be supported
         as an IDL attribute by all objects implementing the <a>Window</a>
         interface.
@@ -131,7 +131,7 @@
           <dt>readonly attribute double k</dt>
           <dd>
             The <a>current  temperature</a> expressed as kelvin.
-          </dd>
+          When getting, </dd>
           
         </dl>
         <dl title="dictionary AmbientTempEventInit : EventInit" class='idl'>
@@ -147,13 +147,13 @@
         <ol class="rule">
           <li>
             <a>Create an event</a> that uses the <a>AmbientTemperatureEvent</a>
-            interface, with the name <code>ambienttemperature</code>, which
+            interface, with the name <code>temperature</code>, which
             bubbles, is not cancelable, and has no default action, that also
             meets the following conditions:
             <ol>
               <li>
                 If the implementation is unable to report the <a>current
-                ambient temperature</a>, initialize the <code>value</code>
+                ambient temperature</a>, initialize the <code>c</code>
                 attribute to positive Infinity, otherwise initialize the
                 attribute to the <a>current ambient temperature</a>.
               </li>
@@ -190,8 +190,8 @@
             </thead>
             <tbody>
               <tr>
-                <td><strong><code>onambienttemp</code></strong></td>
-                <td><code>ambienttemperature</code></td>
+                <td><strong><code>ontemperature</code></strong></td>
+                <td><code>temperature</code></td>
               </tr>
             </tbody>
           </table>