forked from mirrors/gecko-dev
Automatic update from web-platform-tests App history API to navigation API rename (2/n) See https://github.com/WICG/navigation-api/issues/83 and https://github.com/WICG/navigation-api/pull/203 for context. This CL renames all test files, with occasional minor updates to their contents. Notably this includes web platform test files. While doing so, some of the web platform tests were slightly moved around to give a clearer directory structure. This revealed some confusing duplication (and in some cases mislocated tests) around state updates, which is tracked in https://crbug.com/1304446. Bug: 1300246 Change-Id: Ieef0329e7a309c242b5391f050878bc182487905 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3510194 Reviewed-by: Nate Chapin <japhet@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Commit-Queue: Domenic Denicola <domenic@chromium.org> Cr-Commit-Position: refs/heads/main@{#980702} -- wpt-commits: 4e628b145e52797f421c7f832d13014387aac961 wpt-pr: 33182
29 lines
1.1 KiB
HTML
29 lines
1.1 KiB
HTML
<!doctype html>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<iframe id="iframe" src="/common/blank.html"></iframe>
|
|
|
|
<script>
|
|
setup({ explicit_done: true });
|
|
|
|
window.onload = () => {
|
|
test(() => {
|
|
assert_throws_dom("DataCloneError", iframe.contentWindow.DOMException, () => {
|
|
iframe.contentWindow.navigation.updateCurrentEntry({ state: new WritableStream() });
|
|
});
|
|
assert_equals(navigation.currentEntry.getState(), undefined);
|
|
}, "updateCurrentEntry() must throw if state is unserializable (WritableStream)");
|
|
|
|
test(() => {
|
|
// 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;
|
|
|
|
assert_throws_dom("DataCloneError", iframe.contentWindow.DOMException, () => {
|
|
iframe.contentWindow.navigation.updateCurrentEntry({ state: buffer });
|
|
});
|
|
assert_equals(navigation.currentEntry.getState(), undefined);
|
|
}, "updateCurrentEntry() must throw if state is unserializable (SharedArrayBuffer)");
|
|
|
|
done();
|
|
};
|
|
</script>
|