2011-04-06 Ilya Tikhonovsky <loislo@chromium.org>
[WebKit-https.git] / LayoutTests / inspector / report-API-errors.html
1 <html>
2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script>
5
6 function test()
7 {
8
9     console.error = function()
10     {
11         InspectorTest.addResult(String.sprintf.apply(this, arguments));
12     }
13
14     ConsoleAgent.setMonitoringXHREnabled(1);
15     ConsoleAgent.setMonitoringXHREnabled();
16     ConsoleAgent.setMonitoringXHREnabled(false, "not a function");
17     ConsoleAgent.setMonitoringXHREnabled(false, undefined);
18     RuntimeAgent.evaluate("true", "test");
19     RuntimeAgent.evaluate("true", "test", function(){});
20     RuntimeAgent.evaluate("true", "test", undefined, function(){});
21     InspectorBackend.dispatch('{"method": "wrongDomain.something-strange", "params": {}}');
22     InspectorBackend.dispatch('{"method": "Inspector.something-strange", "params": {}}');
23
24     InspectorTest.completeTest();
25 }
26
27 </script>
28 </head>
29
30 <body onload="runTest()">
31 <p>
32 Tests that InspectorBackendStub is catching incorrect arguments.
33 </p>
34
35 </body>
36 </html>