4 https://bugzilla.mozilla.org/show_bug.cgi?id=926890
8 <title>Test for Bug
926890</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=926890">Mozilla Bug
926890</a>
15 <div id=
"content" style=
"display: none">
16 <iframe name=
"x" id=
"x"></iframe>
17 <iframe name=
"y" id=
"y"></iframe>
21 <script type=
"application/javascript">
24 var url = new URL(
"http://www.example.com");
25 ok(url,
"URL created");
29 ok(false,
"url.href = 42 should throw");
31 ok(true,
"url.href = 42 should throw");
32 ok(e instanceof TypeError,
"error type typeError");
35 url.href =
"http://www.example.org";
36 ok(true,
"url.href should not throw");
40 ok(false,
"new URL(42) should throw");
42 ok(true,
"new URL(42) should throw");
43 ok(e instanceof TypeError,
"error type typeError");
47 new URL(
"http://www.example.com",
"42");
48 ok(false,
"new URL(something, 42) should throw");
50 ok(true,
"new URL(something, 42) should throw");
51 ok(e instanceof TypeError,
"error type typeError");