Bug 1488832 - Add mochitest. r=jib
authorAndreas Pehrson <apehrson@mozilla.com>
Fri, 21 Sep 2018 18:50:19 +0000
changeset 437860 c808e4d6fb53d795b1e2712a126565f3698976c9
parent 437859 6f81edbb4e875c36873586cea21f5b3d5a1497f8
child 437861 2ea7113db27c18e1ed64deab6984dbed7d88f521
push id69809
push userpehrsons@gmail.com
push dateMon, 24 Sep 2018 09:34:33 +0000
treeherderautoland@fe9563002b6f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1488832
milestone64.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 1488832 - Add mochitest. r=jib Differential Revision: https://phabricator.services.mozilla.com/D6390
dom/media/tests/mochitest/mochitest.ini
dom/media/tests/mochitest/test_1488832.html
--- a/dom/media/tests/mochitest/mochitest.ini
+++ b/dom/media/tests/mochitest/mochitest.ini
@@ -20,16 +20,17 @@ support-files =
   !/dom/canvas/test/webgl-mochitest/webgl-util.js
   !/dom/media/test/manifest.js
   !/dom/media/test/320x240.ogv
   !/dom/media/test/r11025_s16_c1.wav
   !/dom/media/test/bug461281.ogg
   !/dom/media/test/seek.webm
   !/dom/media/test/gizmo.mp4
 
+[test_1488832.html]
 [test_a_noOp.html]
 [test_dataChannel_basicAudio.html]
 skip-if = (android_version == '18') # Bug 962984 for debug, bug 963244 for opt
 [test_dataChannel_basicAudioVideo.html]
 skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_dataChannel_basicAudioVideoNoBundle.html]
 skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_dataChannel_basicAudioVideoCombined.html]
new file mode 100644
--- /dev/null
+++ b/dom/media/tests/mochitest/test_1488832.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script type="application/javascript" src="mediaStreamPlayback.js"></script>
+</head>
+<body>
+<iframe id="testframe"></iframe>
+<script>
+"use strict";
+
+createHTML({
+  title: "gUM shutdown race",
+  bug: "1488832"
+});
+
+runTest(async () => {
+  testframe.srcdoc = `
+  <html>
+  <head>
+  <script>
+  function start() {
+    for (let i = 0; i < 16; i++) {
+      window.navigator.mediaDevices.getUserMedia({video: true})
+      setTimeout('location.reload()', 100)
+    }
+  }
+  document.addEventListener('DOMContentLoaded', start)
+  </` + `script>
+  </head>
+  </html>`;
+
+  await wait(10000);
+  testframe.srcdoc = "";
+});
+</script>
+</body>
+</html>