a2bc2803e86c73d61e63714f0e33a6bd4460367d
[WebKit-https.git] / LayoutTests / inspector / report-API-errors.html
1 <html>
2 <head>
3 <script src="../http/tests/inspector/inspector-test2.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     InspectorBackend.setMonitoringXHREnabled(1);
15     InspectorBackend.setMonitoringXHREnabled();
16     InspectorBackend.setMonitoringXHREnabled(true, "not a function");
17     InspectorBackend.setMonitoringXHREnabled(true, undefined);
18     InspectorBackend.setMonitoringXHREnabled(false, undefined);
19     WebInspector_syncDispatch('{"type": "event", "domain": "dom", "event": "something-strange", "data": {}}');
20
21     InspectorTest.completeTest();
22 }
23
24 </script>
25 </head>
26
27 <body onload="runTest()">
28 <p>
29 Tests that InspectorBackendStub is catching incorrect arguments.
30 </p>
31
32 </body>
33 </html>