зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1218433 - Use AsyncOpen2 in dom/workers/ScriptLoader.cpp - part 2 - WPT, r=sicking, r=Ms2ger
This commit is contained in:
Родитель
fe6be4c172
Коммит
36e922b9b7
|
@ -23,6 +23,12 @@
|
|||
page_id);
|
||||
worker.port.start();
|
||||
|
||||
worker.onerror = function(evt) {
|
||||
evt.preventDefault();
|
||||
window.parent.postMessage({id:page_id, message:"blocked"},
|
||||
'http://mochi.test:8888');
|
||||
}
|
||||
|
||||
worker.port.onmessage = function(ev) {
|
||||
window.parent.postMessage({id:page_id, message:"allowed"}, 'http://mochi.test:8888');
|
||||
};
|
||||
|
|
|
@ -13,6 +13,12 @@
|
|||
page_id);
|
||||
worker.port.start();
|
||||
|
||||
worker.onerror = function(evt) {
|
||||
evt.preventDefault();
|
||||
window.parent.postMessage({id:page_id, message:"blocked"},
|
||||
'http://mochi.test:8888');
|
||||
}
|
||||
|
||||
worker.port.onmessage = function(ev) {
|
||||
window.parent.postMessage({id:page_id, message:"allowed"},
|
||||
'http://mochi.test:8888');
|
||||
|
|
|
@ -18,6 +18,11 @@
|
|||
escape(shared_worker), page_id);
|
||||
worker.port.start();
|
||||
|
||||
worker.onerror = function(evt) {
|
||||
evt.preventDefault();
|
||||
window.parent.postMessage({id:page_id, message:"blocked"}, 'http://mochi.test:8888');
|
||||
}
|
||||
|
||||
worker.port.onmessage = function(ev) {
|
||||
window.parent.postMessage({id:page_id, message:"allowed"}, 'http://mochi.test:8888');
|
||||
};
|
||||
|
|
|
@ -24,11 +24,12 @@
|
|||
|
||||
worker.onerror = function(error) {
|
||||
var msg = error.message;
|
||||
if (msg.match(/^: NetworkError/)) {
|
||||
if (msg.match(/^: NetworkError/) || msg.match(/Failed to load script/)) {
|
||||
// this means CSP blocked it
|
||||
msg = "blocked";
|
||||
}
|
||||
window.parent.postMessage({id:page_id, message:msg}, 'http://mochi.test:8888');
|
||||
error.preventDefault();
|
||||
};
|
||||
|
||||
worker.onmessage = function(ev) {
|
||||
|
|
|
@ -8,9 +8,16 @@
|
|||
page_id = window.location.hash.substring(1);
|
||||
try {
|
||||
worker = new Worker('file_testserver.sjs?file='+escape("tests/dom/security/test/csp/file_child-src_worker.js"));
|
||||
|
||||
worker.onerror = function(e) {
|
||||
window.parent.postMessage({id:page_id, message:"blocked"}, 'http://mochi.test:8888');
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
worker.onmessage = function(ev) {
|
||||
window.parent.postMessage({id:page_id, message:"allowed"}, 'http://mochi.test:8888');
|
||||
};
|
||||
}
|
||||
|
||||
worker.postMessage('foo');
|
||||
}
|
||||
catch (e) {
|
||||
|
|
|
@ -8,9 +8,16 @@
|
|||
page_id = window.location.hash.substring(1);
|
||||
try {
|
||||
worker = new Worker('data:application/javascript;charset=UTF-8,'+escape('onmessage = function(e) { postMessage("worker"); };'));
|
||||
|
||||
worker.onerror = function(e) {
|
||||
window.parent.postMessage({id:page_id, message:"blocked"}, 'http://mochi.test:8888');
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
worker.onmessage = function(ev) {
|
||||
window.parent.postMessage({id:page_id, message:"allowed"}, 'http://mochi.test:8888');
|
||||
};
|
||||
}
|
||||
|
||||
worker.postMessage('foo');
|
||||
}
|
||||
catch (e) {
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[star-doesnt-match-blob.sub.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[opt-in-blocks.https.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[opt-in-blocks.https.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[opt-in-blocks.https.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[opt-in-blocks.https.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[opt-in-blocks.https.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[opt-in-blocks.https.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[opt-in-blocks.https.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[opt-in-blocks.https.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[no-opt-in-blocks.https.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[no-opt-in-blocks.https.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[no-opt-in-blocks.https.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[no-opt-in-blocks.https.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[no-opt-in-blocks.https.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[no-opt-in-blocks.https.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,4 @@
|
|||
[Worker_cross_origin_security_err.htm]
|
||||
type: testharness
|
||||
[ Worker cross-origin URL ]
|
||||
expected: FAIL
|
|
@ -1,8 +1,26 @@
|
|||
[same-origin.html]
|
||||
type: testharness
|
||||
|
||||
[unsupported_scheme]
|
||||
expected: FAIL
|
||||
|
||||
[javascript_url]
|
||||
expected: FAIL
|
||||
|
||||
[about_blank]
|
||||
expected: FAIL
|
||||
|
||||
[opera_com]
|
||||
expected: FAIL
|
||||
|
||||
[port_81]
|
||||
expected: FAIL
|
||||
|
||||
[https_port_80]
|
||||
expected: FAIL
|
||||
|
||||
[https_port_8000]
|
||||
expected: FAIL
|
||||
|
||||
[http_port_8012]
|
||||
expected: FAIL
|
||||
|
|
|
@ -6,3 +6,20 @@
|
|||
[javascript_url]
|
||||
expected: FAIL
|
||||
|
||||
[about_blank]
|
||||
expected: FAIL
|
||||
|
||||
[example_invalid]
|
||||
expected: FAIL
|
||||
|
||||
[port_81]
|
||||
expected: FAIL
|
||||
|
||||
[https_port_80]
|
||||
expected: FAIL
|
||||
|
||||
[https_port_8000]
|
||||
expected: FAIL
|
||||
|
||||
[http_post_8012]
|
||||
expected: FAIL
|
||||
|
|
Загрузка…
Ссылка в новой задаче