[WebAuthN] Implement authenticatorMakeCredential
[WebKit-https.git] / LayoutTests / http / wpt / webauthn / public-key-credential-create-success.https.html
index b09417b..ab4fcc0 100644 (file)
             }
         };
         // A mock attestation object
-        internals.mockCredentialsMessenger.setAttestationObject(hexStringToUint8Array('000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ff'));
+        internals.mockCredentialsMessenger.setCreationReturnBundle(hexStringToUint8Array('00'), hexStringToUint8Array('01'));
 
         return navigator.credentials.create(options).then(function(credential) {
-                assert_equals(credential.id, '_w');
+                assert_equals(credential.id, 'AA');
                 assert_equals(credential.type, 'public-key');
-                assert_equals(bytesToHexString(credential.rawId), 'ff');
+                assert_equals(bytesToHexString(credential.rawId), '00');
                 assert_equals(bytesToASCIIString(credential.response.clientDataJSON), '{"type":"webauthn.create","challenge":"MTIzNDU2","origin":"https://localhost:9443","hashAlgorithm":"SHA-256"}');
-                assert_equals(bytesToHexString(credential.response.attestationObject), '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ff');
+                assert_equals(bytesToHexString(credential.response.attestationObject), '01');
+                console.log()
                 try {
                     assert_throws("NotSupportedError", credential.getClientExtensionResults());
                 } catch(error) { }