Bug 1216858 - Enable as much of the WPT service worker CSP tests as we can; r=bkelly
☠☠ backed out by 2211286e2c15 ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 20 Oct 2015 23:53:19 -0400
changeset 304053 c851a2a63dfdc81905e8c96e3199195c066cb15a
parent 304052 2e4faf57a03b136b60db88deed366bf21497db81
child 304054 4dfb3e6470787d60558f27d70b6e447a865be65c
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly
bugs1216858
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1216858 - Enable as much of the WPT service worker CSP tests as we can; r=bkelly
testing/web-platform/mozilla/meta/service-workers/service-worker/service-worker-csp-connect.https.html.ini
testing/web-platform/mozilla/meta/service-workers/service-worker/service-worker-csp-default.https.html.ini
testing/web-platform/mozilla/meta/service-workers/service-worker/service-worker-csp-script.https.html.ini
testing/web-platform/mozilla/tests/service-workers/service-worker/resources/service-worker-csp-worker.py
--- a/testing/web-platform/mozilla/meta/service-workers/service-worker/service-worker-csp-connect.https.html.ini
+++ b/testing/web-platform/mozilla/meta/service-workers/service-worker/service-worker-csp-connect.https.html.ini
@@ -1,6 +1,7 @@
 [service-worker-csp-connect.https.html]
   type: testharness
-  expected: TIMEOUT
-  [CSP test for connect-src in ServiceWorkerGlobalScope]
-    expected: TIMEOUT
+  [Fetch test for connect-src]
+    expected: FAIL
+  [Redirected fetch test for connect-src]
+    expected: FAIL
 
--- a/testing/web-platform/mozilla/meta/service-workers/service-worker/service-worker-csp-default.https.html.ini
+++ b/testing/web-platform/mozilla/meta/service-workers/service-worker/service-worker-csp-default.https.html.ini
@@ -1,6 +1,9 @@
 [service-worker-csp-default.https.html]
   type: testharness
-  expected: TIMEOUT
-  [CSP test for default-src in ServiceWorkerGlobalScope]
-    expected: TIMEOUT
+  [importScripts test for default-src]
+    expected: FAIL
+  [Fetch test for default-src]
+    expected: FAIL
+  [Redirected fetch test for default-src]
+    expected: FAIL
 
