Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / report-protocol-errors.html
blob46e0ec9840c6347d6fc6a5e624b13e873c244177
1 <html>
2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script>
6 function test()
8 var messages = [
9 'some wrong string',
10 '{}',
11 '{"id":"not a number"}',
12 '{"id":1,"method":1}',
13 '{"id":2,"method":"resourceContent"}',
14 '{"id":3,"method":"DOM.test"}',
15 '{"id":4,"method":"Page.getResourceContent"}',
16 '{"id":5,"method":"Page.getResourceContent","params":[]}',
17 '{"id":6,"method":"Page.getResourceContent","params":{}}',
18 '{"id":7,"method":"Page.getResourceContent","params":{"frameId":"not a number"}}',
19 '{"id":8,"method":"Page.test"}',
20 '{"id":9,"method":"Page.test" }',
21 '{"id":10,"method": "Page.test" }',
22 '{"id":11,"method" : "Page.test" }',
23 '{"id":12, "method" : "Page.test" }',
24 '{"id": 13, "method" : "Page.test" }',
25 '{"id" : 14, "method" : "Page.test" }',
26 '{ "id" : 15, "method" : "Page.test" }',
27 '{ "id"\n :\r 16,\t "method" : "Page.test" }',
30 var numberOfReports = 0;
32 InspectorBackendClass.reportProtocolError = function(error, message)
34 if (numberOfReports < messages.length) {
35 InspectorTest.addObject(message);
36 InspectorTest.addResult("-------------------------------------------------------");
39 if (++numberOfReports === messages.length)
40 InspectorTest.completeTest();
43 function fire() {
44 for (var i = 0; i < messages.length; ++i)
45 InspectorFrontendHost.sendMessageToBackend(messages[i]);
48 InspectorTest.DebuggerAgent.disable(fire);
51 </script>
52 </head>
54 <body onload="runTest()">
55 <p>
56 Tests that InspectorBackendDispatcher is catching incorrect messages.
57 </p>
59 </body>
60 </html>