|
Lines 5-10
a/LayoutTests/http/wpt/service-workers/cache-control-request.html_sec1
|
| 5 |
<script src="/resources/testharnessreport.js"></script> |
5 |
<script src="/resources/testharnessreport.js"></script> |
| 6 |
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script> |
6 |
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script> |
| 7 |
<script src="/common/get-host-info.sub.js"></script> |
7 |
<script src="/common/get-host-info.sub.js"></script> |
|
|
8 |
<script src="/common/utils.js"></script> |
| 8 |
</head> |
9 |
</head> |
| 9 |
<body> |
10 |
<body> |
| 10 |
<script> |
11 |
<script> |
|
Lines 33-38
promise_test(async (test) => {
a/LayoutTests/http/wpt/service-workers/cache-control-request.html_sec2
|
| 33 |
assert_not_equals(await response.text(), "no cache-control header"); |
34 |
assert_not_equals(await response.text(), "no cache-control header"); |
| 34 |
iframe.remove(); |
35 |
iframe.remove(); |
| 35 |
}, "Ensure cache-control does not break service worker fetch handling"); |
36 |
}, "Ensure cache-control does not break service worker fetch handling"); |
|
|
37 |
|
| 38 |
promise_test(async (test) => { |
| 39 |
const iframe = await with_iframe("resources/empty.html"); |
| 40 |
|
| 41 |
const id = token(); |
| 42 |
const blob = new Blob(["test"], { type: "application/badabaoo" }); |
| 43 |
|
| 44 |
iframe.contentWindow.navigator.sendBeacon(get_host_info().HTTP_REMOTE_ORIGIN + "/WebKit/service-workers/resources/cross-origin-allow-for-beacon.py?token=" + id, blob); |
| 45 |
await new Promise(resolve => setTimeout(resolve, 50)); |
| 46 |
|
| 47 |
const response = await fetch("/WebKit/service-workers/resources/cross-origin-allow-for-beacon.py?token=" + id); |
| 48 |
assert_equals(await response.text(), "preflight ok"); |
| 49 |
|
| 50 |
iframe.remove(); |
| 51 |
}, "Ensure beacon headers are not broken by service worker fetch handling"); |
| 36 |
</script> |
52 |
</script> |
| 37 |
</body> |
53 |
</body> |
| 38 |
</html> |
54 |
</html> |