Bug 194723

Summary: Disable safe browsing in WKWebView and remove its WKPreferences API
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: ajuma, ews-watchlist, ggaren, rniwa, tsavell, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
ggaren: review+, ews-watchlist: commit-queue-
Archive of layout-test-results from ews106 for mac-highsierra-wk2 none

Description Alex Christensen 2019-02-15 14:38:13 PST
Disable safe browsing in WKWebView and remove its WKPreferences API
Comment 1 Alex Christensen 2019-02-15 14:42:20 PST
Created attachment 362160 [details]
Patch
Comment 2 Alex Christensen 2019-02-15 14:42:22 PST
<rdar://problem/48122993>
Comment 3 Geoffrey Garen 2019-02-15 14:54:47 PST
Comment on attachment 362160 [details]
Patch

Failed to run "['Tools/Scripts/build-webkit', '--release']" exit_code: 65
ata/EWS/WebKit/WebKitBuild/TestWebKitAPI.build/Release/TestWebKitAPILibrary.build/Objects-normal/x86_64/ProcessSwapOnNavigation.d --serialize-diagnostics /Volumes/Data/EWS/WebKit/WebKitBuild/TestWebKitAPI.build/Release/TestWebKitAPILibrary.build/Objects-normal/x86_64/ProcessSwapOnNavigation.dia -c /Volumes/Data/EWS/WebKit/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm -o /Volumes/Data/EWS/WebKit/WebKitBuild/TestWebKitAPI.build/Release/TestWebKitAPILibrary.build/Objects-normal/x86_64/ProcessSwapOnNavigation.o
/Volumes/Data/EWS/WebKit/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:2041:41: error: property 'safeBrowsingEnabled' not found on object of type 'WKPreferences *'; did you mean '_safeBrowsingEnabled'?
    [webView configuration].preferences.safeBrowsingEnabled = NO;
                                        ^~~~~~~~~~~~~~~~~~~
                                        _safeBrowsingEnabled
In file included from /Volumes/Data/EWS/WebKit/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:35:
/Volumes/Data/EWS/WebKit/WebKitBuild/Release/WebKit.framework/PrivateHeaders/WKPreferencesPrivate.h:146:92: note: '_safeBrowsingEnabled' declared here
@property (nonatomic, getter=_isSafeBrowsingEnabled, setter=_setSafeBrowsingEnabled:) BOOL _safeBrowsingEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
Comment 4 Alex Christensen 2019-02-15 15:48:03 PST
Created attachment 362171 [details]
Patch
Comment 5 Geoffrey Garen 2019-02-15 16:25:09 PST
Comment on attachment 362171 [details]
Patch

r=me
Comment 6 EWS Watchlist 2019-02-15 17:04:07 PST
Comment on attachment 362171 [details]
Patch

Attachment 362171 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/11166019

New failing tests:
http/tests/adClickAttribution/store-ad-click-attribution.html
Comment 7 EWS Watchlist 2019-02-15 17:04:10 PST
Created attachment 362186 [details]
Archive of layout-test-results from ews106 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 8 Alex Christensen 2019-02-18 10:36:02 PST
http://trac.webkit.org/r241728
Comment 9 Truitt Savell 2019-02-18 12:06:38 PST
The changes in https://trac.webkit.org/changeset/241728/webkit

Caused 1 API failure:
Failed

    TestWebKitAPI.SafeBrowsing.Preference
        _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
        
        /Volumes/Data/slave/mojave-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:175
        Value of: [webView configuration].preferences._safeBrowsingEnabled
          Actual: true
        Expected: false


and one crashing test:
http/tests/adClickAttribution/store-ad-click-attribution.html

history:
http://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2FadClickAttribution%2Fstore-ad-click-attribution.html
Comment 10 Alex Christensen 2019-02-18 13:31:16 PST
The crash is fixed by https://bugs.webkit.org/show_bug.cgi?id=194774
Comment 11 Alex Christensen 2019-02-18 13:34:42 PST
http://trac.webkit.org/r241736 fixes the API test.