Web Inspector: [Extensions API] add audit formatters for remote objects and DOM elements
[WebKit-https.git] / LayoutTests / inspector / extensions / extensions-audits-api.html
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/extensions-test.js"></script>
5 <script src="../audits/audits-test.js"></script>
6 <script src="extensions-audits-tests.js"></script>
7
8 <script type="text/javascript">
9
10 function extension_testAuditsAPI(nextTest)
11 {
12     function onStartAuditCategory(results)
13     {
14         output("category.onAuditStarted fired, results dump follows:");
15         dumpObject(results);
16         var node = results.createResult("Subtree");
17         dumpObject(node);
18         // Make sure dumpObject() pushes stuff through before we continue.
19         evaluateOnFrontend("InspectorTest.runAfterPendingDispatches(reply)", function() {
20             results.done();
21         });
22     }
23     var category = webInspector.audits.addCategory("Extension audits", 20);
24     category.onAuditStarted.addListener(onStartAuditCategory);
25     output("Added audit category, result dump follows:");
26     dumpObject(category);
27     extension_runAudits(nextTest);
28 }
29
30 </script>
31 </head>
32 <body onload="runTest()">
33 <p>Tests audits support in WebInspector Extensions API</p>
34 </body>
35 </html>