summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/inspector/extensions/extensions-audits-api.html
blob: 603eb6dc95fdbdc9f4ecd66861a360a5292a4a26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<html>
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/extensions-test.js"></script>
<script src="../audits/audits-test.js"></script>
<script src="extensions-audits-tests.js"></script>

<script type="text/javascript">

function extension_testAuditsAPI(nextTest)
{
    function onStartAuditCategory(results)
    {
        output("category.onAuditStarted fired, results dump follows:");
        dumpObject(results);
        var node = results.createResult("Subtree");
        dumpObject(node);
        // Make sure dumpObject() pushes stuff through before we continue.
        evaluateOnFrontend("InspectorTest.runAfterPendingDispatches(reply)", function() {
            results.done();
        });
    }
    var category = webInspector.audits.addCategory("Extension audits");
    category.onAuditStarted.addListener(onStartAuditCategory);
    output("Added audit category, result dump follows:");
    dumpObject(category);
    extension_runAudits(nextTest);
}

</script>
</head>
<body onload="runTest()">
<p>Tests audits support in WebInspector Extensions API</p>
</body>
</html>