Bug 142900 - [Content Filtering] Add tests for unblock requests
Summary: [Content Filtering] Add tests for unblock requests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy Estes
URL:
Keywords:
Depends on:
Blocks: 128858
  Show dependency treegraph
 
Reported: 2015-03-19 23:08 PDT by Andy Estes
Modified: 2015-03-20 01:43 PDT (History)
2 users (show)

See Also:


Attachments
Patch (56.68 KB, patch)
2015-03-20 00:54 PDT, Andy Estes
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Estes 2015-03-19 23:08:23 PDT
[Content Filtering] Add tests for unblock requests
Comment 1 Andy Estes 2015-03-20 00:54:00 PDT
Created attachment 249093 [details]
Patch
Comment 2 WebKit Commit Bot 2015-03-20 00:56:41 PDT
Attachment 249093 [details] did not pass style-queue:


ERROR: Source/WebCore/loader/ContentFilter.cpp:71:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/loader/ContentFilter.cpp:148:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebCore/testing/MockContentFilter.cpp:100:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:51:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:125:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 5 in 32 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Andreas Kling 2015-03-20 01:33:25 PDT
Comment on attachment 249093 [details]
Patch

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

r=me

> Source/WebCore/testing/MockContentFilter.cpp:111
> +    return "unblockRequestDenied()";

This would be slightly more efficient using ASCIILiteral:
    return ASCIILiteral("unblockRequestDenied()");

> Source/WebKit2/UIProcess/WebFrameProxy.cpp:245
> +        if (unblocked && page)
> +            page->reload(false);

'page' cannot be null here, since the only caller of this function is a member function in WebPageProxy.
This could just be an assertion outside the block.
Comment 4 Andy Estes 2015-03-20 01:43:37 PDT
Committed r181791: <http://trac.webkit.org/changeset/181791>