Bug 1507775 [wpt PR 14089] - Remove timeout in async_test for mediacapture-streams tests, a=testonly
authorqiuzhong <zhongx.qiu@intel.com>
Fri, 30 Nov 2018 16:54:16 +0000
changeset 449992 92308fb4e451d0149ba440cf6c85ab8f4e46a57a
parent 449991 5c242afe0b75850a4f099399c9fd172cc2b105a6
child 449993 8ac038131792a5cfdf5e37abf15fe1817c072d93
push id35189
push userccoroiu@mozilla.com
push dateTue, 11 Dec 2018 21:33:05 +0000
treeherdermozilla-central@ac7f3beb6333 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1507775, 14089
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1507775 [wpt PR 14089] - Remove timeout in async_test for mediacapture-streams tests, a=testonly Automatic update from web-platform-testsRemove timeout in async_test for mediacapture-streams tests (#14089) -- wpt-commits: 4054a8840c68fbe3c3385e6a4a0d1aebc209c0fb wpt-pr: 14089
testing/web-platform/tests/mediacapture-streams/GUM-deny.https.html
testing/web-platform/tests/mediacapture-streams/GUM-impossible-constraint.https.html
testing/web-platform/tests/mediacapture-streams/GUM-optional-constraint.https.html
testing/web-platform/tests/mediacapture-streams/GUM-trivial-constraint.https.html
testing/web-platform/tests/mediacapture-streams/MediaStream-add-audio-track.https.html
testing/web-platform/tests/mediacapture-streams/MediaStream-audio-only.https.html
testing/web-platform/tests/mediacapture-streams/MediaStream-finished-add.https.html
testing/web-platform/tests/mediacapture-streams/MediaStream-gettrackid.https.html
testing/web-platform/tests/mediacapture-streams/MediaStream-idl.https.html
testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-audio-is-silence.https.html
testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https.html
testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-end-manual.https.html
testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-id.https.html
--- a/testing/web-platform/tests/mediacapture-streams/GUM-deny.https.html
+++ b/testing/web-platform/tests/mediacapture-streams/GUM-deny.https.html
@@ -11,17 +11,17 @@
     the video stream.</p>
   <h1 class="instructions">Description</h1>
   <p class="instructions">This test checks that the error callback is triggered
     when user denies access to the video stream.</p>
   <div id='log'></div>
   <script src=/resources/testharness.js></script>
   <script src=/resources/testharnessreport.js></script>
   <script>
-    var t = async_test("Tests that the error callback is triggered when permission is denied", {timeout:10000});
+    var t = async_test("Tests that the error callback is triggered when permission is denied");
     t.step(function() {
       navigator.mediaDevices.getUserMedia({video: true})
         .then(t.step_func(function (stream) {
           assert_unreached("The success callback should not be triggered since access is to be denied");
           t.done();
         }), t.step_func(function (error) {
           assert_equals(error.name, "NotAllowedError", "NotAllowedError returned as expected");
           assert_equals(error.constraintName, undefined, "constraintName attribute not set as expected");
--- a/testing/web-platform/tests/mediacapture-streams/GUM-impossible-constraint.https.html
+++ b/testing/web-platform/tests/mediacapture-streams/GUM-impossible-constraint.https.html
@@ -11,17 +11,17 @@
 <h1 class="instructions">Description</h1>
 <p class="instructions">This test checks that setting an impossible mandatory
 constraint (width &gt;=1G) in getUserMedia works</p>
 
 <div id='log'></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script>
-var t = async_test("Tests that setting an impossible constraint in getUserMedia fails", {timeout:10000});
+var t = async_test("Tests that setting an impossible constraint in getUserMedia fails");
 t.step(function() {
   // Note - integer conversion is weird for +inf and numbers > 2^32, so we
   // use a number less than 2^32 for testing.
   navigator.mediaDevices.getUserMedia({video: {width: {min:100000000}}})
     .then(t.step_func(function (stream) {
       assert_unreached("a Video stream of width 100M cannot be created");
       t.done();
     }), t.step_func(function(error) {
--- a/testing/web-platform/tests/mediacapture-streams/GUM-optional-constraint.https.html
+++ b/testing/web-platform/tests/mediacapture-streams/GUM-optional-constraint.https.html
@@ -10,17 +10,17 @@
 <h1 class="instructions">Description</h1>
 <p class="instructions">This test checks that setting an optional constraint in
 getUserMedia is handled as optional</p>
 
 <div id='log'></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script>
-var t = async_test("Tests that setting an optional constraint in getUserMedia is handled as optional", {timeout:10000});
+var t = async_test("Tests that setting an optional constraint in getUserMedia is handled as optional");
 t.step(function() {
   navigator.mediaDevices.getUserMedia({video: {advanced: [{width: {min:1024, max: 800}}]}})
     .then(t.step_func(function (stream) {
       assert_equals(stream.getVideoTracks().length, 1, "the media stream has exactly one video track");
       t.done();
     }), t.step_func(function(error) {
       assert_unreached("an optional constraint can't stop us from obtaining a video stream");
     }));
--- a/testing/web-platform/tests/mediacapture-streams/GUM-trivial-constraint.https.html
+++ b/testing/web-platform/tests/mediacapture-streams/GUM-trivial-constraint.https.html
@@ -10,17 +10,17 @@
 <h1 class="instructions">Description</h1>
 <p class="instructions">This test checks that setting a trivial mandatory
 constraint (width &gt;=0) in getUserMedia works</p>
 
 <div id='log'></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script>
-var t = async_test("Tests that setting a trivial mandatory constraint in getUserMedia works", {timeout:10000});
+var t = async_test("Tests that setting a trivial mandatory constraint in getUserMedia works");
 t.step(function() {
   navigator.mediaDevices.getUserMedia({video: {width: {min:0}}})
     .then(t.step_func(function (stream) {
       assert_equals(stream.getVideoTracks().length, 1, "the media stream has exactly one video track");
       t.done();
     }), t.step_func(function(error) {
       assert_unreached("a Video stream of minimally zero width can always be created");
       t.done();
--- a/testing/web-platform/tests/mediacapture-streams/MediaStream-add-audio-track.https.html
+++ b/testing/web-platform/tests/mediacapture-streams/MediaStream-add-audio-track.https.html
@@ -10,17 +10,17 @@
 <p class="instructions">When prompted, accept to share your audio stream, then your video stream.</p>
 <h1 class="instructions">Description</h1>
 <p class="instructions">This test checks that adding a track to a MediaStream works as expected.</p>
 
 <div id='log'></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script>
-var t = async_test("Tests that adding a track to a MediaStream works as expected", {timeout: 20000}); // longer timeout since requires double user interaction
+var t = async_test("Tests that adding a track to a MediaStream works as expected");
 t.step(function () {
   var audio, video;
 
   navigator.mediaDevices.getUserMedia({audio: true}).then(gotAudio);
   function gotAudio(stream) {
     audio = stream;
     navigator.mediaDevices.getUserMedia({video: true}).then(gotVideo);
   }
--- a/testing/web-platform/tests/mediacapture-streams/MediaStream-audio-only.https.html
+++ b/testing/web-platform/tests/mediacapture-streams/MediaStream-audio-only.https.html
@@ -12,17 +12,17 @@
 <p class="instructions">This test checks that the MediaStream object returned by
 the success callback in getUserMedia has exactly one audio track.</p>
 
 <div id='log'></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script>
 var astream;
-var t = async_test("Tests that a MediaStream with exactly one audio track is returned", {timeout: 10000});
+var t = async_test("Tests that a MediaStream with exactly one audio track is returned");
 t.step(function() {
   navigator.mediaDevices.getUserMedia({audio:true}).then(t.step_func(function (stream) {
     astream = stream;
     assert_true(stream instanceof MediaStream, "getUserMedia success callback comes with a MediaStream object");
     assert_equals(stream.getAudioTracks().length, 1, "the media stream has exactly one audio track");
     assert_equals(stream.getAudioTracks()[0].kind, "audio", "getAudioTracks() returns a sequence of tracks whose kind is 'audio'");
     assert_equals(stream.getVideoTracks().length, 0, "the media stream has zero video track");
     t.done();
--- a/testing/web-platform/tests/mediacapture-streams/MediaStream-finished-add.https.html
+++ b/testing/web-platform/tests/mediacapture-streams/MediaStream-finished-add.https.html
@@ -12,17 +12,17 @@ your video stream.</p>
 <h1 class="instructions">Description</h1>
 <p class="instructions">This test checks that adding a track to an inactive
 MediaStream is allowed.</p>
 
 <div id='log'></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script>
-var t = async_test("Tests that adding a track to an inactive MediaStream is allowed", {timeout:20000});
+var t = async_test("Tests that adding a track to an inactive MediaStream is allowed");
 t.step(function () {
   var audio, video;
 
   navigator.mediaDevices.getUserMedia({audio:true}).then(gotAudio);
   function gotAudio(stream) {
     audio = stream;
     navigator.mediaDevices.getUserMedia({video:true}).then(gotVideo);
   }
--- a/testing/web-platform/tests/mediacapture-streams/MediaStream-gettrackid.https.html
+++ b/testing/web-platform/tests/mediacapture-streams/MediaStream-gettrackid.https.html
@@ -9,17 +9,17 @@
 <p class="instructions">When prompted, accept to share your video stream.</p>
 <h1 class="instructions">Description</h1>
 <p class="instructions">This test checks that MediaStream.getTrackById behaves as expected</p>
 
 <div id='log'></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script>
-var t = async_test("Tests that MediaStream.getTrackById works as expected", {timeout: 10000});
+var t = async_test("Tests that MediaStream.getTrackById works as expected");
 t.step(function () {
   navigator.mediaDevices.getUserMedia({video: true})
       .then(t.step_func(gotVideo), t.step_func(function (error) {
         assert_unreached('Unexpected getUserMedia error: ' + error);
       }));
   function gotVideo(stream) {
     var track = stream.getVideoTracks()[0];
     assert_equals(track, stream.getTrackById(track.id), "getTrackById returns track of given id");
--- a/testing/web-platform/tests/mediacapture-streams/MediaStream-idl.https.html
+++ b/testing/web-platform/tests/mediacapture-streams/MediaStream-idl.https.html
@@ -15,17 +15,17 @@
 <h1 class="instructions">Description</h1>
 <p class="instructions">This test checks that the MediaStream constructor
 follows the algorithm set in the spec.</p>
 
 <div id='log'></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script>
-let t = async_test("Tests that a MediaStream constructor follows the algorithm set in the spec", {timeout: 10000});
+let t = async_test("Tests that a MediaStream constructor follows the algorithm set in the spec");
 t.step(() => {
   navigator.mediaDevices.getUserMedia({video: true, audio:true})
     .then(t.step_func(stream => {
       let stream1 = new MediaStream();
       assert_not_equals(stream.id, stream1.id, "Two different MediaStreams have different ids");
       let stream2 = new MediaStream(stream);
       assert_not_equals(stream.id, stream2.id, "A MediaStream constructed from another has a different id");
       let audioTrack1 = stream.getAudioTracks()[0];
--- a/testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-audio-is-silence.https.html
+++ b/testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-audio-is-silence.https.html
@@ -13,17 +13,17 @@
 MediaStream is rendered as silence. It relies on the
 <a href="https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html">
 Web Audio API</a>.</p>
 
 <div id='log'></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script>
-var t = async_test("Tests that a disabled audio track in a MediaStream is rendered as silence", {timeout: 200000});
+var t = async_test("Tests that a disabled audio track in a MediaStream is rendered as silence");
 var aud = document.getElementById("aud");
 t.step(function() {
   navigator.mediaDevices.getUserMedia({audio: true}).then(t.step_func(function (stream) {
     var ctx = new AudioContext();
     var streamSource = ctx.createMediaStreamSource(stream);
     var silenceDetector = ctx.createScriptProcessor(1024);
     var count = 10;
     silenceDetector.onaudioprocess = t.step_func(function (e) {
--- a/testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https.html
+++ b/testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https.html
@@ -14,17 +14,17 @@ MediaStream is rendered as blackness.</p
 <video id="vid"></video>
 
 <div id='log'></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script>
 var vid = document.getElementById("vid");
 var cv = document.createElement("canvas");
-var t = async_test("Tests that a disabled video track in a MediaStream is rendered as blackness", {timeout: 10000});
+var t = async_test("Tests that a disabled video track in a MediaStream is rendered as blackness");
 t.step(function() {
   navigator.mediaDevices.getUserMedia({video: true})
     .then(t.step_func(function (stream) {
       if (stream.getVideoTracks()[0].enabled) {
         stream.getVideoTracks()[0].enabled = false;
       }
 
       var testOnceLoadeddata = t.step_func(function() {
--- a/testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-end-manual.https.html
+++ b/testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-end-manual.https.html
@@ -12,17 +12,17 @@ stream, and then revoke that permission.
 <p class="instructions">This test checks that the video and audio tracks of
 MediaStream object returned by the success callback in getUserMedia are
 correctly set into inactive state when permission is revoked.</p>
 
 <div id='log'></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script>
-var t = async_test("Tests that the video MediaStreamTrack objects are properly ended on permission revocation", {timeout: 20000}); // longer timeout since requires user interaction
+var t = async_test("Tests that the video MediaStreamTrack objects are properly ended on permission revocation");
 t.step(function () {
   navigator.mediaDevices.getUserMedia({audio: true,video: true}).then(t.step_func(function (stream) {
     var vidTrack = stream.getVideoTracks()[0];
     assert_equals(vidTrack.readyState, "live", "The video track object is in live state");
     var audTrack = stream.getAudioTracks()[0];
     assert_equals(audTrack.readyState, "live", "The audio track object is in live state");
     vidTrack.onended = t.step_func(function () {
         assert_equals(vidTrack.readyState, "ended", "Video track has been ended as expected");
--- a/testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-id.https.html
+++ b/testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-id.https.html
@@ -9,17 +9,17 @@
 <p class="instructions">When prompted, accept to share your audio and video stream.</p>
 <h1 class="instructions">Description</h1>
 <p class="instructions">This test checks that distinct mediastream tracks have distinct ids.</p>
 
 <div id='log'></div>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script>
-var t = async_test("Tests that distinct mediastream tracks have distinct ids ", {timeout: 10000});
+var t = async_test("Tests that distinct mediastream tracks have distinct ids ");
 t.step(function () {
   navigator.mediaDevices.getUserMedia({video: true, audio: true})
     .then(t.step_func(gotStream), t.step_func(function(error) {t.assert_unreached("Access to audio and video stream is granted");}));
   function gotStream(stream) {
     assert_not_equals(stream.getVideoTracks()[0], stream.getAudioTracks()[0].id, "audio and video tracks have distinct ids");
     t.done();
   }
 });