| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../inspector-test.js"></script> | |
| 4 <script src="../network-test.js"></script> | |
| 5 <script> | |
| 6 function loadData() | |
| 7 { | |
| 8 var worker = new Worker("resources/worker.js"); | |
| 9 worker.onmessage = workerLoaded; | |
| 10 } | |
| 11 | |
| 12 function workerLoaded(event) | |
| 13 { | |
| 14 console.log(event.data); | |
| 15 } | |
| 16 | |
| 17 function test() | |
| 18 { | |
| 19 // Since this test could be run together with other inspector backend cache | |
| 20 // tests, we need to reset size limits to default ones. | |
| 21 InspectorTest.resetInspectorResourcesData(step1); | |
| 22 | |
| 23 function step1() | |
| 24 { | |
| 25 InspectorTest.addConsoleSniffer(step2); | |
| 26 InspectorTest.evaluateInPage("loadData()"); | |
| 27 } | |
| 28 | |
| 29 function step2() | |
| 30 { | |
| 31 var request1 = WebInspector.panel("network").requests[WebInspector.panel
("network").requests.length - 1]; | |
| 32 InspectorTest.addResult(request1.url); | |
| 33 InspectorTest.addResult("resource.type: " + request1.type); | |
| 34 InspectorTest.addResult("resource.content before requesting content: " +
request1.content); | |
| 35 request1.requestContent(step3); | |
| 36 } | |
| 37 | |
| 38 function step3() | |
| 39 { | |
| 40 var request1 = WebInspector.panel("network").requests[WebInspector.panel
("network").requests.length - 1]; | |
| 41 InspectorTest.addResult("resource.content after requesting content: " +
request1.content); | |
| 42 | |
| 43 InspectorTest.completeTest(); | |
| 44 } | |
| 45 } | |
| 46 </script> | |
| 47 </head> | |
| 48 <body onload="runTest()"> | |
| 49 <p>Tests that worker content is available in network panel.</p> | |
| 50 <a href="https://bugs.webkit.org/show_bug.cgi?id=65929">Bug 65929</a> | |
| 51 </body> | |
| 52 </html> | |
| OLD | NEW |