blob: 76fa870558a3f4055317c211ec7caf33406b3f17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/helpers.js"></script>
<script>
promise_test(async t => {
await assertBothRejectDOM(t, navigation.reload({ state: new WritableStream() }), "DataCloneError");
assert_equals(navigation.currentEntry.getState(), undefined);
assert_equals(location.hash, "");
}, "reload() with an unserializable state (WritableStream)");
promise_test(async t => {
// See https://github.com/whatwg/html/issues/5380 for why not `new SharedArrayBuffer()`
const buffer = new WebAssembly.Memory({ shared:true, initial:1, maximum:1 }).buffer;
await assertBothRejectDOM(t, navigation.reload({ state: buffer }), "DataCloneError");
assert_equals(navigation.currentEntry.getState(), undefined);
assert_equals(location.hash, "");
}, "reload() with an unserializable state (SharedArrayBuffer)");
</script>
|