Title: [240856] trunk/Tools
Revision
240856
Author
[email protected]
Date
2019-02-01 09:45:22 -0800 (Fri, 01 Feb 2019)

Log Message

API Test broken: TestWebKitAPI.WebKit2.GetUserMediaReprompt
https://bugs.webkit.org/show_bug.cgi?id=194155

Reviewed by Eric Carlson.

* TestWebKitAPI/Tests/WebKit/getUserMedia.html:
Revert use of async functions as it seems it cannot be evaluated from TestWebKitAPI.
Keep calling enumerateDevices to continue cover https://bugs.webkit.org/show_bug.cgi?id=194106.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (240855 => 240856)


--- trunk/Tools/ChangeLog	2019-02-01 17:00:18 UTC (rev 240855)
+++ trunk/Tools/ChangeLog	2019-02-01 17:45:22 UTC (rev 240856)
@@ -1,3 +1,14 @@
+2019-02-01  Youenn Fablet  <[email protected]>
+
+        API Test broken: TestWebKitAPI.WebKit2.GetUserMediaReprompt
+        https://bugs.webkit.org/show_bug.cgi?id=194155
+
+        Reviewed by Eric Carlson.
+
+        * TestWebKitAPI/Tests/WebKit/getUserMedia.html:
+        Revert use of async functions as it seems it cannot be evaluated from TestWebKitAPI.
+        Keep calling enumerateDevices to continue cover https://bugs.webkit.org/show_bug.cgi?id=194106.
+
 2019-02-01  Zalan Bujtas  <[email protected]>
 
         [LFC] Adjust replaced element's intrinsic ratio

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit/getUserMedia.html (240855 => 240856)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit/getUserMedia.html	2019-02-01 17:00:18 UTC (rev 240855)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit/getUserMedia.html	2019-02-01 17:45:22 UTC (rev 240856)
@@ -5,16 +5,15 @@
 
             let stream = null;
 
-            async function promptForCapture()
+            function promptForCapture()
             {
-                try {
-                    await navigator.mediaDevices.enumerateDevices();
-                    const stream = await navigator.mediaDevices.getUserMedia({ audio: false, video: true })
+                navigator.mediaDevices.enumerateDevices().then(() => {
+                    return navigator.mediaDevices.getUserMedia({ audio: false, video: true })
+                }).then((s) => {
+                    stream = s;
                     video.srcObject = stream;
                     console.log("Got user media");
-                } catch(error) {
-                    console.log(`Failed with error: ${error}`);
-                }
+                }).catch((error) => console.log(`Failed with error: ${error}`));
             }
 
             function stop(kind)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to