| <html> |
| <head> |
| <script src="../inspector-test.js"></script> |
| <script src="../network-test.js"></script> |
| <script> |
| function loadData() |
| { |
| var worker = new Worker("resources/worker.js"); |
| worker.onmessage = workerLoaded; |
| } |
| |
| function workerLoaded(event) |
| { |
| console.log(event.data); |
| } |
| |
| function test() |
| { |
| // Since this test could be run together with other inspector backend cache |
| // tests, we need to reset size limits to default ones. |
| InspectorTest.resetInspectorResourcesData(step1); |
| |
| function step1() |
| { |
| InspectorTest.addConsoleSniffer(step2); |
| InspectorTest.evaluateInPage("loadData()"); |
| } |
| |
| function step2() |
| { |
| var request1 = WebInspector.panel("network").requests[WebInspector.panel("network").requests.length - 1]; |
| InspectorTest.addResult(request1.url); |
| InspectorTest.addResult("resource.type: " + request1.type); |
| InspectorTest.addResult("resource.content before requesting content: " + request1.content); |
| request1.requestContent(step3); |
| } |
| |
| function step3() |
| { |
| var request1 = WebInspector.panel("network").requests[WebInspector.panel("network").requests.length - 1]; |
| InspectorTest.addResult("resource.content after requesting content: " + request1.content); |
| |
| InspectorTest.completeTest(); |
| } |
| } |
| </script> |
| </head> |
| <body onload="runTest()"> |
| <p>Tests that worker content is available in network panel.</p> |
| <a href="https://bugs.webkit.org/show_bug.cgi?id=65929">Bug 65929</a> |
| </body> |
| </html> |