Bug 44947 - Web Inspector: The parser of Inspector protocol messages should be covered by a test.
Summary: Web Inspector: The parser of Inspector protocol messages should be covered by...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Ilya Tikhonovsky
URL:
Keywords:
Depends on: 44875
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-31 07:09 PDT by Ilya Tikhonovsky
Modified: 2010-08-31 12:42 PDT (History)
9 users (show)

See Also:


Attachments
[patch] initial version. (9.68 KB, patch)
2010-08-31 07:33 PDT, Ilya Tikhonovsky
no flags Details | Formatted Diff | Diff
[patch] initial version. Just missed the test. (13.52 KB, patch)
2010-08-31 07:37 PDT, Ilya Tikhonovsky
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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)