test_bug448166.html (1139B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=448166 5 --> 6 <head> 7 <meta charset="utf-8" /> 8 <title>Test for Bug 448166</title> 9 <script src="/tests/SimpleTest/SimpleTest.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 11 </head> 12 <body> 13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=448166">Mozilla Bug 448166</a> 14 <p id="display"> 15 <a id="test" href="http://www.moz�illa.org">should not be Mozilla</a> 16 <a id="control" href="http://www.mozilla.org">should not be Mozilla</a> 17 </p> 18 <div id="content" style="display: none"> 19 20 </div> 21 <pre id="test"> 22 <script class="testbody" type="text/javascript"> 23 24 /** Test for Bug 448166 */ 25 isnot($("test").href, "http://www.mozilla.org/", 26 "Should notice unpaired surrogate"); 27 is($("test").href, "http://www.moz�illa.org", 28 "URL parser fails. Href returns original input string"); 29 30 SimpleTest.doesThrow(() => { new URL($("test").href);}, "URL parser rejects input"); 31 32 is($("control").href, "http://www.mozilla.org/", 33 "Just making sure .href works"); 34 35 </script> 36 </pre> 37 </body> 38 </html>