Bug 44947

Summary: Web Inspector: The parser of Inspector protocol messages should be covered by a test.
Product: WebKit Reporter: Ilya Tikhonovsky <loislo>
Component: Web Inspector (Deprecated)Assignee: Ilya Tikhonovsky <loislo>
Status: RESOLVED FIXED    
Severity: Normal CC: bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 44875    
Bug Blocks:    
Attachments:
Description Flags
[patch] initial version.
none
[patch] initial version. Just missed the test. yurys: review+

Description Ilya Tikhonovsky 2010-08-31 07:09:20 PDT
The inspector protocol is based on messages in JSON format.
Each message should be a JSON object with a number of properties.
InspectorBackendDispatcher is parsing these messages and should be able to detect wrong formatted messages.
It has these functionality but no tests for it.
Comment 1 Ilya Tikhonovsky 2010-08-31 07:33:55 PDT
Created attachment 66049 [details]
[patch] initial version.
Comment 2 Ilya Tikhonovsky 2010-08-31 07:37:46 PDT
Created attachment 66050 [details]
[patch] initial version. Just missed the test.
Comment 3 Yury Semikhatsky 2010-08-31 07:47:33 PDT
Comment on attachment 66050 [details]
[patch] initial version. Just missed the test.

> LayoutTests/inspector/report-protocol-errors.html:34
> +    for (var message in messages)
Usually we don't use for/in for iterating over array elements.
Comment 4 Ilya Tikhonovsky 2010-08-31 12:42:25 PDT
r66522 = 1547de1beffdb7e673e04ede99e9eaa579928901 (refs/remotes/trunk)
	M	WebCore/ChangeLog
	M	WebCore/inspector/CodeGeneratorInspector.pm
	M	LayoutTests/http/tests/inspector/inspector-test2.js
	A	LayoutTests/inspector/report-protocol-errors-expected.txt
	A	LayoutTests/inspector/report-protocol-errors.html
	M	LayoutTests/ChangeLog
r66523 = cb24aad112c9f399a4dbe5fd2f6857d0386723d6 (refs/remotes/trunk)