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:
Tom Tung 2016-09-26 09:54:10 +08:00
parent 04e71c59d2
commit 8026a8d792
6 changed files with 14 additions and 9 deletions

View File

@ -3,4 +3,4 @@
<pre id=log>Hello World</pre>
<script>
var worker = new SharedWorker('sharedWorker_fetch.js');
</script>
</script>

View File

@ -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"));
}
});

View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
Hello.
</body>
<html>

View File

@ -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

View File

@ -27,5 +27,3 @@ onconnect = function(e) {
}
}
}

View File

@ -175,4 +175,4 @@ add_task(function* test_integrity_sharedWorker() {
</script>
</body>
</html>
</html>