Bug 1291971 - Part 3, enable controller PresentationRequest_error test. r=smaug. draft
authorShih-Chiang Chien <schien@mozilla.com>
Fri, 28 Oct 2016 14:26:12 +0800
changeset 430814 65ed6e5c653530e2b4f8bb43628f3c60e7e997c4
parent 430813 b7c35259a04d1ba19a9e095349f7877c2d2aeeb8
child 430815 41fdcef117c34fe45588ee8f4f71f99ed2987748
push id33907
push userschien@mozilla.com
push dateFri, 28 Oct 2016 06:37:18 +0000
reviewerssmaug
bugs1291971
milestone52.0a1
Bug 1291971 - Part 3, enable controller PresentationRequest_error test. r=smaug. MozReview-Commit-ID: EvuU3Q1ui5t
testing/web-platform/meta/presentation-api/controlling-ua/PresentationRequest_error.html.ini
testing/web-platform/tests/presentation-api/controlling-ua/PresentationRequest_error.html
--- a/testing/web-platform/meta/presentation-api/controlling-ua/PresentationRequest_error.html.ini
+++ b/testing/web-platform/meta/presentation-api/controlling-ua/PresentationRequest_error.html.ini
@@ -1,20 +1,6 @@
 [PresentationRequest_error.html]
   type: testharness
-  [Call PresentationRequest() constructor without presentation URL. TypeError Exception expected.]
-    expected: FAIL
-
-  [Call PresentationRequest() constructor with null presentation URL. TypeError Exception expected.]
-    expected: FAIL
-
-  [Call PresentationRequest constructor with null presentation URL. TypeError Exception expected.]
-    expected: FAIL
-
-  [Call PresentationRequest constructor with an empty sequence. NotSupportedError Exception expected.]
-    expected: FAIL
-
-  [Call PresentationRequest constructor with an invalid URL. SyntaxError Exception expected.]
-    expected: FAIL
-
-  [Call PresentationRequest constructor with a sequence of URLs, one of them invalid. SyntaxError Exception expected.]
-    expected: FAIL
-
+  prefs: [dom.presentation.enabled: true,
+          dom.presentation.controller.enabled: true,
+          dom.presentation.discovery.enabled: true,
+          dom.presentation.device.name: "Firefox"]
--- a/testing/web-platform/tests/presentation-api/controlling-ua/PresentationRequest_error.html
+++ b/testing/web-platform/tests/presentation-api/controlling-ua/PresentationRequest_error.html
@@ -9,31 +9,25 @@
 
     test(function() {
         assert_throws(new TypeError(), function() {
             new PresentationRequest();
         });
     }, 'Call PresentationRequest() constructor without presentation URL. TypeError Exception expected.');
 
     test(function() {
-        assert_throws(new TypeError(), function() {
-            new PresentationRequest(null);
-        });
-    }, 'Call PresentationRequest constructor with null presentation URL. TypeError Exception expected.');
-
-    test(function() {
         assert_throws('NotSupportedError', function() {
             new PresentationRequest([]);
         });
     }, 'Call PresentationRequest constructor with an empty sequence. NotSupportedError Exception expected.');
 
     test(function() {
         assert_throws('SyntaxError', function() {
-            new PresentationRequest(':invalid');
+            new PresentationRequest('http://@');
         });
     }, 'Call PresentationRequest constructor with an invalid URL. SyntaxError Exception expected.');
 
     test(function() {
         assert_throws('SyntaxError', function() {
-            new PresentationRequest(['presentation.html', ':invalid']);
+            new PresentationRequest(['presentation.html', 'http://@']);
         });
     }, 'Call PresentationRequest constructor with a sequence of URLs, one of them invalid. SyntaxError Exception expected.');
-</script>
\ No newline at end of file
+</script>