dap commit: clean up. Added small missing test.

changeset:   165:efb0e4c8ffeb
tag:         tip
user:        Marcos Caceres <w3c@marcosc.com>
date:        Tue Jul 17 12:42:07 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:
clean up. Added small missing test.


diff -r 593e724b5fe1 -r efb0e4c8ffeb light/tests/submissions/marcosc/DeviceLight_tests.js
--- a/light/tests/submissions/marcosc/DeviceLight_tests.js	Tue Jul 17 12:25:33 2012 +0100
+++ b/light/tests/submissions/marcosc/DeviceLight_tests.js	Tue Jul 17 12:42:07 2012 +0100
@@ -246,7 +246,7 @@
 
   test(function() {
     var desc = 'Expected to find ondevicelight attribute on window object';
-    assert_idl_attribute(window,'ondevicelight', desc);
+    assert_idl_attribute(window, 'ondevicelight', desc);
   }, 'ondevicelight event hander attr must be on window object.');
 
   test(function() {
@@ -258,7 +258,7 @@
     var desc = 'window.ondevicelight did not accept callable object',
       func = function() {},
       desc = 'Expected to find ondevicelight attribute on window object';
-    assert_own_property(window, 'ondevicelight', desc);
+    assert_idl_attribute(window, 'ondevicelight', desc);
     window.ondevicelight = func;
     assert_equals(window.ondevicelight, func, desc);
   }, 'expected ondevicelight on window and to be set to function');
diff -r 593e724b5fe1 -r efb0e4c8ffeb proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js
--- a/proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js	Tue Jul 17 12:25:33 2012 +0100
+++ b/proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js	Tue Jul 17 12:42:07 2012 +0100
@@ -143,17 +143,17 @@
     //test the attributes exist
     test(function() {
         var event = new DeviceProximityEvent('test');
-        assert_own_property(event, 'value', 'must have attribute value');
+        assert_idl_attribute(event, 'value', 'must have attribute value');
     }, 'value attribute exist');
 
     test(function() {
         var event = new DeviceProximityEvent('test');
-        assert_own_property(event, 'min', 'must have attribute min');
+        assert_idl_attribute(event, 'min', 'must have attribute min');
     }, 'min attribute exist');
 
     test(function() {
         var event = new DeviceProximityEvent('test');
-        assert_own_property(event, 'max', 'must have attribute max');
+        assert_idl_attribute(event, 'max', 'must have attribute max');
     }, 'max attribute exist');
 
     //test readonly attribute double value;
@@ -237,7 +237,7 @@
     }, 'value props check');
     test(function() {
         var desc = 'Expected to find ondeviceproximity attribute on window object';
-        assert_idl_attribute(window,'ondeviceproximity', 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_idl_attribute(window,'ondeviceproximity', desc);
+        assert_idl_attribute(window, 'ondeviceproximity', desc);
         window.ondeviceproximity = func;
         assert_equals(window.ondeviceproximity, func, desc);
     }, 'ondeviceproximity is set to function');
diff -r 593e724b5fe1 -r efb0e4c8ffeb proximity/tests/submissions/marcos/UserProximityEvent_tests.js
--- a/proximity/tests/submissions/marcos/UserProximityEvent_tests.js	Tue Jul 17 12:25:33 2012 +0100
+++ b/proximity/tests/submissions/marcos/UserProximityEvent_tests.js	Tue Jul 17 12:42:07 2012 +0100
@@ -142,6 +142,12 @@
     //test readonly attribute boolean near;
     test(function() {
         var event = new UserProximityEvent('test');
+        assert_idl_attribute(event, 'near', 'must have attribute near');
+    }, 'must have attribute near');
+
+
+    test(function() {
+        var event = new UserProximityEvent('test');
         assert_readonly(event, 'near', 'readonly attribute near');
     }, 'near is readonly');
 
@@ -229,7 +235,7 @@
 
     test(function() {
         var desc = 'Expected to find onuserproximity attribute on window object';
-        assert_idl_attribute(window,'onuserproximity', desc)
+        assert_idl_attribute(window, 'onuserproximity', desc);
     }, 'onuserproximity exists');
 
     test(function() {
@@ -241,7 +247,7 @@
         var desc = 'window.onuserproximity did not accept callable object',
             func = function() {},
             desc = 'onuserproximity does not exist';
-        assert_idl_attribute(window,'onuserproximity', 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:42:20 UTC