Bug 210811 - Move WebKit.WebViewCategory test to InAppBrowserPrivacy.mm
Summary: Move WebKit.WebViewCategory test to InAppBrowserPrivacy.mm
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: katherine_cheney
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-21 12:13 PDT by katherine_cheney
Modified: 2020-04-21 13:49 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.33 KB, patch)
2020-04-21 12:16 PDT, katherine_cheney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description katherine_cheney 2020-04-21 12:13:58 PDT
This test was added before InAppBrowserPrivacy.mm existed. It should be moved here so it has access to all setup/cleanup needed by these tests
Comment 1 katherine_cheney 2020-04-21 12:14:17 PDT
<rdar://problem/60972505>
Comment 2 katherine_cheney 2020-04-21 12:16:07 PDT
Created attachment 397104 [details]
Patch
Comment 3 Alexey Proskuryakov 2020-04-21 13:23:25 PDT
Comment on attachment 397104 [details]
Patch

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

rs=me

> Tools/TestWebKitAPI/Tests/WebKitCocoa/Configuration.mm:-65
> -    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
> -    EXPECT_EQ([configuration _webViewCategory], _WKWebViewCategoryAppBoundDomain);

Can you add an explanation to ChangeLog about why this failed? Naively, I would expect the state of an object that was just init'ed to always the the same, and not require "initializeInAppBrowserPrivacyTestSettings()".

> Tools/TestWebKitAPI/Tests/WebKitCocoa/Configuration.mm:-71
> -    [configuration _setWebViewCategory:_WKWebViewCategoryInAppBrowser];
> -    EXPECT_EQ([configuration _webViewCategory], _WKWebViewCategoryInAppBrowser);
> -
> -    [configuration _setWebViewCategory:_WKWebViewCategoryWebBrowser];
> -    EXPECT_EQ([configuration _webViewCategory], _WKWebViewCategoryWebBrowser);

Seems OK to move everything, but it may be even better to keep tests for other categories here.
Comment 4 EWS 2020-04-21 13:49:36 PDT
Committed r260451: <https://trac.webkit.org/changeset/260451>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 397104 [details].