Title: [256841] trunk/LayoutTests
Revision
256841
Author
you...@apple.com
Date
2020-02-18 10:58:04 -0800 (Tue, 18 Feb 2020)

Log Message

REGRESSION (256034): http/tests/media/media-stream/get-display-media-prompt.html is failing
https://bugs.webkit.org/show_bug.cgi?id=207893
<rdar://problem/59551315>

Reviewed by Eric Carlson.

After 256034, we are allowing { audio: true } for getDisplayMedia.
Update the test accordingly, and make it easier to debug by resetting the number of getDisplayMedia prompt for each test
so that they are more indepedent.

* http/tests/media/media-stream/get-display-media-prompt-expected.txt:
* http/tests/media/media-stream/get-display-media-prompt.html:
* platform/mac-wk2/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (256840 => 256841)


--- trunk/LayoutTests/ChangeLog	2020-02-18 18:39:55 UTC (rev 256840)
+++ trunk/LayoutTests/ChangeLog	2020-02-18 18:58:04 UTC (rev 256841)
@@ -1,3 +1,19 @@
+2020-02-18  Youenn Fablet  <you...@apple.com>
+
+        REGRESSION (256034): http/tests/media/media-stream/get-display-media-prompt.html is failing
+        https://bugs.webkit.org/show_bug.cgi?id=207893
+        <rdar://problem/59551315>
+
+        Reviewed by Eric Carlson.
+
+        After 256034, we are allowing { audio: true } for getDisplayMedia.
+        Update the test accordingly, and make it easier to debug by resetting the number of getDisplayMedia prompt for each test
+        so that they are more indepedent.
+
+        * http/tests/media/media-stream/get-display-media-prompt-expected.txt:
+        * http/tests/media/media-stream/get-display-media-prompt.html:
+        * platform/mac-wk2/TestExpectations:
+
 2020-02-18  Zalan Bujtas  <za...@apple.com>
 
         [LFC][Quirk] Add additional escape reason to cover the case when body needs access to both the body and the ICB geometry

Modified: trunk/LayoutTests/http/tests/media/media-stream/get-display-media-prompt-expected.txt (256840 => 256841)


--- trunk/LayoutTests/http/tests/media/media-stream/get-display-media-prompt-expected.txt	2020-02-18 18:39:55 UTC (rev 256840)
+++ trunk/LayoutTests/http/tests/media/media-stream/get-display-media-prompt-expected.txt	2020-02-18 18:58:04 UTC (rev 256841)
@@ -6,10 +6,9 @@
 PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 0
 
 ** Request an audio-only stream, the user should not be prompted **
-PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 0
-PASS stream is undefined.
-PASS err instanceof Error  is true
-PASS err.name is "TypeError"
+PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 1
+PASS stream.getAudioTracks().length is 0
+PASS stream.getVideoTracks().length is 1
 
 ** Request an video-only stream, the user should be prompted **
 PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 1
@@ -17,35 +16,35 @@
 PASS stream.getVideoTracks().length is 1
 
 ** Request a stream with audio and video, the user should be prompted but no audio track should be created **
-PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 2
+PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 1
 PASS stream.getAudioTracks().length is 0
 PASS stream.getVideoTracks().length is 1
 
 ** Request a stream with 'max' constraints, the user should not be prompted **
-PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 2
+PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 0
 PASS stream is undefined.
 PASS err instanceof Error  is true
 PASS err.name is "TypeError"
 
 ** Request a stream with 'min' constraints, the user should not be prompted **
-PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 2
+PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 0
 PASS stream is undefined.
 PASS err instanceof Error  is true
 PASS err.name is "TypeError"
 
 ** Request a stream with 'advanced' constraints, the user should not be prompted **
-PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 2
+PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 0
 PASS stream is undefined.
 PASS err instanceof Error  is true
 PASS err.name is "TypeError"
 
 ** Request a stream with valid constraints, the user should be prompted **
-PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 3
+PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 1
 PASS stream.getAudioTracks().length is 0
 PASS stream.getVideoTracks().length is 1
 
 ** Request a stream with an exact audio constraint, it should be ignored **
-PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 4
+PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 1
 PASS stream.getAudioTracks().length is 0
 PASS stream.getVideoTracks().length is 1
 

Modified: trunk/LayoutTests/http/tests/media/media-stream/get-display-media-prompt.html (256840 => 256841)


