Bug 69025 - Web Inspector: Make search-in-resource test simpler.
Summary: Web Inspector: Make search-in-resource test simpler.
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: Vsevolod Vlasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-28 13:37 PDT by Vsevolod Vlasov
Modified: 2011-09-29 05:58 PDT (History)
11 users (show)

See Also:


Attachments
Patch (10.15 KB, patch)
2011-09-28 13:52 PDT, Vsevolod Vlasov
no flags Details | Formatted Diff | Diff
Patch (12.08 KB, patch)
2011-09-29 05:40 PDT, Vsevolod Vlasov
pfeldman: review+
Details | Formatted Diff | Diff

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