Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 -->
5 <head>
6 <title>Test for URI Manipulation</title>
7 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
8 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
10 <script type="text/javascript">
11 function dotest1()
12 {
13 SimpleTest.waitForExplicitFinish();
14 var o = new URL("http://localhost/");
15 try { o.href = "foopy:bar:baz"; } catch(e) { }
16 o.protocol = "http:";
17 o.hostname;
18 try { o.href = "http://localhost/"; } catch(e) { }
19 ok(o.protocol, "http:");
20 dotest2();
21 }
23 function dotest2()
24 {
25 var o = new URL("http://www.mozilla.org/");
26 try {
27 o.href ="aaaaaaaaaaa:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
28 } catch(e) { }
29 o.hash = "#";
30 o.pathname = "/";
31 o.protocol = "http:";
32 try { o.href = "http://localhost/"; } catch(e) { }
33 ok(o.protocol, "http:");
34 SimpleTest.finish();
35 }
36 </script>
37 </head>
38 <body onload="dotest1();">
39 <p id="display"></p>
40 <div id="content" style="display: none"></div>
41 <pre id="test">
42 </pre>
43 </body>
44 </html>