It turns out that _userContentExtensionsEnabled SPI on WKWebView from bug 146128 is not sufficient for performing a “reload without content blockers” operation, because clients can’t tell reliably when to set and reset that property (seem comments in that bug). A true _reloadWithoutContentBlockers SPI as originally proposed in bug 146128, perhaps implemented with a flag on DocumentLoader, is still needed.
<rdar://problem/22697254>
Actually <rdar://problem/22742222>.
Created attachment 262081 [details] Patch
Created attachment 262082 [details] Patch
Comment on attachment 262082 [details] Patch Attachment 262082 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/224330 New failing tests: http/tests/contentextensions/disable-blocker.html
Created attachment 262088 [details] Archive of layout-test-results from ews104 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Created attachment 262090 [details] Patch
Comment on attachment 262090 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=262090&action=review > Source/WebCore/ChangeLog:3 > + Reloading without content blockers doesnât apply to resource loads after the main frame finishes Please to ASCII your apostrophe. > Source/WebKit2/ChangeLog:3 > + Reloading without content blockers doesnât apply to resource loads after the main frame finishes ASCII > Tools/ChangeLog:3 > + Reloading without content blockers doesnât apply to resource loads after the main frame finishes ASCII > Tools/WebKitTestRunner/mac/TestControllerMac.mm:128 > + if (!test.urlContains("disable-blocker")) > + return; This is a bit shady. Can you turn this into a function call in the test instead?
Comment on attachment 262090 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=262090&action=review >> Tools/WebKitTestRunner/mac/TestControllerMac.mm:128 >> + return; > > This is a bit shady. Can you turn this into a function call in the test instead? Or a test runner comment.
(In reply to comment #8) > Comment on attachment 262090 [details] > Patch > > Tools/WebKitTestRunner/mac/TestControllerMac.mm:128 > > + if (!test.urlContains("disable-blocker")) > > + return; > > This is a bit shady. Can you turn this into a function call in the test > instead? I agree. I added comments. Committed http://trac.webkit.org/changeset/190510
As discussed in person, I was talking about triggering the custom behavior via a comment.