found that Webkit and Firefox don't agree on WebIDL :/ ... updated tests to use assert_equals(x in y) instead of assert_own_property()
authorMarcos Caceres <w3c@marcosc.com>
Tue, 17 Jul 2012 12:18:57 +0100
changeset 163 5ac0d689d15e
parent 162 36f5f46ecbad
child 164 593e724b5fe1
found that Webkit and Firefox don't agree on WebIDL :/ ... updated tests to use assert_equals(x in y) instead of assert_own_property()
light/tests/submissions/marcosc/DeviceLight_tests.js
proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js
proximity/tests/submissions/marcos/UserProximityEvent_tests.js
--- a/light/tests/submissions/marcosc/DeviceLight_tests.js	Mon Jul 16 12:58:59 2012 +0100
+++ b/light/tests/submissions/marcosc/DeviceLight_tests.js	Tue Jul 17 12:18:57 2012 +0100
@@ -246,7 +246,7 @@
 
   test(function() {
     var desc = 'Expected to find ondevicelight attribute on window object';
-    assert_own_property(window, 'ondevicelight', desc);
+    assert_equals(('ondevicelight' in window), desc);
   }, 'ondevicelight event hander attr must be on window object.');
 
   test(function() {
@@ -329,6 +329,7 @@
     t.step(function() {
       var msg = 'expected instance of DeviceLightEvent: ';
       assert_true(e instanceof window.DeviceLightEvent, msg);
+      assert_own_property(e, 'value', 'event has value property');
     });
     t.done();
   });
@@ -338,6 +339,7 @@
     t2.step(function() {
       var msg = 'expected instance of DeviceLightEvent: ';
       assert_true(e instanceof window.DeviceLightEvent, msg);
+      assert_own_property(e, 'value', 'event has value property');
     });
     t2.done();
   };
--- a/proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js	Mon Jul 16 12:58:59 2012 +0100
+++ b/proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js	Tue Jul 17 12:18:57 2012 +0100
@@ -237,7 +237,7 @@
     }, 'value props check');
     test(function() {
         var desc = 'Expected to find ondeviceproximity attribute on window object';
-        assert_own_property(window, 'ondeviceproximity', desc);
+        assert_equals('ondeviceproximity' in window, desc);
     }, 'ondeviceproximity exists');
 
     test(function() {
@@ -249,7 +249,7 @@
         var desc = 'window.ondeviceproximity did not accept callable object',
             func = function() {},
             desc = 'Expected to find ondeviceproximity attribute on window object';
-        assert_own_property(window, 'ondeviceproximity', desc);
+        assert_equals('ondeviceproximity' in window, desc);
         window.ondeviceproximity = func;
         assert_equals(window.ondeviceproximity, func, desc);
     }, 'ondeviceproximity is set to function');
--- a/proximity/tests/submissions/marcos/UserProximityEvent_tests.js	Mon Jul 16 12:58:59 2012 +0100
+++ b/proximity/tests/submissions/marcos/UserProximityEvent_tests.js	Tue Jul 17 12:18:57 2012 +0100
@@ -229,7 +229,7 @@
 
     test(function() {
         var desc = 'Expected to find onuserproximity attribute on window object';
-        assert_own_property(window, 'onuserproximity', desc);
+        assert_equals('onuserproximity' in window, desc);
     }, 'onuserproximity exists');
 
     test(function() {
@@ -241,7 +241,7 @@
         var desc = 'window.onuserproximity did not accept callable object',
             func = function() {},
             desc = 'onuserproximity does not exist';
-        assert_own_property(window, 'onuserproximity', desc);
+        assert_equals('onuserproximity' in window, desc);
         window.onuserproximity = func;
         assert_equals(window.onuserproximity, func, desc);
     }, 'onuserproximity exists and can be set to a function');