deleted file mode 100644
--- a/testing/web-platform/mozilla/meta/service-workers/service-worker/service-worker-csp-script.https.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[service-worker-csp-script.https.html]
-  type: testharness
-  expected: TIMEOUT
-  [CSP test for script-src in ServiceWorkerGlobalScope]
-    expected: TIMEOUT
-
--- a/testing/web-platform/mozilla/tests/service-workers/service-worker/resources/service-worker-csp-worker.py
+++ b/testing/web-platform/mozilla/tests/service-workers/service-worker/resources/service-worker-csp-worker.py
@@ -3,42 +3,42 @@ importScripts('worker-testharness.js');
 importScripts('test-helpers.sub.js');
 importScripts('../resources/get-host-info.sub.js');
 
 var host_info = get_host_info();
 
 test(function() {
     var import_script_failed = false;
     try {
-      importScripts(host_info.HTTP_REMOTE_ORIGIN +
-        '/serviceworker/resources/empty.js');
+      importScripts(host_info.HTTPS_REMOTE_ORIGIN +
+        base_path() + 'empty.js');
     } catch(e) {
       import_script_failed = true;
     }
     assert_true(import_script_failed,
                 'Importing the other origins script should fail.');
   }, 'importScripts test for default-src');
 
 async_test(function(t) {
-    fetch(host_info.HTTP_REMOTE_ORIGIN +
-          '/serviceworker/resources/fetch-access-control.php?ACAOrigin=*',
+    fetch(host_info.HTTPS_REMOTE_ORIGIN +
+          base_path() + 'fetch-access-control.py?ACAOrigin=*',
           {mode: 'cors'})
       .then(function(response){
           assert_unreached('fetch should fail.');
         }, function(){
           t.done();
         })
       .catch(unreached_rejection(t));
   }, 'Fetch test for default-src');
 
 async_test(function(t) {
-    var REDIRECT_URL = host_info.HTTP_ORIGIN +
-      '/serviceworker/resources/redirect.php?Redirect=';
-    var OTHER_BASE_URL = host_info.HTTP_REMOTE_ORIGIN +
-      '/serviceworker/resources/fetch-access-control.php?'
+    var REDIRECT_URL = host_info.HTTPS_ORIGIN +
+      base_path() + 'redirect.py?Redirect=';
+    var OTHER_BASE_URL = host_info.HTTPS_REMOTE_ORIGIN +
+      base_path() + 'fetch-access-control.py?'
     fetch(REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL + 'ACAOrigin=*'),
           {mode: 'cors'})
       .then(function(response){
           assert_unreached('Redirected fetch should fail.');
         }, function(){
           t.done();
         })
       .catch(unreached_rejection(t));
@@ -49,42 +49,42 @@ importScripts('worker-testharness.js');
 importScripts('test-helpers.sub.js');
 importScripts('../resources/get-host-info.sub.js');
 
 var host_info = get_host_info();
 
 test(function() {
     var import_script_failed = false;
     try {
-      importScripts(host_info.HTTP_REMOTE_ORIGIN +
-        '/serviceworker/resources/empty.js');
+      importScripts(host_info.HTTPS_REMOTE_ORIGIN +
+        base_path() + 'empty.js');
     } catch(e) {
       import_script_failed = true;
     }
     assert_true(import_script_failed,
                 'Importing the other origins script should fail.');
   }, 'importScripts test for script-src');
 
 async_test(function(t) {
-    fetch(host_info.HTTP_REMOTE_ORIGIN +
-          '/serviceworker/resources/fetch-access-control.php?ACAOrigin=*',
+    fetch(host_info.HTTPS_REMOTE_ORIGIN +
+          base_path() + 'fetch-access-control.py?ACAOrigin=*',
           {mode: 'cors'})
       .then(function(response){
           t.done();
         }, function(){
           assert_unreached('fetch should not fail.');
         })
       .catch(unreached_rejection(t));
   }, 'Fetch test for script-src');
 
 async_test(function(t) {
-    var REDIRECT_URL = host_info.HTTP_ORIGIN +
-      '/serviceworker/resources/redirect.php?Redirect=';
-    var OTHER_BASE_URL = host_info.HTTP_REMOTE_ORIGIN +
-      '/serviceworker/resources/fetch-access-control.php?'
+    var REDIRECT_URL = host_info.HTTPS_ORIGIN +
+      base_path() + 'redirect.py?Redirect=';
+    var OTHER_BASE_URL = host_info.HTTPS_REMOTE_ORIGIN +
+      base_path() + 'fetch-access-control.py?'
     fetch(REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL + 'ACAOrigin=*'),
           {mode: 'cors'})
       .then(function(response){
           t.done();
         }, function(){
           assert_unreached('Redirected fetch should not fail.');
         })
       .catch(unreached_rejection(t));
@@ -95,42 +95,42 @@ importScripts('worker-testharness.js');
 importScripts('test-helpers.sub.js');
 importScripts('../resources/get-host-info.sub.js');
 
 var host_info = get_host_info();
 
 test(function() {
     var import_script_failed = false;
     try {
-      importScripts(host_info.HTTP_REMOTE_ORIGIN +
-        '/serviceworker/resources/empty.js');
+      importScripts(host_info.HTTPS_REMOTE_ORIGIN +
+        base_path() + 'empty.js');
     } catch(e) {
       import_script_failed = true;
     }
     assert_false(import_script_failed,
                  'Importing the other origins script should not fail.');
   }, 'importScripts test for connect-src');
 
 async_test(function(t) {
-    fetch(host_info.HTTP_REMOTE_ORIGIN +
-          '/serviceworker/resources/fetch-access-control.php?ACAOrigin=*',
+    fetch(host_info.HTTPS_REMOTE_ORIGIN +
+          base_path() + 'fetch-access-control.py?ACAOrigin=*',
           {mode: 'cors'})
       .then(function(response){
           assert_unreached('fetch should fail.');
         }, function(){
           t.done();
         })
       .catch(unreached_rejection(t));
   }, 'Fetch test for connect-src');
 
 async_test(function(t) {
-    var REDIRECT_URL = host_info.HTTP_ORIGIN +
-      '/serviceworker/resources/redirect.php?Redirect=';
-    var OTHER_BASE_URL = host_info.HTTP_REMOTE_ORIGIN +
-      '/serviceworker/resources/fetch-access-control.php?'
+    var REDIRECT_URL = host_info.HTTPS_ORIGIN +
+      base_path() + 'redirect.py?Redirect=';
+    var OTHER_BASE_URL = host_info.HTTPS_REMOTE_ORIGIN +
+      base_path() + 'fetch-access-control.py?'
     fetch(REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL + 'ACAOrigin=*'),
           {mode: 'cors'})
       .then(function(response){
           assert_unreached('Redirected fetch should fail.');
         }, function(){
           t.done();
         })
       .catch(unreached_rejection(t));