Bug 1086999 - CSP: Asterisk (*) wildcard should not allow blob:, data:, or filesystem: when matching source expressions - web platform test update (r=sstamm,jgraham)
☠☠ backed out by 84f7fa96af4f ☠ ☠
authorChristoph Kerschbaumer <mozilla@christophkerschbaumer.com>
Wed, 11 Mar 2015 17:16:13 -0700
changeset 265393 772945b1130d44087ad2009c3112cb69e307549e
parent 265392 cb83b6efa9ea1c9fd68725add50252df0670cf2b
child 265394 7a3189057b78fe75b3623f7b63e570f4bb6328c4
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstamm, jgraham
bugs1086999
milestone39.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 1086999 - CSP: Asterisk (*) wildcard should not allow blob:, data:, or filesystem: when matching source expressions - web platform test update (r=sstamm,jgraham)
testing/web-platform/meta/content-security-policy/script-src/script-src-1_9.html.ini
testing/web-platform/tests/content-security-policy/script-src/buildInlineWorker.js
--- a/testing/web-platform/meta/content-security-policy/script-src/script-src-1_9.html.ini
+++ b/testing/web-platform/meta/content-security-policy/script-src/script-src-1_9.html.ini
@@ -1,8 +1,5 @@
 [script-src-1_9.html]
   type: testharness
-  [test inline worker]
-    expected: FAIL
-
   [Violation report status OK.]
     expected: FAIL
 
--- a/testing/web-platform/tests/content-security-policy/script-src/buildInlineWorker.js
+++ b/testing/web-platform/tests/content-security-policy/script-src/buildInlineWorker.js
@@ -1,21 +1,21 @@
 (function ()
 {
- var test = new async_test("test inline worker");
  var workerSource = document.getElementById('inlineWorker');
-
  var blob = new Blob([workerSource.textContent]);
 
  // can I create a new script tag like this? ack...
  var url = window.URL.createObjectURL(blob);
 
- var worker = new Worker(url);
+ try {
+   var worker = new Worker(url);
+ }
+ catch (e) {
+   done();
+ }
 
  worker.addEventListener('message', function(e) {
-    test.step(function () {
-        assert_not_equals(e.data, 'fail', 'inline script ran');
-        test.done();
-    })
+   assert_unreached("script ran");
  }, false);
 
  worker.postMessage('');
 })();