dap commit: found that Webkit and Firefox don't agree on WebIDL :/ ... updated tests to use assert_equals(x in y) instead of assert_own_property()

changeset:   163:5ac0d689d15e
tag:         tip
user:        Marcos Caceres <w3c@marcosc.com>
date:        Tue Jul 17 12:18:57 2012 +0100
files:       light/tests/submissions/marcosc/DeviceLight_tests.js proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js proximity/tests/submissions/marcos/UserProximityEvent_tests.js
description:
found that Webkit and Firefox don't agree on WebIDL :/ ... updated tests to use assert_equals(x in y) instead of assert_own_property()


diff -r 36f5f46ecbad -r 5ac0d689d15e light/tests/submissions/marcosc/DeviceLight_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();
   };
diff -r 36f5f46ecbad -r 5ac0d689d15e proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js
--- 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');
diff -r 36f5f46ecbad -r 5ac0d689d15e proximity/tests/submissions/marcos/UserProximityEvent_tests.js
--- 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');

Received on Tuesday, 17 July 2012 11:19:11 UTC