testing/web-platform/tests/html/browsers/the-window-object/window-open-invalid-url.html
author Morgan Reschenberg <mreschenberg@mozilla.com>
Tue, 18 Jan 2022 23:31:21 +0000
changeset 605085 4c684d5d16fe3a85614e7cb56be8c0029dc98b12
parent 542247 44eb7126903eda04f6f6a837e988a2ef286aeb5b
permissions -rw-r--r--
Bug 1748878: Use LayoutDeviceInt types for points, rects, sizes in dev pixels r=Jamie,emilio a=graft Differential Revision: https://phabricator.services.mozilla.com/D135272

<!doctype html>
<meta charset=utf-8>
<title>window.open() with an invalid URL</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
test(() => {
  assert_throws_dom("SyntaxError", () => window.open("https://example.com\u0000mozilla.org"));
}, "Window.open should throw SyntaxError when an invalid url is passed as the first parameter");
</script>