summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/inspector/report-API-errors.html
blob: b67025b763a8e7890b247addf5544c40ffa4aed1 (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
36
<html>
<head>
<script src="../http/tests/inspector/inspector-test.js"></script>
<script>

function test()
{

    console.error = function()
    {
        InspectorTest.addResult(String.sprintf.apply(this, arguments));
    }

    ConsoleAgent.setMonitoringXHREnabled(1);
    ConsoleAgent.setMonitoringXHREnabled();
    ConsoleAgent.setMonitoringXHREnabled(false, "not a function");
    ConsoleAgent.setMonitoringXHREnabled(false, undefined);
    RuntimeAgent.evaluate("true", "test");
    RuntimeAgent.evaluate("true", "test", function(){});
    RuntimeAgent.evaluate("true", "test", undefined, function(){});
    InspectorBackend.dispatch('{"method": "wrongDomain.something-strange", "params": {}}');
    InspectorBackend.dispatch('{"method": "Inspector.something-strange", "params": {}}');

    InspectorTest.completeTest();
}

</script>
</head>

<body onload="runTest()">
<p>
Tests that InspectorBackendStub is catching incorrect arguments.
</p>

</body>
</html>