| 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="../console-test.js"></script> | 4 <script src="../console-test.js"></script> |
| 5 <script src="../extensions-test.js"></script> | 5 <script src="../extensions-test.js"></script> |
| 6 <script src="../debugger-test.js"></script> | 6 <script src="../debugger-test.js"></script> |
| 7 <script type="text/javascript"> | 7 <script type="text/javascript"> |
| 8 function loadFrame() | 8 function loadFrame() |
| 9 { | 9 { |
| 10 var callback; | 10 var callback; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 function step2() | 169 function step2() |
| 170 { | 170 { |
| 171 webInspector.inspectedWindow.onResourceAdded.addListener(onResourceAdded
); | 171 webInspector.inspectedWindow.onResourceAdded.addListener(onResourceAdded
); |
| 172 webInspector.inspectedWindow.eval("addResource()"); | 172 webInspector.inspectedWindow.eval("addResource()"); |
| 173 } | 173 } |
| 174 | 174 |
| 175 function onResourceAdded(resource) | 175 function onResourceAdded(resource) |
| 176 { | 176 { |
| 177 if (resource.url.indexOf("test_func") === -1) | 177 if (resource.url.indexOf("test_func") === -1) |
| 178 return; | 178 return; |
| 179 if (resource.url.startsWith('debugger://')) |
| 180 return; |
| 179 output("resource added:"); | 181 output("resource added:"); |
| 180 dumpObject(Array.prototype.slice.call(arguments), { url: "url" }); | 182 dumpObject(Array.prototype.slice.call(arguments), { url: "url" }); |
| 181 webInspector.inspectedWindow.onResourceAdded.removeListener(onResourceAd
ded); | 183 webInspector.inspectedWindow.onResourceAdded.removeListener(onResourceAd
ded); |
| 182 | 184 |
| 183 evaluateOnFrontend("InspectorTest.resumeExecution(reply);", nextTest); | 185 evaluateOnFrontend("InspectorTest.resumeExecution(reply);", nextTest); |
| 184 } | 186 } |
| 185 } | 187 } |
| 186 | 188 |
| 187 function extension_testOpenResourceHandler(nextTest) | 189 function extension_testOpenResourceHandler(nextTest) |
| 188 { | 190 { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 206 script.src = "data:application/javascript," + escape("function test_func(){}
;"); | 208 script.src = "data:application/javascript," + escape("function test_func(){}
;"); |
| 207 document.head.appendChild(script); | 209 document.head.appendChild(script); |
| 208 } | 210 } |
| 209 | 211 |
| 210 </script> | 212 </script> |
| 211 </head> | 213 </head> |
| 212 <body onload="runTest()"> | 214 <body onload="runTest()"> |
| 213 <p>Tests resource-related methods of WebInspector extension API</p> | 215 <p>Tests resource-related methods of WebInspector extension API</p> |
| 214 </body> | 216 </body> |
| 215 </html> | 217 </html> |
| OLD | NEW |