blob: 20b554b4642630bbb24bf4cce1c8de9446f9cb07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<!DOCTYPE html>
<title>Location of a page in a Web Bundle</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<body>
<script>
promise_test(async (t) => {
const location_promise = new Promise((resolve, reject) => {
let win = null;
window.addEventListener(
'message',
(event) => {
win.close();
resolve(event.data.location);
}, false);
win = window.open(
get_host_info().HTTPS_ORIGIN + '/web-bundle/resources/wbn/location.wbn',
'_blank');
if (!win) {
reject('Popup could not be opened');
}
});
assert_equals(
await location_promise,
get_host_info().HTTPS_ORIGIN + '/web-bundle/resources/wbn/location.html');
}, 'Location of a page in a Web Bundle');
</script>
</body>
|