1 <p>If this test runs without hanging, then it has passed. The visited link hash algorithm was N^
2 at one point and would hang.
</p>
5 <p id=
"result">TEST DID NOT RUN YET
</p>
10 testRunner
.dumpAsText();
12 var oneMillionSlashes
= "";
13 for (i
= 0; i
< 1000000; ++i
)
14 oneMillionSlashes
+= "/";
16 var oneMillionSlashesAndDots
= "";
17 for (i
= 0; i
< 333334; ++i
)
18 oneMillionSlashesAndDots
+= "/./";
20 var oneMillionSlashesAndDoubleDots
= "";
21 for (i
= 0; i
< 250000; ++i
)
22 oneMillionSlashesAndDoubleDots
+= "/../";
24 document
.getElementById("test1").innerHTML
= '<a href="about:test?slashes' + oneMillionSlashes
+ '">Link with tons of slashes</a>';
25 document
.getElementById("test2").innerHTML
= '<a href="about:test?slashes' + oneMillionSlashesAndDots
+ '">Link with tons of slashes with dots</a>';
26 document
.getElementById("test3").innerHTML
= '<a href="about:test?slashes' + oneMillionSlashesAndDoubleDots
+ '">Link with tons of slashes with double dots</a>';
28 // GC these large strings so that they don't cause the next test to timeout.
29 if (window
.GCController
) {
30 oneMillionSlashes
= null;
31 oneMillionSlashesAndDots
= null;
32 oneMillionSlashesAndDoubleDots
= null;
33 GCController
.collect();
36 document
.getElementById("result").firstChild
.data
= "TEST PASSED";