[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>
Wed, 9 Jan 2019 01:11:08 +0000 (01:11 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Jan 2019 01:11:08 +0000 (01:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=192061

Reviewed by Dewei Zhu.

Part 6.

Add some additional temporary logging info to determine if data is actually sent.
Once the bug is determined and fixed, we should remove all logging added in this patch.

* UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
(WebKit::MockHidConnection::send):

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidConnection.cpp

index b6fd324..907ecc8 100644 (file)
@@ -1,5 +1,20 @@
 2019-01-08  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 6.
+
+        Add some additional temporary logging info to determine if data is actually sent.
+        Once the bug is determined and fixed, we should remove all logging added in this patch.
+
+        * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
+        (WebKit::MockHidConnection::send):
+
+2019-01-08  Jiewen Tan  <jiewen_tan@apple.com>
+
         [WebAuthN] Support U2F HID Authenticators on macOS
         https://bugs.webkit.org/show_bug.cgi?id=191535
         <rdar://problem/47102027>
index d86a3a4..0d985e6 100644 (file)
@@ -70,17 +70,23 @@ void MockHidConnection::terminate()
 
 void MockHidConnection::send(Vector<uint8_t>&& data, DataSentCallback&& callback)
 {
+    // FIXME(192061): Remove all LOG_ERRORs.
+    LOG_ERROR("Sending data: Phase 1. Current time: %f.", MonotonicTime::now().secondsSinceEpoch().value());
     ASSERT(m_initialized);
     auto task = makeBlockPtr([weakThis = makeWeakPtr(*this), data = WTFMove(data), callback = WTFMove(callback)]() mutable {
         ASSERT(!RunLoop::isMain());
+        LOG_ERROR("Sending data: Phase 2. Current time: %f.", MonotonicTime::now().secondsSinceEpoch().value());
         RunLoop::main().dispatch([weakThis, data = WTFMove(data), callback = WTFMove(callback)]() mutable {
+            LOG_ERROR("Sending data: Phase 3. Current time: %f.", MonotonicTime::now().secondsSinceEpoch().value());
             if (!weakThis) {
                 callback(DataSent::No);
                 return;
             }
 
+            LOG_ERROR("Sending data: Phase 4. Current time: %f.", MonotonicTime::now().secondsSinceEpoch().value());
             weakThis->assembleRequest(WTFMove(data));
 
+            LOG_ERROR("Sending data: Phase 5. Current time: %f.", MonotonicTime::now().secondsSinceEpoch().value());
             auto sent = DataSent::Yes;
             if (weakThis->stagesMatch() && weakThis->m_configuration.hid->error == Mock::Error::DataNotSent)
                 sent = DataSent::No;