Bug 1343550 - Mochitest. r=baku
authorPaul Adenot <paul@paul.cx>
Thu, 09 Mar 2017 14:09:48 +0100
changeset 350104 b6c3fcf039a980c96cac45cea00d91ce441a42f0
parent 350103 8e22b608af25e273d0cc5d6347bd1112f9de1be1
child 350105 aac9899a66462ab8a3391ae9025c3e77a89975cc
push id31568
push userkwierso@gmail.com
push dateTue, 28 Mar 2017 20:31:07 +0000
treeherdermozilla-central@272ce6c25721 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1343550
milestone55.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 1343550 - Mochitest. r=baku MozReview-Commit-ID: 72V86HrbVCl
dom/media/webaudio/test/mochitest.ini
dom/media/webaudio/test/test_nodeCreationDocumentGone.html
--- a/dom/media/webaudio/test/mochitest.ini
+++ b/dom/media/webaudio/test/mochitest.ini
@@ -169,16 +169,17 @@ tags=capturestream
 [test_mediaStreamAudioSourceNodeResampling.html]
 tags=capturestream
 [test_mixingRules.html]
 skip-if = toolkit == 'android' # bug 1091965
 [test_mozaudiochannel.html]
 # Android: bug 1061675; OSX 10.6: bug 1097721
 skip-if = (toolkit == 'android') || (os == 'mac' && os_version == '10.6')
 [test_nodeToParamConnection.html]
+[test_nodeCreationDocumentGone.html]
 [test_OfflineAudioContext.html]
 [test_offlineDestinationChannelCountLess.html]
 [test_offlineDestinationChannelCountMore.html]
 [test_oscillatorNode.html]
 [test_oscillatorNode2.html]
 [test_oscillatorNodeNegativeFrequency.html]
 [test_oscillatorNodePassThrough.html]
 [test_oscillatorNodeStart.html]
new file mode 100644
--- /dev/null
+++ b/dom/media/webaudio/test/test_nodeCreationDocumentGone.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <title>Test whether we can create an AudioContext interface</title>
+  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+</head>
+<body>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+
+SimpleTest.waitForExplicitFinish();
+
+SpecialPowers.pushPrefEnv({
+  set: [
+    [ "dom.disable_open_during_load", false ]
+  ]
+}).then(function() {
+  var sub = encodeURI("data:text/html,<!DOCTYPE html>\n"+
+                      "<html><script>"+
+                      "var context = new AudioContext();"+
+                      "setTimeout(function(){window.close();},1000);\x3C/script></html>");
+  window.onload = function(){
+    var a = window.open(sub);
+    a.onbeforeunload = function(){
+      setTimeout(function(){
+        try {
+          a.context.createScriptProcessor(512, 1, 1);
+        } catch(e) {
+          ok (true,"got exception");
+        }
+        setTimeout(function() {
+        ok (true,"no crash");
+          SimpleTest.finish();
+        }, 0);
+      }, 0);
+    };
+  };
+});
+
+
+</script>
+</pre>
+</body>
+</html>