| <html> |
| <head> |
| <script src="../http/tests/inspector/inspector-test2.js"></script> |
| <script src="extensions-test.js"></script> |
| <script type="text/javascript"> |
| |
| function extension_callback(nondetermenisticProps) |
| { |
| output("Got callback, arguments dump follows:"); |
| dumpObject(Array.prototype.slice.call(arguments, 1), nondetermenisticProps); |
| } |
| |
| function extension_testOnSelectionChanged(nextTest) |
| { |
| webInspector.panels.elements.onSelectionChanged.addListener(callbackAndNextTest(bind(extension_callback, null, null), nextTest)); |
| webInspector.inspectedWindow.evaluate("inspect(document.body.children[0])"); |
| } |
| |
| function extension_testOnResourceFinished(nextTest) |
| { |
| var nondetermenisticProps = { |
| har: 1, |
| id: 1 |
| }; |
| webInspector.resources.onFinished.addListener(callbackAndNextTest(bind(extension_callback, null, nondetermenisticProps), nextTest)); |
| webInspector.inspectedWindow.evaluate("var xhr = new XMLHttpRequest(); xhr.open('GET', '" + location.href + "', false); xhr.send(null);"); |
| } |
| |
| </script> |
| </head> |
| <body onload="runTest()"> |
| <p>Tests WebInspector extension API</p> |
| </body> |
| </html> |