Bug 1398484 P2 Add a WPT test that verifies importScripts() can be redirected. r=baku

This commit is contained in:
Ben Kelly 2017-09-13 05:53:59 -07:00
Родитель f43590de33
Коммит 3f5330962d
4 изменённых файлов: 48 добавлений и 0 удалений

Просмотреть файл

@ -305859,6 +305859,16 @@
{}
]
],
"service-workers/service-worker/resources/import-scripts-redirect-import.js": [
[
{}
]
],
"service-workers/service-worker/resources/import-scripts-redirect-worker.js": [
[
{}
]
],
"service-workers/service-worker/resources/import-scripts-resource-map-worker.js": [
[
{}
@ -374804,6 +374814,12 @@
{}
]
],
"service-workers/service-worker/import-scripts-redirect.https.html": [
[
"/service-workers/service-worker/import-scripts-redirect.https.html",
{}
]
],
"service-workers/service-worker/import-scripts-resource-map.https.html": [
[
"/service-workers/service-worker/import-scripts-resource-map.https.html",
@ -620403,6 +620419,10 @@
"5c17042fa54cd1fdba6f7aae513412d4a223b432",
"testharness"
],
"service-workers/service-worker/import-scripts-redirect.https.html": [
"4ff11da0e7ae6745232a8202cd67edaf6c5497d1",
"testharness"
],
"service-workers/service-worker/import-scripts-resource-map.https.html": [
"6bc46467c667f942fd30de063806474e8c94cff0",
"testharness"
@ -621199,6 +621219,14 @@
"95d29c9b8749cabf795d9a867e260827a8360640",
"support"
],
"service-workers/service-worker/resources/import-scripts-redirect-import.js": [
"34472e2e6dac507ca6c937f3ce872d0b5718b89a",
"support"
],
"service-workers/service-worker/resources/import-scripts-redirect-worker.js": [
"f29c77e2c504ba8e5a72c260233f6deba76dfb5d",
"support"
],
"service-workers/service-worker/resources/import-scripts-resource-map-worker.js": [
"bafc81b044c2a52f4ceefcd15a0b8b3c7553146e",
"support"

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Tests for importScripts: redirect</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/test-helpers.sub.js"></script>
<body>
<script>
promise_test(async t => {
const scope = 'resources/import-scripts-redirect';
await service_worker_unregister(t, scope);
let reg = await navigator.serviceWorker.register(
'resources/import-scripts-redirect-worker.js', { scope: scope });
assert_not_equals(reg.installing, null, 'worker is installing');
await reg.unregister();
}, 'importScripts() supports redirects');
</script>
</body>

Просмотреть файл

@ -0,0 +1 @@
// empty script

Просмотреть файл

@ -0,0 +1 @@
importScripts('redirect.py?Redirect=import-scripts-redirect-import.js');