OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../inspector-test.js"></script> |
| 4 <script> |
| 5 function test() |
| 6 { |
| 7 function testLoadForURL(url, next) |
| 8 { |
| 9 InspectorTest.addResult("Loading resource from " + url); |
| 10 NetworkAgent.loadResourceForFrontend(WebInspector.resourceTreeModel.main
Frame.id, url, callback); |
| 11 |
| 12 function callback(error, content) |
| 13 { |
| 14 if (error) |
| 15 InspectorTest.addResult("Failed: " + error); |
| 16 else |
| 17 InspectorTest.addResult("Success: " + content); |
| 18 next(); |
| 19 } |
| 20 } |
| 21 |
| 22 InspectorTest.runTestSuite([ |
| 23 function testLocalResource(next) |
| 24 { |
| 25 testLoadForURL("file:///", next); |
| 26 }, |
| 27 |
| 28 function testNetworkResource(next) |
| 29 { |
| 30 testLoadForURL("http://localhost:8080/inspector/network/resources/re
source.php", next); |
| 31 }, |
| 32 ]); |
| 33 } |
| 34 </script> |
| 35 </head> |
| 36 <body onload="runTest()"> |
| 37 </body> |
| 38 </html> |
OLD | NEW |