[Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https...
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Dec 2018 06:37:28 +0000 (06:37 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Dec 2018 06:37:28 +0000 (06:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=192061

Reviewed by Dewei Zhu.

Source/WebKit:

Part 3.

Add some additional temporary logging info to determine if the timer is working as expected.
Once the bug is determined and fixed, we should remove all logging added in this patch.

* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManager::respondReceived):
(WebKit::AuthenticatorManager::initTimeOutTimer):
(WebKit::AuthenticatorManager::timeOutTimerFired):
* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp:
(WebKit::MockAuthenticatorManager::respondReceivedInternal):

LayoutTests:

Add a time out value.

* http/wpt/webauthn/public-key-credential-create-success-hid.https.html:

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

LayoutTests/ChangeLog
LayoutTests/http/wpt/webauthn/public-key-credential-create-success-hid.https.html
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp
Source/WebKit/UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp

index 7684fdc..5f72761 100644 (file)
@@ -1,3 +1,14 @@
+2018-12-17  Jiewen Tan  <jiewen_tan@apple.com>
+
+        [Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
+        https://bugs.webkit.org/show_bug.cgi?id=192061
+
+        Reviewed by Dewei Zhu.
+
+        Add a time out value.
+
+        * http/wpt/webauthn/public-key-credential-create-success-hid.https.html:
+
 2018-12-17  Eric Carlson  <eric.carlson@apple.com>
 
         [MediaStream] A stream's first video frame should be rendered
index cc6cd16..798b7be 100644 (file)
@@ -69,7 +69,8 @@
                 },
                 challenge: Base64URL.parse("MTIzNDU2"),
                 pubKeyCredParams: [{ type: "public-key", alg: -7 }],
-                authenticatorSelection: { authenticatorAttachment: "cross-platform" }
+                authenticatorSelection: { authenticatorAttachment: "cross-platform" },
+                timeout: 10
             }
         };
 
index d36ae2e..a196ae8 100644 (file)
@@ -1,3 +1,22 @@
+2018-12-17  Jiewen Tan  <jiewen_tan@apple.com>
+
+        [Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
+        https://bugs.webkit.org/show_bug.cgi?id=192061
+
+        Reviewed by Dewei Zhu.
+
+        Part 3.
+
+        Add some additional temporary logging info to determine if the timer is working as expected.
+        Once the bug is determined and fixed, we should remove all logging added in this patch.
+
+        * UIProcess/WebAuthentication/AuthenticatorManager.cpp:
+        (WebKit::AuthenticatorManager::respondReceived):
+        (WebKit::AuthenticatorManager::initTimeOutTimer):
+        (WebKit::AuthenticatorManager::timeOutTimerFired):
+        * UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp:
+        (WebKit::MockAuthenticatorManager::respondReceivedInternal):
+
 2018-12-17  Saam barati  <sbarati@apple.com>
 
         Enable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
index 6595f9c..c1a6832 100644 (file)
@@ -191,6 +191,8 @@ void AuthenticatorManager::respondReceived(Respond&& respond)
     if (WTF::holds_alternative<PublicKeyCredentialData>(respond)) {
         m_pendingCompletionHandler(WTFMove(respond));
         clearStateAsync();
+        // FIXME(192061)
+        LOG_ERROR("Stop timer.");
         m_requestTimeOutTimer.stop();
         return;
     }
@@ -223,11 +225,16 @@ void AuthenticatorManager::initTimeOutTimer(const std::optional<unsigned>& timeO
     using namespace AuthenticatorManagerInternal;
 
     unsigned timeOutInMsValue = std::min(maxTimeOutValue, timeOutInMs.value_or(maxTimeOutValue));
+    // FIXME(192061)
+    LOG_ERROR("Start timer.");
     m_requestTimeOutTimer.startOneShot(Seconds::fromMilliseconds(timeOutInMsValue));
 }
 
 void AuthenticatorManager::timeOutTimerFired()
 {
+    ASSERT(m_requestTimeOutTimer.isActive());
+    // FIXME(192061)
+    LOG_ERROR("Timer fired.");
     m_pendingCompletionHandler((ExceptionData { NotAllowedError, "Operation timed out."_s }));
     clearStateAsync();
 }
index 4db2760..fae8861 100644 (file)
@@ -47,6 +47,8 @@ void MockAuthenticatorManager::respondReceivedInternal(Respond&& respond)
 
     pendingCompletionHandler()(WTFMove(respond));
     clearStateAsync();
+    // FIXME(192061)
+    LOG_ERROR("Stop timer.");
     requestTimeOutTimer().stop();
 }