зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
c2ad97aaac
Коммит
07c7e1fe46
|
@ -1,8 +1,5 @@
|
|||
[script-src-1_9.html]
|
||||
type: testharness
|
||||
[test inline worker]
|
||||
expected: FAIL
|
||||
|
||||
[Violation report status OK.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -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('');
|
||||
|
|
Загрузка…
Ссылка в новой задаче