blob: f1ccb0c73b4ffe45d85aed5c4ea5a7a09ac84c68 [file] [log] [blame]
<!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>