| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../inspector-test.js"></script> | 3 <script src="../inspector-test.js"></script> |
| 4 <script> | 4 <script> |
| 5 function test() | 5 function test() |
| 6 { | 6 { |
| 7 function createNetworkRequestForURLAndDumpNameAndPath(url) | 7 function createNetworkRequestForURLAndDumpNameAndPath(url) |
| 8 { | 8 { |
| 9 InspectorTest.addResult("Dumping request name and path for url: " + url)
; | 9 InspectorTest.addResult("Dumping request name and path for url: " + url)
; |
| 10 var request = new WebInspector.NetworkRequest(WebInspector.targetManager
.activeTarget(), 0, url); | 10 var request = new WebInspector.NetworkRequest(WebInspector.targetManager
.mainTarget(), 0, url); |
| 11 InspectorTest.addResult(" name = " + request.name()); | 11 InspectorTest.addResult(" name = " + request.name()); |
| 12 InspectorTest.addResult(" path = " + request.path()); | 12 InspectorTest.addResult(" path = " + request.path()); |
| 13 } | 13 } |
| 14 | 14 |
| 15 createNetworkRequestForURLAndDumpNameAndPath("http://www.example.com/foo/bar
/baz?key=value"); | 15 createNetworkRequestForURLAndDumpNameAndPath("http://www.example.com/foo/bar
/baz?key=value"); |
| 16 createNetworkRequestForURLAndDumpNameAndPath("http://www.example.com/foo/bar
/?key=value"); | 16 createNetworkRequestForURLAndDumpNameAndPath("http://www.example.com/foo/bar
/?key=value"); |
| 17 createNetworkRequestForURLAndDumpNameAndPath("http://www.example.com/foo/bar
/baz"); | 17 createNetworkRequestForURLAndDumpNameAndPath("http://www.example.com/foo/bar
/baz"); |
| 18 createNetworkRequestForURLAndDumpNameAndPath("http://www.example.com/foo/bar
/"); | 18 createNetworkRequestForURLAndDumpNameAndPath("http://www.example.com/foo/bar
/"); |
| 19 | 19 |
| 20 createNetworkRequestForURLAndDumpNameAndPath("http://www.example.com/baz?key
=value"); | 20 createNetworkRequestForURLAndDumpNameAndPath("http://www.example.com/baz?key
=value"); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 35 InspectorTest.completeTest(); | 35 InspectorTest.completeTest(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 </script> | 38 </script> |
| 39 </head> | 39 </head> |
| 40 <body onload="runTest()"> | 40 <body onload="runTest()"> |
| 41 <p>Tests name() and path() methods of NetworkRequest.</p> | 41 <p>Tests name() and path() methods of NetworkRequest.</p> |
| 42 <a href="https://bugs.webkit.org/show_bug.cgi?id=101064">Bug 101064</a> | 42 <a href="https://bugs.webkit.org/show_bug.cgi?id=101064">Bug 101064</a> |
| 43 </body> | 43 </body> |
| 44 </html> | 44 </html> |
| OLD | NEW |