Bug 69025

Summary: Web Inspector: Make search-in-resource test simpler.
Product: WebKit Reporter: Vsevolod Vlasov <vsevik>
Component: Web Inspector (Deprecated)Assignee: Vsevolod Vlasov <vsevik>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch pfeldman: review+

Description Vsevolod Vlasov 2011-09-28 13:37:14 PDT
Make search-in-resource test simpler.
Comment 1 Vsevolod Vlasov 2011-09-28 13:52:49 PDT
Created attachment 109069 [details]
Patch
Comment 2 Pavel Feldman 2011-09-28 22:24:38 PDT
Comment on attachment 109069 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=109069&action=review

> LayoutTests/http/tests/inspector/search/search-test.js:41
> +        setTimeout(InspectorTest._runAfterResourcesAreCreated.bind(InspectorTest, resourceURLs, callback), 0);

setTimeout is a source of flake. You should sniff for calls you expect instead.

> Source/WebCore/inspector/InspectorPageAgent.cpp:489
> +    *object = InspectorArray::create();

It is not an object. Rename this to "array" or "results"?

> Source/WebCore/inspector/front-end/NetworkManager.js:70
> +    searchInResource: function(resource, query, callback)

This change blurs the distinction between Requests vs Resources. We should not talk to PageAgent from within network manager if at all possible.
Comment 3 Vsevolod Vlasov 2011-09-29 05:40:23 PDT
Created attachment 109155 [details]
Patch
Comment 4 WebKit Review Bot 2011-09-29 05:43:48 PDT
Attachment 109155 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/http..." exit_code: 1

Source/WebCore/inspector/InspectorPageAgent.cpp:487:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InspectorPageAgent.cpp:525:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 2 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Vsevolod Vlasov 2011-09-29 05:58:37 PDT
Committed r96323: <http://trac.webkit.org/changeset/96323>