Changeset 240856 in webkit


Ignore:
Timestamp:
Feb 1, 2019 9:45:22 AM (5 years ago)
Author:
youenn@apple.com
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.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r240845 r240856  
     12019-02-01  Youenn Fablet  <youenn@apple.com>
     2
     3        API Test broken: TestWebKitAPI.WebKit2.GetUserMediaReprompt
     4        https://bugs.webkit.org/show_bug.cgi?id=194155
     5
     6        Reviewed by Eric Carlson.
     7
     8        * TestWebKitAPI/Tests/WebKit/getUserMedia.html:
     9        Revert use of async functions as it seems it cannot be evaluated from TestWebKitAPI.
     10        Keep calling enumerateDevices to continue cover https://bugs.webkit.org/show_bug.cgi?id=194106.
     11
    1122019-02-01  Zalan Bujtas  <zalan@apple.com>
    213
  • trunk/Tools/TestWebKitAPI/Tests/WebKit/getUserMedia.html

    r240830 r240856  
    66            let stream = null;
    77
    8             async function promptForCapture()
     8            function promptForCapture()
    99            {
    10                 try {
    11                     await navigator.mediaDevices.enumerateDevices();
    12                     const stream = await navigator.mediaDevices.getUserMedia({ audio: false, video: true })
     10                navigator.mediaDevices.enumerateDevices().then(() => {
     11                    return navigator.mediaDevices.getUserMedia({ audio: false, video: true })
     12                }).then((s) => {
     13                    stream = s;
    1314                    video.srcObject = stream;
    1415                    console.log("Got user media");
    15                 } catch(error) {
    16                     console.log(`Failed with error: ${error}`);
    17                 }
     16                }).catch((error) => console.log(`Failed with error: ${error}`));
    1817            }
    1918
Note: See TracChangeset for help on using the changeset viewer.