| 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 src="../resources-test.js"></script> | 4 <script src="../resources-test.js"></script> |
| 5 <script src="resource-tree-test.js"></script> | 5 <script src="resource-tree-test.js"></script> |
| 6 <link rel="stylesheet" href="resources/styles-initial.css"> | 6 <link rel="stylesheet" href="resources/styles-initial.css"> |
| 7 <script> | 7 <script> |
| 8 function createScriptTag() | 8 function createScriptTag() |
| 9 { | 9 { |
| 10 var scriptElement = document.createElement("script"); | 10 var scriptElement = document.createElement("script"); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 function step4() | 32 function step4() |
| 33 { | 33 { |
| 34 InspectorTest.NetworkAgent.setCacheDisabled(false, step5); | 34 InspectorTest.NetworkAgent.setCacheDisabled(false, step5); |
| 35 } | 35 } |
| 36 | 36 |
| 37 var resource; | 37 var resource; |
| 38 function step5() | 38 function step5() |
| 39 { | 39 { |
| 40 InspectorTest.addResult("Requesting content: "); | 40 InspectorTest.addResult("Requesting content: "); |
| 41 resource = InspectorTest.resourceMatchingURL("dynamic-script.js"); | 41 resource = InspectorTest.resourceMatchingURL("dynamic-script.js"); |
| 42 resource.requestContent(step6); | 42 resource.requestContent().then(step6); |
| 43 } | 43 } |
| 44 | 44 |
| 45 function step6(content) | 45 function step6(content) |
| 46 { | 46 { |
| 47 InspectorTest.assertTrue(!!content, "No content available."); | 47 InspectorTest.assertTrue(!!content, "No content available."); |
| 48 InspectorTest.addResult("Resource url: " + resource.url); | 48 InspectorTest.addResult("Resource url: " + resource.url); |
| 49 InspectorTest.addResult("Resource content: " + content); | 49 InspectorTest.addResult("Resource content: " + content); |
| 50 InspectorTest.completeTest(); | 50 InspectorTest.completeTest(); |
| 51 } | 51 } |
| 52 } | 52 } |
| 53 </script> | 53 </script> |
| 54 </head> | 54 </head> |
| 55 <body onload="runTest()"> | 55 <body onload="runTest()"> |
| 56 <p>Tests resource content is correctly loaded if Resource.requestContent was cal
led before network request was finished.</p> | 56 <p>Tests resource content is correctly loaded if Resource.requestContent was cal
led before network request was finished.</p> |
| 57 <a href="https://bugs.webkit.org/show_bug.cgi?id=90153">Bug 90153</a> | 57 <a href="https://bugs.webkit.org/show_bug.cgi?id=90153">Bug 90153</a> |
| 58 </body> | 58 </body> |
| 59 </html> | 59 </html> |
| OLD | NEW |