<!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 => { | |
appHistory.onnavigate = t.unreached_func("onnavigate"); | |
await assertBothRejectDOM(t, appHistory.navigate("https://example.com\u0000mozilla.org", { state: document.body }), "SyntaxError"); | |
}, `navigate() with an invalid URL and unserializable state throws "SyntaxError", not "DataCloneError"`); | |
</script> |