--- trunk/LayoutTests/http/tests/media/media-stream/get-display-media-prompt.html	2020-02-18 18:39:55 UTC (rev 256840)
+++ trunk/LayoutTests/http/tests/media/media-stream/get-display-media-prompt.html	2020-02-18 18:58:04 UTC (rev 256841)
@@ -27,16 +27,16 @@
     
     async function promptForAudioOnly() {
         debug("<br>** Request an audio-only stream, the user should not be prompted **");
-        stream = await callGetDisplayMedia({ audio: true })
-            .catch((e) => { err = e; });
-        shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "0");
-        shouldBeUndefined("stream");
-        shouldBeTrue("err instanceof Error ");
-        shouldBeEqualToString("err.name", "TypeError");
+        testRunner.resetUserMediaPermissionRequestCountForOrigin(document.location.href, document.location.href);
+        stream = await callGetDisplayMedia({ audio: true });
+        shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "1");
+        shouldBe("stream.getAudioTracks().length", "0");
+        shouldBe("stream.getVideoTracks().length", "1");
     }
 
     async function promptForVideoOnly() {
         debug("<br>** Request an video-only stream, the user should be prompted **");
+        testRunner.resetUserMediaPermissionRequestCountForOrigin(document.location.href, document.location.href);
         stream = await callGetDisplayMedia({ video: true });
         shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "1");
         shouldBe("stream.getAudioTracks().length", "0");
@@ -45,8 +45,9 @@
 
     async function promptForAudioAndVideo() {
         debug("<br>** Request a stream with audio and video, the user should be prompted but no audio track should be created **");
+        testRunner.resetUserMediaPermissionRequestCountForOrigin(document.location.href, document.location.href);
         stream = await callGetDisplayMedia({ video: true, audio: true });
-        shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "2");
+        shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "1");
         shouldBe("stream.getAudioTracks().length", "0");
         shouldBe("stream.getVideoTracks().length", "1");
     }
@@ -54,11 +55,12 @@
     async function promptWithExactVideoConstraints() {
         debug("<br>** Request a stream with 'max' constraints, the user should not be prompted **");
 
+        testRunner.resetUserMediaPermissionRequestCountForOrigin(document.location.href, document.location.href);
         stream = null;
         stream = await callGetDisplayMedia({ video: {width: {exact: 640}, height: {exact: 480}} })
             .catch((e) => { err = e; });
         
-        shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "2");
+        shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "0");
         shouldBeUndefined("stream");
         shouldBeTrue("err instanceof Error ");
         shouldBeEqualToString("err.name", "TypeError");
@@ -67,10 +69,11 @@
     async function promptWithMinVideoConstraints() {
         debug("<br>** Request a stream with 'min' constraints, the user should not be prompted **");
 
+        testRunner.resetUserMediaPermissionRequestCountForOrigin(document.location.href, document.location.href);
         stream = null;
         stream = await callGetDisplayMedia({ video: {width: {min: 640}, height: {min: 480}} })
             .catch((e) => { err = e; });
-        shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "2");
+        shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "0");
         shouldBeUndefined("stream");
         shouldBeTrue("err instanceof Error ");
         shouldBeEqualToString("err.name", "TypeError");
@@ -79,10 +82,11 @@
     async function promptWithAdvancedVideoConstraints() {
         debug("<br>** Request a stream with 'advanced' constraints, the user should not be prompted **");
 
+        testRunner.resetUserMediaPermissionRequestCountForOrigin(document.location.href, document.location.href);
         stream = null;
         stream = await callGetDisplayMedia({ video: { width: 640, height: 480, advanced: [ { width: 1920, height: 1280 } ] } })
             .catch((e) => { err = e; });
-        shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "2");
+        shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "0");
         shouldBeUndefined("stream");
         shouldBeTrue("err instanceof Error ");
         shouldBeEqualToString("err.name", "TypeError");
@@ -91,11 +95,12 @@
     async function promptWithValidVideoConstraints() {
         debug("<br>** Request a stream with valid constraints, the user should be prompted **");
 
+        testRunner.resetUserMediaPermissionRequestCountForOrigin(document.location.href, document.location.href);
         stream = null;
         stream = await callGetDisplayMedia({ video: {width: 640, height: 480} })
             .catch((e) => { err = e; });
         
-        shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "3");
+        shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "1");
         shouldBe("stream.getAudioTracks().length", "0");
         shouldBe("stream.getVideoTracks().length", "1");
     }
@@ -103,9 +108,10 @@
     async function promptWithInvalidAudioConstraint() {
         debug("<br>** Request a stream with an exact audio constraint, it should be ignored **");
 
+        testRunner.resetUserMediaPermissionRequestCountForOrigin(document.location.href, document.location.href);
         stream = null;
         stream = await callGetDisplayMedia({ video: true, audio: { volume: { exact: 0.5 } } });
-        shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "4");
+        shouldBe("numberOfTimesGetUserMediaPromptHasBeenCalled()", "1");
         shouldBe("stream.getAudioTracks().length", "0");
         shouldBe("stream.getVideoTracks().length", "1");
     }

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (256840 => 256841)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2020-02-18 18:39:55 UTC (rev 256840)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2020-02-18 18:58:04 UTC (rev 256841)
@@ -936,8 +936,6 @@
 
 webkit.org/b/206940 [ Mojave+ ] tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html [ Pass Failure ]
 
-webkit.org/b/206958 http/tests/media/media-stream/get-display-media-prompt.html [ Pass Failure Timeout ]
-
 webkit.org/b/206961 [ Mojave ] media/media-fragments/TC0035.html [ Pass Failure ]
 
 webkit.org/b/207003 tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html [ Pass Failure ]
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to