Bug 1575271 - Add crashtest. r=karlt a=lizzard
authorAndreas Pehrson <apehrson@mozilla.com>
Tue, 10 Sep 2019 05:29:36 +0000
changeset 555040 7a2c20bfec7270f0de82701d23d39d97e7822338
parent 555039 c5e6986c6cead088c8616ca778cb91044ee8cae1
child 555041 705b2a73e8f4a35ffebbc38bc8bbd02968dd1040
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt, lizzard
bugs1575271
milestone70.0
Bug 1575271 - Add crashtest. r=karlt a=lizzard Differential Revision: https://phabricator.services.mozilla.com/D45194
dom/media/test/crashtests/1575271.html
dom/media/test/crashtests/crashtests.list
new file mode 100644
--- /dev/null
+++ b/dom/media/test/crashtests/1575271.html
@@ -0,0 +1,25 @@
+<html class="reftest-wait">
+<head>
+<script>
+  async function start () {
+    const canvas = document.createElement("canvas")
+    const context = canvas.getContext("2d")
+    context.fillStyle = "blue"
+    context.fillRect(0, 0, canvas.width, canvas.height)
+    const stream = canvas.captureStream()
+    const track = stream.getTracks()[0]
+    const recorder = new MediaRecorder(stream)
+    recorder.start()
+    await new Promise(r => recorder.onstart = r)
+    recorder.pause()
+    stream.removeTrack(track)
+    recorder.resume()
+    await new Promise(r => recorder.onstop = r)
+    document.documentElement.removeAttribute("class")
+  }
+
+  window.addEventListener('load', start)
+</script>
+</head>
+</html>
+
--- a/dom/media/test/crashtests/crashtests.list
+++ b/dom/media/test/crashtests/crashtests.list
@@ -125,9 +125,10 @@ load 1533909.html
 load 1538727.html
 load empty-samples.webm # Bug 1540580
 test-pref(media.autoplay.block-webaudio,false) load 1545133.html
 load track-with-zero-dimensions.mp4 # Bug 1542539
 load 1560215.html
 skip-if(Android) load 1547784.html # Skip on Android as clearkey is not supported
 load 1547899.html
 load 1569645.html
+load 1575271.html
 load 1577184.html