adapted to new error handling defined in spec
authorDominique Hazael-Massieux <dom@w3.org>
Thu, 30 May 2013 17:05:18 +0200
changeset 43 6ec7059e6d84
parent 42 2a310d1bb1da
child 44 2471db09c650
adapted to new error handling defined in spec
submitted/W3C/deny.html
--- a/submitted/W3C/deny.html	Thu May 30 16:16:37 2013 +0200
+++ b/submitted/W3C/deny.html	Thu May 30 17:05:18 2013 +0200
@@ -17,14 +17,16 @@
 <script src=featuredetection.js></script>
 <script src=prefix.js></script>
 <script>
-var t = async_test("Tests that the error callback is triggered when permission is denied");
+var t = async_test("Tests that the error callback is triggered when permission is denied", {timeout:10000});
 t.step(function() {
   navigator.getUserMedia({video: true}, t.step_func(function (stream) {
     assert_unreached("The success callback should not be triggered since access is to be denied");
     t.done();
   }),
   t.step_func(function (error) {
-    assert_equals(error.code, 1, "Error code 1 is returned for permission denied");
+    console.log(error);
+    assert_equals(error.name, "PermissionDenied", "Permission denied error returned");
+    assert_equals(error.constraintName, null, "constraintName attribute not set for permission denied");    
     t.done();
   }));
 });