- From: Mercurial notifier <cvsmail@w3.org>
- Date: Tue, 17 Jul 2012 16:20:38 +0000
- To: public-dap-commits@w3.org
changeset: 168:26c4e987c325 user: Marcos Caceres <w3c@marcosc.com> date: Tue Jul 17 17:17:22 2012 +0100 files: light/tests/submissions/marcosc/DeviceLight_tests.js proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js description: Made TypeError exceptions checks more liberal by allowing any exception diff -r 07c94a3f7c72 -r 26c4e987c325 light/tests/submissions/marcosc/DeviceLight_tests.js --- a/light/tests/submissions/marcosc/DeviceLight_tests.js Tue Jul 17 13:46:39 2012 +0100 +++ b/light/tests/submissions/marcosc/DeviceLight_tests.js Tue Jul 17 17:17:22 2012 +0100 @@ -41,7 +41,7 @@ //Type attribute tests test(function() { - assert_throws(TypeError(), function() { + assert_throws(null, function() { new DeviceLightEvent(); }, 'First argument is required, so was expecting a TypeError.'); }, 'Missing type argument'); @@ -118,7 +118,7 @@ test(function() { var event = new DeviceLightEvent(function test() {}); - assert_regex_match(event.type, /function test.+{\s?}/); + assert_regexp_match(event.type, /function test.+{\s?}/); }, 'type argument is function'); test(function() { @@ -131,7 +131,7 @@ }, 'type argument is complext object, with toString method'); test(function() { - assert_throws(TypeError(), function() { + assert_throws(null, function() { new DeviceLightEvent({ toString: function() { return function() {} @@ -165,7 +165,7 @@ var prop = { value: undefined }; - assert_throws(TypeError(), function() { + assert_throws(null, function() { new DeviceLightEvent('test', prop); }, 'value of undefined resolves to NaN, expected type error.'); }, 'value of undefined resolves to NaN, expected type error.'); @@ -218,7 +218,7 @@ var prop = { value: {} }; - assert_throws(TypeError(), function() { + assert_throws(null, function() { new DeviceLightEvent('test', prop); }, 'value of {} resolves to NaN'); }, 'value of {} resolves to NaN, expected type error'); @@ -229,7 +229,7 @@ return NaN; } }; - assert_throws(TypeError(), function() { + assert_throws(null, function() { new DeviceLightEvent('test', prop); }, 'value resolves to NaN'); }, 'value resolves to NaN, expected type error'); diff -r 07c94a3f7c72 -r 26c4e987c325 proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js --- a/proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js Tue Jul 17 13:46:39 2012 +0100 +++ b/proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js Tue Jul 17 17:17:22 2012 +0100 @@ -41,7 +41,7 @@ //Type attribute tests test(function() { - assert_throws(TypeError(), function() { + assert_throws(null, function() { new DeviceProximityEvent(); }, 'First argument is required, so was expecting a TypeError.'); }, 'Missing type argument');
Received on Tuesday, 17 July 2012 16:20:43 UTC