OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="../../http/tests/inspector/debugger-test.js"></script> | 4 <script src="../../http/tests/inspector/debugger-test.js"></script> |
5 <script> | 5 <script> |
6 function test() | 6 function test() |
7 { | 7 { |
8 var script; | 8 var script; |
9 | 9 |
10 InspectorTest.startDebuggerTest(waitForScripts); | 10 InspectorTest.startDebuggerTest(waitForScripts); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 dumpLiveLocationsCount(); | 46 dumpLiveLocationsCount(); |
47 | 47 |
48 linkifier.reset(); | 48 linkifier.reset(); |
49 InspectorTest.addResult("Reseted linkifier"); | 49 InspectorTest.addResult("Reseted linkifier"); |
50 dumpLiveLocationsCount(); | 50 dumpLiveLocationsCount(); |
51 | 51 |
52 linkifier.dispose(); | 52 linkifier.dispose(); |
53 InspectorTest.addResult("Disposed linkifier"); | 53 InspectorTest.addResult("Disposed linkifier"); |
54 dumpLiveLocationsCount(); | 54 dumpLiveLocationsCount(); |
55 | 55 |
| 56 // Ensures urls with lots of slashes does not bog down the regex. |
| 57 WebInspector.linkifyStringAsFragment("/".repeat(1000)); |
| 58 WebInspector.linkifyStringAsFragment("/a/".repeat(1000)); |
| 59 |
56 InspectorTest.completeTest(); | 60 InspectorTest.completeTest(); |
57 } | 61 } |
58 | 62 |
59 function dumpLiveLocationsCount() | 63 function dumpLiveLocationsCount() |
60 { | 64 { |
61 InspectorTest.addResult("Live locations count: " + WebInspector.debugger
WorkspaceBinding._ensureInfoForScript(script)._locations.size); | 65 InspectorTest.addResult("Live locations count: " + WebInspector.debugger
WorkspaceBinding._ensureInfoForScript(script)._locations.size); |
62 InspectorTest.addResult(""); | 66 InspectorTest.addResult(""); |
63 } | 67 } |
64 } | 68 } |
65 | 69 |
66 </script> | 70 </script> |
67 </head> | 71 </head> |
68 | 72 |
69 <body onload="runTest()"> | 73 <body onload="runTest()"> |
70 <p> | 74 <p> |
71 Tests that Linkifier works correctly. | 75 Tests that Linkifier works correctly. |
72 <p> | 76 <p> |
73 | 77 |
74 </body> | 78 </body> |
75 </html> | 79 </html> |
OLD | NEW |