dap commit: Ms2ger suggested using assert_idl_attribute(...) instead

changeset:   164:593e724b5fe1
tag:         tip
user:        Marcos Caceres <w3c@marcosc.com>
date:        Tue Jul 17 12:25:33 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:
Ms2ger suggested using assert_idl_attribute(...) instead


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

Received on Tuesday, 17 July 2012 11:25:41 UTC