Bug 1086999 - CSP: Asterisk (*) wildcard should not allow blob:, data:, or filesystem: when matching source expressions - web platform test update (r=sstamm,jgraham)

This commit is contained in:
Christoph Kerschbaumer 2015-03-11 17:16:13 -07:00
parent cd8e38c959
commit d8313031ae
2 changed files with 7 additions and 10 deletions

View File

@ -1,8 +1,5 @@
[script-src-1_9.html]
type: testharness
[test inline worker]
expected: FAIL
[Violation report status OK.]
expected: FAIL

View File

@ -1,20 +1,20 @@
(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('');