Bug 1429507 - Add crashtests. r?jib
authorAndreas Pehrson <pehrsons@mozilla.com>
Thu, 15 Mar 2018 15:26:06 +0100
changeset 1528759 8f64026717998f12526c9689ff5ae5c0b320bb1c
parent 1521849 1bdf8e7d1cfe6d8b9bfa891f43473345210ee281
child 1528760 585269a00bb625878e8a0b248f99bfb48d0466c3
push id275992
push userpehrsons@gmail.com
push dateFri, 01 Jun 2018 12:25:26 +0000
treeherdertry@585269a00bb6 [default view] [failures only]
reviewersjib
bugs1429507
milestone62.0a1
Bug 1429507 - Add crashtests. r?jib
dom/media/tests/crashtests/1429507_1.html
dom/media/tests/crashtests/1429507_2.html
dom/media/tests/crashtests/crashtests.list
new file mode 100644
--- /dev/null
+++ b/dom/media/tests/crashtests/1429507_1.html
@@ -0,0 +1,13 @@
+<html>
+  <head>
+    <script>
+      try { o1 = window.open("") } catch (e) {}
+      try { o1.location.reload() } catch (e) {}
+      try { o2 = new RTCPeerConnection({iceServers: [{"url": "stun:d"}]}) } catch (e) {}
+      try { o1.navigator.mediaDevices.getUserMedia({video: true, fake: true}).catch((error) => {}) } catch (e) {}
+      try { o2.createOffer({offerToReceiveVideo: true}).then((offer) => {
+        try { o1.navigator.mediaDevices.getUserMedia({video: true}) } catch (e) {};
+      }) } catch (e) {}
+    </script>
+  </head>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/media/tests/crashtests/1429507_2.html
@@ -0,0 +1,15 @@
+<html>
+  <head>
+    <script>
+      try { o1 = window.open("") } catch(e) { }
+      try { o1.location.reload() } catch(e) { }
+      try { o2 = o1.navigator } catch(e) { }
+      try { o3 = o2.mediaDevices } catch(e) { }
+      try { o4 = new XMLHttpRequest() } catch(e) { }
+      try { o3.getUserMedia({video: true, fake: true }).then((stream) => {}).catch((error) => {}) } catch (e) {}
+      try { o4.open("T", "aa", false) } catch(e) { }
+      try { o4.send() } catch(e) { }
+      try { o3.getUserMedia({video: true}).then((stream) => {}).catch((error) => {}) } catch (e) {}
+    </script>
+  </head>
+</html>
--- a/dom/media/tests/crashtests/crashtests.list
+++ b/dom/media/tests/crashtests/crashtests.list
@@ -1,9 +1,9 @@
-default-preferences  pref(media.peerconnection.enabled,true) pref(media.navigator.permission.disabled,true)
+default-preferences  pref(media.peerconnection.enabled,true) pref(media.navigator.permission.disabled,true) pref(dom.disable_open_during_load,false)
 
 load 780790.html
 load 791270.html
 load 791278.html
 load 791330.html
 load 799419.html
 load 802982.html
 load 812785.html
@@ -15,9 +15,11 @@ load 860143.html
 load 861958.html
 load 863929.html
 load 1185191.html
 load 1281695.html
 load 1306476.html
 load 1348381.html
 load 1367930_1.html
 load 1367930_2.html
+pref(browser.link.open_newwindow,2) load 1429507_1.html # window.open() in tab doesn't work for crashtest in e10s, this opens a new window instead
+pref(browser.link.open_newwindow,2) load 1429507_2.html # window.open() in tab doesn't work for crashtest in e10s, this opens a new window instead
 load 1453030.html