switched a function string comparison test to use a regex (firefox puts a \n between brackets)
authorMarcos Caceres <w3c@marcosc.com>
Tue, 17 Jul 2012 13:21:20 +0100
changeset 166 f168630fdee3
parent 165 efb0e4c8ffeb
child 167 07c94a3f7c72
switched a function string comparison test to use a regex (firefox puts a \n between brackets)
light/tests/submissions/marcosc/DeviceLight_tests.js
light/tests/submissions/marcosc/index.html
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:42:07 2012 +0100
+++ b/light/tests/submissions/marcosc/DeviceLight_tests.js	Tue Jul 17 13:21:20 2012 +0100
@@ -118,7 +118,7 @@
 
   test(function() {
     var event = new DeviceLightEvent(function test() {});
-    assert_equals(event.type, 'function test() {}');
+    assert_regex_match(event.type, /function test.+{\s?}/);
   }, 'type argument is function');
 
   test(function() {
--- a/light/tests/submissions/marcosc/index.html	Tue Jul 17 12:42:07 2012 +0100
+++ b/light/tests/submissions/marcosc/index.html	Tue Jul 17 13:21:20 2012 +0100
@@ -1,5 +1,5 @@
 <!doctype html>
-<meta encoding=utf8>
+<meta charset=utf8>
 <meta content="width=device-width, initial-scale=1" name=viewport>
 <meta>
 <title>Light Events Test Suite</title> 
--- a/proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js	Tue Jul 17 12:42:07 2012 +0100
+++ b/proximity/tests/submissions/marcos/DeviceProximityEvent_tests.js	Tue Jul 17 13:21:20 2012 +0100
@@ -118,7 +118,7 @@
 
     test(function() {
         var event = new DeviceProximityEvent(function test() {});
-        assert_equals(event.type, 'function test() {}');
+        assert_regex_match(event.type, /function test.+{\s?}/);
     }, 'type argument is function');
 
     test(function() {
--- a/proximity/tests/submissions/marcos/UserProximityEvent_tests.js	Tue Jul 17 12:42:07 2012 +0100
+++ b/proximity/tests/submissions/marcos/UserProximityEvent_tests.js	Tue Jul 17 13:21:20 2012 +0100
@@ -117,7 +117,7 @@
 
     test(function() {
         var event = new UserProximityEvent(function test() {});
-        assert_equals(event.type, 'function test() {}');
+        assert_regex_match(event.type, /function test.+{\s?}/);
     }, 'type argument is function');
 
     test(function() {