| 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 type="text/javascript"> | 4 <script type="text/javascript"> |
| 5 | 5 |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 function parseAndDumpURL(url) | 8 function parseAndDumpURL(url) |
| 9 { | 9 { |
| 10 var parsedURL = new Common.ParsedURL(url); | 10 var parsedURL = new Common.ParsedURL(url); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 parseAndDumpURL("http://example.com//foo/bar.html"); | 32 parseAndDumpURL("http://example.com//foo/bar.html"); |
| 33 parseAndDumpURL("http://example.com/foo//bar.html"); | 33 parseAndDumpURL("http://example.com/foo//bar.html"); |
| 34 parseAndDumpURL("http://example.com//foo//bar.html"); | 34 parseAndDumpURL("http://example.com//foo//bar.html"); |
| 35 parseAndDumpURL("http://example.com//foo/bar/baz.html"); | 35 parseAndDumpURL("http://example.com//foo/bar/baz.html"); |
| 36 parseAndDumpURL("http://example.com/foo//bar/baz.html"); | 36 parseAndDumpURL("http://example.com/foo//bar/baz.html"); |
| 37 parseAndDumpURL("http://example.com/foo/bar//baz.html"); | 37 parseAndDumpURL("http://example.com/foo/bar//baz.html"); |
| 38 parseAndDumpURL("http://example.com///foo/bar/baz.html"); | 38 parseAndDumpURL("http://example.com///foo/bar/baz.html"); |
| 39 parseAndDumpURL("http://example.com/foo////bar/baz.html"); | 39 parseAndDumpURL("http://example.com/foo////bar/baz.html"); |
| 40 parseAndDumpURL("http://example.com/foo/bar/////baz.html"); | 40 parseAndDumpURL("http://example.com/foo/bar/////baz.html"); |
| 41 | 41 |
| 42 function testSplitLineColumn(url) { |
| 43 var result = Common.ParsedURL.splitLineAndColumn(url); |
| 44 |
| 45 InspectorTest.addResult("Splitting url: " + url); |
| 46 InspectorTest.addResult(" URL: " + result.url); |
| 47 InspectorTest.addResult(" Line: " + result.lineNumber); |
| 48 InspectorTest.addResult(" Column: " + result.columnNumber); |
| 49 } |
| 50 |
| 51 testSplitLineColumn("http://www.chromium.org"); |
| 52 testSplitLineColumn("http://www.chromium.org:8000"); |
| 53 testSplitLineColumn("http://www.chromium.org:8000/"); |
| 54 testSplitLineColumn("http://www.chromium.org:8000/foo.js:10"); |
| 55 testSplitLineColumn("http://www.chromium.org:8000/foo.js:10:20"); |
| 56 testSplitLineColumn("http://www.chromium.org/foo.js:10"); |
| 57 testSplitLineColumn("http://www.chromium.org/foo.js:10:20"); |
| 58 |
| 42 InspectorTest.completeTest(); | 59 InspectorTest.completeTest(); |
| 43 } | 60 } |
| 44 | 61 |
| 45 </script> | 62 </script> |
| 46 </head> | 63 </head> |
| 47 <body onload="runTest()"> | 64 <body onload="runTest()"> |
| 48 <p>Tests inspector ParsedURL class</p> | 65 <p>Tests inspector ParsedURL class</p> |
| 49 </body> | 66 </body> |
| 50 </html> | 67 </html> |
| OLD | NEW |