Ms2ger suggested using assert_idl_attribute(...) instead
authorMarcos Caceres <w3c@marcosc.com>
Tue, 17 Jul 2012 12:25:33 +0100
changeset 164 593e724b5fe1
parent 163 5ac0d689d15e
child 165 efb0e4c8ffeb
Ms2ger suggested using assert_idl_attribute(...) instead
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	Tue Jul 17 12:18:57 2012 +0100
+++ b/light/tests/submissions/marcosc/DeviceLight_tests.js	Tue Jul 17 12:25:33 2012 +0100
@@ -246,7 +246,7 @@
 
   test(function() {
     var desc = 'Expected to find ondevicelight attribute on window object';
-    assert_equals(('ondevicelight' in window), desc);
+    assert_idl_attribute(window,'ondevicelight', desc);
   }, 'ondevicelight event hander attr must be on window object.');
 
   test(function() {
--- a/proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js	Tue Jul 17 12:18:57 2012 +0100
+++ b/proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js	Tue Jul 17 12:25:33 2012 +0100
@@ -237,7 +237,7 @@
     }, 'value props check');
     test(function() {
         var desc = 'Expected to find ondeviceproximity attribute on window object';
-        assert_equals('ondeviceproximity' in window, desc);
+        assert_idl_attribute(window,'ondeviceproximity', 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_equals('ondeviceproximity' in window, desc);
+        assert_idl_attribute(window,'ondeviceproximity', desc);
         window.ondeviceproximity = func;
         assert_equals(window.ondeviceproximity, func, desc);
     }, 'ondeviceproximity is set to function');
--- a/proximity/tests/submissions/marcos/UserProximityEvent_tests.js	Tue Jul 17 12:18:57 2012 +0100
+++ b/proximity/tests/submissions/marcos/UserProximityEvent_tests.js	Tue Jul 17 12:25:33 2012 +0100
@@ -229,7 +229,7 @@
 
     test(function() {
         var desc = 'Expected to find onuserproximity attribute on window object';
-        assert_equals('onuserproximity' in window, desc);
+        assert_idl_attribute(window,'onuserproximity', 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_equals('onuserproximity' in window, desc);
+        assert_idl_attribute(window,'onuserproximity', desc);
         window.onuserproximity = func;
         assert_equals(window.onuserproximity, func, desc);
     }, 'onuserproximity exists and can be set to a function');