⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 284824 in webkit


Ignore:
Timestamp:
Oct 25, 2021, 2:50:34 PM (5 years ago)
Author:
Alan Coon
Message:

Cherry-pick r283515. rdar://problem/84624826

[WebAuthn] Prefer internal user verification if available over pin entry.
https://bugs.webkit.org/show_bug.cgi?id=213903
<rdar://problem/65359269>

Patch by John Pascoe <J Pascoe> on 2021-10-04
Reviewed by Brent Fulgham.

Source/WebCore:

This adds an option to mock internal user verification in tests.

  • testing/MockWebAuthenticationConfiguration.h: (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::encode const): (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::decode):
  • testing/MockWebAuthenticationConfiguration.idl:

Source/WebKit:

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp: (WebKit::MockHidConnection::feedReports):
  • UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: (WebKit::CtapAuthenticator::makeCredential): (WebKit::CtapAuthenticator::getAssertion): (WebKit::fido::toStatus): Deleted. (WebKit::fido::isPinError): Deleted.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-internal-uv.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-internal-uv.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283515 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-612-branch
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-612-branch/Source/WebCore/ChangeLog

    r284815 r284824  
     12021-10-25  Null  <null@apple.com>
     2
     3        Cherry-pick r283515. rdar://problem/84624826
     4
     5    [WebAuthn] Prefer internal user verification if available over pin entry.
     6    https://bugs.webkit.org/show_bug.cgi?id=213903
     7    <rdar://problem/65359269>
     8   
     9    Patch by John Pascoe <j_pascoe@apple.com> on 2021-10-04
     10    Reviewed by Brent Fulgham.
     11   
     12    Source/WebCore:
     13   
     14    This adds an option to mock internal user verification in tests.
     15   
     16    * testing/MockWebAuthenticationConfiguration.h:
     17    (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::encode const):
     18    (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::decode):
     19    * testing/MockWebAuthenticationConfiguration.idl:
     20   
     21    Source/WebKit:
     22   
     23    * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
     24    (WebKit::MockHidConnection::feedReports):
     25    * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
     26    (WebKit::CtapAuthenticator::makeCredential):
     27    (WebKit::CtapAuthenticator::getAssertion):
     28    (WebKit::fido::toStatus): Deleted.
     29    (WebKit::fido::isPinError): Deleted.
     30   
     31    Tools:
     32   
     33    * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     34    * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
     35    (TestWebKitAPI::TEST):
     36    * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-internal-uv.html: Added.
     37    * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-internal-uv.html: Added.
     38   
     39    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     40
     41    2021-10-04  John Pascoe  <j_pascoe@apple.com>
     42
     43            [WebAuthn] Prefer internal user verification if available over pin entry.
     44            https://bugs.webkit.org/show_bug.cgi?id=213903
     45            <rdar://problem/65359269>
     46
     47            Reviewed by Brent Fulgham.
     48
     49            This adds an option to mock internal user verification in tests.
     50
     51            * testing/MockWebAuthenticationConfiguration.h:
     52            (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::encode const):
     53            (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::decode):
     54            * testing/MockWebAuthenticationConfiguration.idl:
     55
    1562021-10-25  Null  <null@apple.com>
    257
  • branches/safari-612-branch/Source/WebCore/testing/MockWebAuthenticationConfiguration.h

    r278253 r284824  
    9393        bool expectCancel { false };
    9494        bool supportClientPin { false };
     95        bool supportInternalUV { false };
    9596
    9697        template<class Encoder> void encode(Encoder&) const;
     
    170171void MockWebAuthenticationConfiguration::HidConfiguration::encode(Encoder& encoder) const
    171172{
    172     encoder << payloadBase64 << stage << subStage << error << isU2f << keepAlive << fastDataArrival << continueAfterErrorData << canDowngrade << expectCancel << supportClientPin;
     173    encoder << payloadBase64 << stage << subStage << error << isU2f << keepAlive << fastDataArrival << continueAfterErrorData << canDowngrade << expectCancel << supportClientPin << supportInternalUV;
    173174}
    174175
     
    198199        return std::nullopt;
    199200    if (!decoder.decode(result.supportClientPin))
     201        return std::nullopt;
     202    if (!decoder.decode(result.supportInternalUV))
    200203        return std::nullopt;
    201204    return result;
  • branches/safari-612-branch/Source/WebCore/testing/MockWebAuthenticationConfiguration.idl

    r276180 r284824  
    103103    boolean expectCancel = false;
    104104    boolean supportClientPin = false;
     105    boolean supportInternalUV = false;
    105106};
    106107
  • branches/safari-612-branch/Source/WebKit/ChangeLog

    r284815 r284824  
     12021-10-25  Null  <null@apple.com>
     2
     3        Cherry-pick r283515. rdar://problem/84624826
     4
     5    [WebAuthn] Prefer internal user verification if available over pin entry.
     6    https://bugs.webkit.org/show_bug.cgi?id=213903
     7    <rdar://problem/65359269>
     8   
     9    Patch by John Pascoe <j_pascoe@apple.com> on 2021-10-04
     10    Reviewed by Brent Fulgham.
     11   
     12    Source/WebCore:
     13   
     14    This adds an option to mock internal user verification in tests.
     15   
     16    * testing/MockWebAuthenticationConfiguration.h:
     17    (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::encode const):
     18    (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::decode):
     19    * testing/MockWebAuthenticationConfiguration.idl:
     20   
     21    Source/WebKit:
     22   
     23    * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
     24    (WebKit::MockHidConnection::feedReports):
     25    * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
     26    (WebKit::CtapAuthenticator::makeCredential):
     27    (WebKit::CtapAuthenticator::getAssertion):
     28    (WebKit::fido::toStatus): Deleted.
     29    (WebKit::fido::isPinError): Deleted.
     30   
     31    Tools:
     32   
     33    * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     34    * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
     35    (TestWebKitAPI::TEST):
     36    * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-internal-uv.html: Added.
     37    * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-internal-uv.html: Added.
     38   
     39    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     40
     41    2021-10-04  John Pascoe  <j_pascoe@apple.com>
     42
     43            [WebAuthn] Prefer internal user verification if available over pin entry.
     44            https://bugs.webkit.org/show_bug.cgi?id=213903
     45            <rdar://problem/65359269>
     46
     47            Reviewed by Brent Fulgham.
     48
     49            * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
     50            (WebKit::MockHidConnection::feedReports):
     51            * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
     52            (WebKit::CtapAuthenticator::makeCredential):
     53            (WebKit::CtapAuthenticator::getAssertion):
     54            (WebKit::fido::toStatus): Deleted.
     55            (WebKit::fido::isPinError): Deleted.
     56
    1572021-10-25  Null  <null@apple.com>
    258
  • branches/safari-612-branch/Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidConnection.cpp

    r278253 r284824  
    229229        if (m_configuration.hid->canDowngrade)
    230230            infoData = encodeAsCBOR(AuthenticatorGetInfoResponse({ ProtocolVersion::kCtap, ProtocolVersion::kU2f }, Vector<uint8_t>(aaguidLength, 0u)));
    231         else if (m_configuration.hid->supportClientPin) {
     231        else {
    232232            AuthenticatorGetInfoResponse infoResponse({ ProtocolVersion::kCtap }, Vector<uint8_t>(aaguidLength, 0u));
    233             infoResponse.setPinProtocols({ pin::kProtocolVersion });
    234233            AuthenticatorSupportedOptions options;
    235             options.setClientPinAvailability(AuthenticatorSupportedOptions::ClientPinAvailability::kSupportedAndPinSet);
     234            if (m_configuration.hid->supportClientPin) {
     235                infoResponse.setPinProtocols({ pin::kProtocolVersion });
     236                options.setClientPinAvailability(AuthenticatorSupportedOptions::ClientPinAvailability::kSupportedAndPinSet);
     237            }
     238            if (m_configuration.hid->supportInternalUV)
     239                options.setUserVerificationAvailability(AuthenticatorSupportedOptions::UserVerificationAvailability::kSupportedAndConfigured);
    236240            infoResponse.setOptions(WTFMove(options));
    237241            infoData = encodeAsCBOR(infoResponse);
    238         } else
    239             infoData = encodeAsCBOR(AuthenticatorGetInfoResponse({ ProtocolVersion::kCtap }, Vector<uint8_t>(aaguidLength, 0u)));
     242        }
    240243        infoData.insert(0, static_cast<uint8_t>(CtapDeviceResponseCode::kSuccess)); // Prepend status code.
    241244        if (stagesMatch() && m_configuration.hid->error == Mock::HidError::WrongChannelId)
  • branches/safari-612-branch/Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp

    r278358 r284824  
    4848using namespace fido;
    4949
     50using UVAvailability = AuthenticatorSupportedOptions::UserVerificationAvailability;
     51
    5052namespace {
    5153WebAuthenticationStatus toStatus(const CtapDeviceResponseCode& error)
     
    9395    Vector<uint8_t> cborCmd;
    9496    auto& options = WTF::get<PublicKeyCredentialCreationOptions>(requestData().options);
    95     if (m_info.options().clientPinAvailability() == AuthenticatorSupportedOptions::ClientPinAvailability::kSupportedAndPinSet)
    96         cborCmd = encodeMakeCredenitalRequestAsCBOR(requestData().hash, options, m_info.options().userVerificationAvailability(), PinParameters { pin::kProtocolVersion, m_pinAuth });
     97    auto internalUVAvailability = m_info.options().userVerificationAvailability();
     98    // If UV is required, then either built-in uv or a pin will work.
     99    if (internalUVAvailability == UVAvailability::kSupportedAndConfigured && (!options.authenticatorSelection || options.authenticatorSelection->userVerification != UserVerificationRequirement::Discouraged))
     100        cborCmd = encodeMakeCredenitalRequestAsCBOR(requestData().hash, options, internalUVAvailability);
     101    else if (m_info.options().clientPinAvailability() == AuthenticatorSupportedOptions::ClientPinAvailability::kSupportedAndPinSet)
     102        cborCmd = encodeMakeCredenitalRequestAsCBOR(requestData().hash, options, internalUVAvailability, PinParameters { pin::kProtocolVersion, m_pinAuth });
    97103    else
    98         cborCmd = encodeMakeCredenitalRequestAsCBOR(requestData().hash, options, m_info.options().userVerificationAvailability());
     104        cborCmd = encodeMakeCredenitalRequestAsCBOR(requestData().hash, options, internalUVAvailability);
    99105    driver().transact(WTFMove(cborCmd), [weakThis = makeWeakPtr(*this)](Vector<uint8_t>&& data) {
    100106        ASSERT(RunLoop::isMain());
     
    134140    Vector<uint8_t> cborCmd;
    135141    auto& options = WTF::get<PublicKeyCredentialRequestOptions>(requestData().options);
    136     if (m_info.options().clientPinAvailability() == AuthenticatorSupportedOptions::ClientPinAvailability::kSupportedAndPinSet && options.userVerification != UserVerificationRequirement::Discouraged)
    137         cborCmd = encodeGetAssertionRequestAsCBOR(requestData().hash, options, m_info.options().userVerificationAvailability(), PinParameters { pin::kProtocolVersion, m_pinAuth });
     142    auto internalUVAvailability = m_info.options().userVerificationAvailability();
     143    // If UV is required, then either built-in uv or a pin will work.
     144    if (internalUVAvailability == UVAvailability::kSupportedAndConfigured && options.userVerification != UserVerificationRequirement::Discouraged)
     145        cborCmd = encodeGetAssertionRequestAsCBOR(requestData().hash, options, internalUVAvailability);
     146    else if (m_info.options().clientPinAvailability() == AuthenticatorSupportedOptions::ClientPinAvailability::kSupportedAndPinSet && options.userVerification != UserVerificationRequirement::Discouraged)
     147        cborCmd = encodeGetAssertionRequestAsCBOR(requestData().hash, options, internalUVAvailability, PinParameters { pin::kProtocolVersion, m_pinAuth });
    138148    else
    139         cborCmd = encodeGetAssertionRequestAsCBOR(requestData().hash, options, m_info.options().userVerificationAvailability());
     149        cborCmd = encodeGetAssertionRequestAsCBOR(requestData().hash, options, internalUVAvailability);
    140150    driver().transact(WTFMove(cborCmd), [weakThis = makeWeakPtr(*this)](Vector<uint8_t>&& data) {
    141151        ASSERT(RunLoop::isMain());
  • branches/safari-612-branch/Tools/ChangeLog

    r284403 r284824  
     12021-10-25  Null  <null@apple.com>
     2
     3        Cherry-pick r283515. rdar://problem/84624826
     4
     5    [WebAuthn] Prefer internal user verification if available over pin entry.
     6    https://bugs.webkit.org/show_bug.cgi?id=213903
     7    <rdar://problem/65359269>
     8   
     9    Patch by John Pascoe <j_pascoe@apple.com> on 2021-10-04
     10    Reviewed by Brent Fulgham.
     11   
     12    Source/WebCore:
     13   
     14    This adds an option to mock internal user verification in tests.
     15   
     16    * testing/MockWebAuthenticationConfiguration.h:
     17    (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::encode const):
     18    (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::decode):
     19    * testing/MockWebAuthenticationConfiguration.idl:
     20   
     21    Source/WebKit:
     22   
     23    * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
     24    (WebKit::MockHidConnection::feedReports):
     25    * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
     26    (WebKit::CtapAuthenticator::makeCredential):
     27    (WebKit::CtapAuthenticator::getAssertion):
     28    (WebKit::fido::toStatus): Deleted.
     29    (WebKit::fido::isPinError): Deleted.
     30   
     31    Tools:
     32   
     33    * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     34    * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
     35    (TestWebKitAPI::TEST):
     36    * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-internal-uv.html: Added.
     37    * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-internal-uv.html: Added.
     38   
     39    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     40
     41    2021-10-04  John Pascoe  <j_pascoe@apple.com>
     42
     43            [WebAuthn] Prefer internal user verification if available over pin entry.
     44            https://bugs.webkit.org/show_bug.cgi?id=213903
     45            <rdar://problem/65359269>
     46
     47            Reviewed by Brent Fulgham.
     48
     49            * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     50            * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
     51            (TestWebKitAPI::TEST):
     52            * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-internal-uv.html: Added.
     53            * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-internal-uv.html: Added.
     54
    1552021-10-18  Russell Epstein  <repstein@apple.com>
    256
  • branches/safari-612-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r284424 r284824  
    392392                524BBCA119E30C77002F1AF1 /* test.mp4 in Copy Resources */ = {isa = PBXBuildFile; fileRef = 524BBCA019E30C63002F1AF1 /* test.mp4 */; };
    393393                52B8CF9815868D9100281053 /* SetDocumentURI.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 52B8CF9415868CF000281053 /* SetDocumentURI.html */; };
     394                52C8C1382706437C00BDF3B7 /* web-authentication-make-credential-hid-internal-uv.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 52C8C1372706437C00BDF3B7 /* web-authentication-make-credential-hid-internal-uv.html */; };
     395                52C8C13A2706439000BDF3B7 /* web-authentication-get-assertion-hid-internal-uv.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 52C8C1392706439000BDF3B7 /* web-authentication-get-assertion-hid-internal-uv.html */; };
    394396                52D5D6C021B9F1B30046ABA6 /* RenderingProgress.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52D5D6BD21B9F1B20046ABA6 /* RenderingProgress.mm */; };
    395397                52D673EE1AFB127300FA19FE /* WKPageCopySessionStateWithFiltering.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52D673EC1AFB126800FA19FE /* WKPageCopySessionStateWithFiltering.cpp */; };
     
    17391741                                CD577799211CE0E4001B371E /* web-audio-only.html in Copy Resources */,
    17401742                                57663DF32357E48900E85E09 /* web-authentication-get-assertion-hid-cancel.html in Copy Resources */,
     1743                                52C8C13A2706439000BDF3B7 /* web-authentication-get-assertion-hid-internal-uv.html in Copy Resources */,
    17411744                                579F1C0123C93AF500C7D4B4 /* web-authentication-get-assertion-hid-multiple-accounts.html in Copy Resources */,
    17421745                                577454D02359B378008E1ED7 /* web-authentication-get-assertion-hid-no-credentials.html in Copy Resources */,
     
    17521755                                577454D22359BB01008E1ED7 /* web-authentication-get-assertion-u2f-no-credentials.html in Copy Resources */,
    17531756                                57C624502346C21E00383FE7 /* web-authentication-get-assertion.html in Copy Resources */,
     1757                                52C8C1382706437C00BDF3B7 /* web-authentication-make-credential-hid-internal-uv.html in Copy Resources */,
    17541758                                578DA44823ECD09B00246010 /* web-authentication-make-credential-hid-pin-auth-blocked-error.html in Copy Resources */,
    17551759                                570D26F423C3CA6A00D5CF67 /* web-authentication-make-credential-hid-pin-get-key-agreement-error.html in Copy Resources */,
     
    22402244                52B8CF9415868CF000281053 /* SetDocumentURI.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = SetDocumentURI.html; sourceTree = "<group>"; };
    22412245                52B8CF9515868CF000281053 /* SetDocumentURI.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SetDocumentURI.mm; sourceTree = "<group>"; };
     2246                52C8C1372706437C00BDF3B7 /* web-authentication-make-credential-hid-internal-uv.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = "web-authentication-make-credential-hid-internal-uv.html"; path = "Tests/WebKitCocoa/web-authentication-make-credential-hid-internal-uv.html"; sourceTree = "<group>"; };
     2247                52C8C1392706439000BDF3B7 /* web-authentication-get-assertion-hid-internal-uv.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = "web-authentication-get-assertion-hid-internal-uv.html"; path = "Tests/WebKitCocoa/web-authentication-get-assertion-hid-internal-uv.html"; sourceTree = "<group>"; };
    22422248                52CB47401448FB9300873995 /* LoadAlternateHTMLStringWithNonDirectoryURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadAlternateHTMLStringWithNonDirectoryURL.cpp; sourceTree = "<group>"; };
    22432249                52D5D6BD21B9F1B20046ABA6 /* RenderingProgress.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RenderingProgress.mm; sourceTree = "<group>"; };
     
    32293235                        isa = PBXGroup;
    32303236                        children = (
     3237                                52C8C1392706439000BDF3B7 /* web-authentication-get-assertion-hid-internal-uv.html */,
     3238                                52C8C1372706437C00BDF3B7 /* web-authentication-make-credential-hid-internal-uv.html */,
    32313239                                49AEEF682407276F00C87E4C /* Info.plist */,
    32323240                                5C9D922622D7DD7B008E9266 /* Derived Sources */,
  • branches/safari-612-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm

    r282152 r284824  
    11321132}
    11331133
     1134TEST(WebAuthenticationPanel, MakeCredentialInternalUV)
     1135{
     1136    reset();
     1137    RetainPtr<NSURL> testURL = [[NSBundle mainBundle] URLForResource:@"web-authentication-make-credential-hid-internal-uv" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"];
     1138
     1139    auto *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
     1140    [[configuration preferences] _setEnabled:YES forExperimentalFeature:webAuthenticationExperimentalFeature()];
     1141    [[configuration preferences] _setEnabled:NO forExperimentalFeature:webAuthenticationModernExperimentalFeature()];
     1142
     1143    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSZeroRect configuration:configuration]);
     1144    auto delegate = adoptNS([[TestWebAuthenticationPanelUIDelegate alloc] init]);
     1145    [webView setUIDelegate:delegate.get()];
     1146    [webView focus];
     1147
     1148    [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]];
     1149    [webView waitForMessage:@"Succeeded!"];
     1150}
     1151
    11341152TEST(WebAuthenticationPanel, MakeCredentialPin)
    11351153{
     
    12071225
    12081226    webAuthenticationPanelPin = "1234";
     1227    [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]];
     1228    [webView waitForMessage:@"Succeeded!"];
     1229}
     1230
     1231TEST(WebAuthenticationPanel, GetAssertionInternalUV)
     1232{
     1233    reset();
     1234    RetainPtr<NSURL> testURL = [[NSBundle mainBundle] URLForResource:@"web-authentication-get-assertion-hid-internal-uv" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"];
     1235
     1236    auto *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
     1237    [[configuration preferences] _setEnabled:YES forExperimentalFeature:webAuthenticationExperimentalFeature()];
     1238    [[configuration preferences] _setEnabled:NO forExperimentalFeature:webAuthenticationModernExperimentalFeature()];
     1239
     1240    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSZeroRect configuration:configuration]);
     1241    auto delegate = adoptNS([[TestWebAuthenticationPanelUIDelegate alloc] init]);
     1242    [webView setUIDelegate:delegate.get()];
     1243    [webView focus];
     1244
    12091245    [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]];
    12101246    [webView waitForMessage:@"Succeeded!"];
Note: See TracChangeset for help on using the changeset viewer.