Title: [252668] trunk/LayoutTests
Revision
252668
Author
[email protected]
Date
2019-11-19 17:35:20 -0800 (Tue, 19 Nov 2019)

Log Message

Improve WebAuthn NFC tests after r252297
https://bugs.webkit.org/show_bug.cgi?id=204251

Reviewed by Alexey Proskuryakov.

This patch fixes a test failure after r252297 and adds new test contents for r252297.

* http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html:
* http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-success-nfc.https.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (252667 => 252668)


--- trunk/LayoutTests/ChangeLog	2019-11-20 01:27:35 UTC (rev 252667)
+++ trunk/LayoutTests/ChangeLog	2019-11-20 01:35:20 UTC (rev 252668)
@@ -1,3 +1,17 @@
+2019-11-19  Jiewen Tan  <[email protected]>
+
+        Improve WebAuthn NFC tests after r252297
+        https://bugs.webkit.org/show_bug.cgi?id=204251
+
+        Reviewed by Alexey Proskuryakov.
+
+        This patch fixes a test failure after r252297 and adds new test contents for r252297.
+
+        * http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html:
+        * http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-create-success-nfc.https.html:
+
 2019-11-19  Sunny He  <[email protected]>
 
         Nullptr crash in Node::setTextContent via Document::setTitle if title element is removed before setTextContent call.

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt (252667 => 252668)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt	2019-11-20 01:27:35 UTC (rev 252667)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt	2019-11-20 01:35:20 UTC (rev 252668)
@@ -5,4 +5,5 @@
 PASS PublicKeyCredential's [[create]] with no connections in a mock nfc authenticator. 
 PASS PublicKeyCredential's [[create]] with null version in a mock nfc authenticator. 
 PASS PublicKeyCredential's [[create]] with wrong version in a mock nfc authenticator. 
+PASS PublicKeyCredential's [[create]] with wrong version in a mock nfc authenticator.2 
 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html (252667 => 252668)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html	2019-11-20 01:27:35 UTC (rev 252667)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html	2019-11-20 01:35:20 UTC (rev 252668)
@@ -137,4 +137,26 @@
         return promiseRejects(t, "NotAllowedError", navigator.credentials.create(options), "Operation timed out.");
     }, "PublicKeyCredential's [[create]] with wrong version in a mock nfc authenticator.");
 
+    promise_test(function(t) {
+        const options = {
+            publicKey: {
+                rp: {
+                    name: "example.com"
+                },
+                user: {
+                    name: "John Appleseed",
+                    id: asciiToUint8Array("123456"),
+                    displayName: "John",
+                },
+                challenge: asciiToUint8Array("123456"),
+                pubKeyCredParams: [{ type: "public-key", alg: -7 }],
+                timeout: 10
+            }
+        };
+
+        if (window.internals)
+            internals.setMockWebAuthenticationConfiguration({ nfc: { error: "malicious-payload", payloadBase64:[testDummyMessagePayloadBase64, testDummyMessagePayloadBase64] } });
+        return promiseRejects(t, "NotAllowedError", navigator.credentials.create(options), "Operation timed out.");
+    }, "PublicKeyCredential's [[create]] with wrong version in a mock nfc authenticator.2");
+
 </script>

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt (252667 => 252668)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt	2019-11-20 01:27:35 UTC (rev 252667)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt	2019-11-20 01:35:20 UTC (rev 252668)
@@ -5,4 +5,5 @@
 PASS PublicKeyCredential's [[create]] with U2F in a mock nfc authenticator. 
 PASS PublicKeyCredential's [[create]] with multiple physical tags in a mock nfc authenticator. 
 PASS PublicKeyCredential's [[create]] with service restart in a mock nfc authenticator. 
+PASS PublicKeyCredential's [[create]] with legacy U2F keys in a mock nfc authenticator. 
 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-nfc.https.html (252667 => 252668)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-nfc.https.html	2019-11-20 01:27:35 UTC (rev 252667)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-nfc.https.html	2019-11-20 01:35:20 UTC (rev 252668)
@@ -138,9 +138,32 @@
         };
 
         if (window.internals)
-            internals.setMockWebAuthenticationConfiguration({ silentFailure: true, nfc: { error: "malicious-payload", payloadBase64: [testDummyMessagePayloadBase64, testNfcCtapVersionBase64, testGetInfoResponseApduBase64, testCreationMessageApduBase64] } });
+            internals.setMockWebAuthenticationConfiguration({ silentFailure: true, nfc: { error: "malicious-payload", payloadBase64: [testDummyMessagePayloadBase64, testDummyMessagePayloadBase64, testNfcCtapVersionBase64, testGetInfoResponseApduBase64, testCreationMessageApduBase64] } });
         return navigator.credentials.create(options).then(credential => {
             checkCtapMakeCredentialResult(credential);
         });
     }, "PublicKeyCredential's [[create]] with service restart in a mock nfc authenticator.");
+
+    promise_test(t => {
+        const options = {
+            publicKey: {
+                rp: {
+                    name: "localhost",
+                },
+                user: {
+                    name: "John Appleseed",
+                    id: Base64URL.parse(testUserhandleBase64),
+                    displayName: "Appleseed",
+                },
+                challenge: Base64URL.parse("MTIzNDU2"),
+                pubKeyCredParams: [{ type: "public-key", alg: -7 }]
+            }
+        };
+
+        if (window.internals)
+            internals.setMockWebAuthenticationConfiguration({ silentFailure: true, nfc: { error: "malicious-payload", payloadBase64: [testDummyMessagePayloadBase64, testNfcU2fVersionBase64, testGetInfoResponseApduBase64, testCreationMessageApduBase64] } });
+        return navigator.credentials.create(options).then(credential => {
+            checkCtapMakeCredentialResult(credential);
+        });
+    }, "PublicKeyCredential's [[create]] with legacy U2F keys in a mock nfc authenticator.");
 </script>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to