mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1301966 - Prevent serviceWorker to modify response for sharedWorker and remove the second unexpected registration for the serviceWorker test. r=bkelly.
This commit is contained in:
parent
04e71c59d2
commit
8026a8d792
@ -3,4 +3,4 @@
|
||||
<pre id=log>Hello World</pre>
|
||||
<script>
|
||||
var worker = new SharedWorker('sharedWorker_fetch.js');
|
||||
</script>
|
||||
</script>
|
||||
|
@ -1,10 +1,8 @@
|
||||
addEventListener('fetch', function(event) {
|
||||
if (event.request.url.indexOf("fail.html") !== -1) {
|
||||
event.respondWith(fetch("serviceworker.html", {"integrity": "abc"}));
|
||||
event.respondWith(fetch("hello.html", {"integrity": "abc"}));
|
||||
} else if (event.request.url.indexOf("fake.html") !== -1) {
|
||||
event.respondWith(fetch("serviceworker.html"));
|
||||
} else {
|
||||
event.respondWith(new Response("Hello world"));
|
||||
event.respondWith(fetch("hello.html"));
|
||||
}
|
||||
});
|
||||
|
||||
|
9
dom/workers/test/serviceworkers/hello.html
Normal file
9
dom/workers/test/serviceworkers/hello.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
Hello.
|
||||
</body>
|
||||
<html>
|
@ -210,7 +210,7 @@ support-files =
|
||||
sw_bad_mime_type.js^headers^
|
||||
error_reporting_helpers.js
|
||||
fetch.js
|
||||
serviceworker.html
|
||||
hello.html
|
||||
create_another_sharedWorker.html
|
||||
sharedWorker_fetch.js
|
||||
|
||||
|
@ -27,5 +27,3 @@ onconnect = function(e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -175,4 +175,4 @@ add_task(function* test_integrity_sharedWorker() {
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user