| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 <html> | 
|  | 2 <head> | 
|  | 3 <script src="../../inspector/inspector-test.js"></script> | 
|  | 4 <script src="../../inspector/resources-test.js"></script> | 
|  | 5 <script src="../../inspector/resource-tree/resource-tree-test.js"></script> | 
|  | 6 <script> | 
|  | 7 function onload() | 
|  | 8 { | 
|  | 9     if (window.testRunner) { | 
|  | 10         testRunner.waitUntilDone(); | 
|  | 11         testRunner.showWebInspector(); | 
|  | 12     } | 
|  | 13     runTest(); | 
|  | 14 } | 
|  | 15 | 
|  | 16 function test() | 
|  | 17 { | 
|  | 18     InspectorTest.runAfterResourcesAreFinished(["main-resource-content-frame-utf
    8.php", "main-resource-content-frame.html"], step2) | 
|  | 19 | 
|  | 20     var resource; | 
|  | 21     function step2() | 
|  | 22     { | 
|  | 23         InspectorTest.addResult("Requesting content: "); | 
|  | 24         resource = InspectorTest.resourceMatchingURL("main-resource-content-fram
    e.html"); | 
|  | 25         PageAgent.getResourceContent(resource.frameId, resource.url, step3); | 
|  | 26     } | 
|  | 27 | 
|  | 28     function step3(error, content) | 
|  | 29     { | 
|  | 30         InspectorTest.assertTrue(!!content, "No content available."); | 
|  | 31         InspectorTest.addResult("Resource url: " + resource.url); | 
|  | 32         InspectorTest.addResult("Resource content: " + content); | 
|  | 33 | 
|  | 34         InspectorTest.addResult("Requesting utf8 content: "); | 
|  | 35         resource = InspectorTest.resourceMatchingURL("main-resource-content-fram
    e-utf8.php"); | 
|  | 36         PageAgent.getResourceContent(resource.frameId, resource.url, step4); | 
|  | 37     } | 
|  | 38 | 
|  | 39     function step4(error, content) | 
|  | 40     { | 
|  | 41         InspectorTest.assertTrue(!!content, "No content available."); | 
|  | 42         InspectorTest.addResult("Resource url: " + resource.url); | 
|  | 43         InspectorTest.addResult("Resource content: " + content); | 
|  | 44         InspectorTest.completeTest(); | 
|  | 45     } | 
|  | 46 } | 
|  | 47 </script> | 
|  | 48 </head> | 
|  | 49 <body onload="onload()"> | 
|  | 50 <iframe src="resources/main-resource-content-frame.html"></iframe> | 
|  | 51 <iframe src="resources/main-resource-content-frame-utf8.php"></iframe> | 
|  | 52 <p> | 
|  | 53 Tests main resource content is correctly loaded and decoded using correct encodi
    ng. | 
|  | 54 </p> | 
|  | 55 </body> | 
|  | 56 </html> | 
| OLD | NEW | 
|---|