Bug 1429507 - Add crashtests. r?jib draft
authorAndreas Pehrson <pehrsons@mozilla.com>
Thu, 15 Mar 2018 15:26:06 +0100
changeset 802866 a979a23ca0d011bb2f0e030114c97751de6f8c4a
parent 799714 1bdf8e7d1cfe6d8b9bfa891f43473345210ee281
push id111984
push userbmo:apehrson@mozilla.com
push dateFri, 01 Jun 2018 15:22:02 +0000
reviewersjib
bugs1429507
milestone62.0a1
Bug 1429507 - Add crashtests. r?jib MozReview-Commit-ID: GnO6PJYM9Eb
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