Backed out changeset 03a54839d256 (bug 1068273) for mochitest-dt orange.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 24 Oct 2014 11:06:07 -0400
changeset 234788 1a848854d46458ec7f49c917befd65670a890863
parent 234787 b25b3c530da05bd51ffe96e9716df3a7d9138133
child 234789 4026969d82f45e3f4440d9eea270cf2e081fb6ec
push id611
push userraliiev@mozilla.com
push dateMon, 05 Jan 2015 23:23:16 +0000
treeherdermozilla-release@345cd3b9c445 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1068273
milestone35.0a2
backs out03a54839d256c80c3998373c19e7834c1d82aaca
Backed out changeset 03a54839d256 (bug 1068273) for mochitest-dt orange.
browser/devtools/webaudioeditor/test/browser.ini
browser/devtools/webaudioeditor/test/browser_wa_graph-render-03.js
browser/devtools/webaudioeditor/test/browser_wa_graph-render-05.js
browser/devtools/webaudioeditor/test/doc_connect-toggle-param.html
browser/devtools/webaudioeditor/test/doc_connect-toggle.html
browser/devtools/webaudioeditor/test/head.js
--- a/browser/devtools/webaudioeditor/test/browser.ini
+++ b/browser/devtools/webaudioeditor/test/browser.ini
@@ -2,16 +2,18 @@
 subsuite = devtools
 support-files =
   doc_simple-context.html
   doc_complex-context.html
   doc_simple-node-creation.html
   doc_buffer-and-array.html
   doc_media-node-creation.html
   doc_destroy-nodes.html
+  doc_connect-toggle.html
+  doc_connect-toggle-param.html
   doc_connect-param.html
   doc_connect-multi-param.html
   doc_iframe-context.html
   440hz_sine.ogg
   head.js
 
 [browser_audionode-actor-get-param-flags.js]
 [browser_audionode-actor-get-params-01.js]
--- a/browser/devtools/webaudioeditor/test/browser_wa_graph-render-03.js
+++ b/browser/devtools/webaudioeditor/test/browser_wa_graph-render-03.js
@@ -1,37 +1,34 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /**
  * Tests to ensure that selected nodes stay selected on graph redraw.
  */
 
 function spawnTest() {
-  let { target, panel } = yield initWebAudioEditor(SIMPLE_CONTEXT_URL);
+  let { target, panel } = yield initWebAudioEditor(CONNECT_TOGGLE_URL);
   let { panelWin } = panel;
   let { gFront, $, $$, EVENTS } = panelWin;
 
   reload(target);
 
   let [actors] = yield Promise.all([
     getN(gFront, "create-node", 3),
     waitForGraphRendered(panelWin, 3, 2)
   ]);
 
-  let [dest, osc, gain] = actors;
+  let nodeIDs = actors.map(actor => actor.actorID);
 
-  yield clickGraphNode(panelWin, gain.actorID);
-  ok(findGraphNode(panelWin, gain.actorID).classList.contains("selected"),
+  yield clickGraphNode(panelWin, nodeIDs[1]);
+  ok(findGraphNode(panelWin, nodeIDs[1]).classList.contains("selected"),
     "Node selected once.");
 
-  // Disconnect a node to trigger a rerender
-  osc.disconnect();
-
   yield once(panelWin, EVENTS.UI_GRAPH_RENDERED);
   
-  ok(findGraphNode(panelWin, gain.actorID).classList.contains("selected"),
+  ok(findGraphNode(panelWin, nodeIDs[1]).classList.contains("selected"),
     "Node still selected after rerender.");
 
   yield teardown(panel);
   finish();
 }
 
--- a/browser/devtools/webaudioeditor/test/browser_wa_graph-render-05.js
+++ b/browser/devtools/webaudioeditor/test/browser_wa_graph-render-05.js
@@ -1,31 +1,27 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /**
  * Tests to ensure that param connections trigger graph redraws
  */
 
 function spawnTest() {
-  let { target, panel } = yield initWebAudioEditor(SIMPLE_CONTEXT_URL);
+  let { target, panel } = yield initWebAudioEditor(CONNECT_TOGGLE_PARAM_URL);
   let { panelWin } = panel;
   let { gFront, $, $$, EVENTS } = panelWin;
 
   reload(target);
 
   let [actors] = yield Promise.all([
     getN(gFront, "create-node", 3),
-    waitForGraphRendered(panelWin, 3, 2, 0)
+    waitForGraphRendered(panelWin, 3, 1, 0)
   ]);
+  ok(true, "Graph rendered without param connection");
 
-  let [dest, osc, gain] = actors;
-
-  yield osc.disconnect();
-
-  osc.connectParam(gain, "gain");
   yield waitForGraphRendered(panelWin, 3, 1, 1);
   ok(true, "Graph re-rendered upon param connection");
 
   yield teardown(panel);
   finish();
 }
 
new file mode 100644
--- /dev/null
+++ b/browser/devtools/webaudioeditor/test/doc_connect-toggle-param.html
@@ -0,0 +1,27 @@
+<!-- Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/ -->
+<!doctype html>
+
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>Web Audio Editor test page</title>
+  </head>
+
+  <body>
+
+    <script type="text/javascript;version=1.8">
+      "use strict";
+
+      let i = 0;
+      let ctx = new AudioContext();
+      let osc = ctx.createOscillator();
+      let gain = ctx.createGain();
+      gain.gain.value = 0;
+      gain.connect(ctx.destination);
+      osc.start(0);
+      setTimeout(() => osc.connect(gain.gain), 500);
+    </script>
+  </body>
+
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/devtools/webaudioeditor/test/doc_connect-toggle.html
@@ -0,0 +1,27 @@
+<!-- Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/ -->
+<!doctype html>
+
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>Web Audio Editor test page</title>
+  </head>
+
+  <body>
+
+    <script type="text/javascript;version=1.8">
+      "use strict";
+
+      let i = 0;
+      let ctx = new AudioContext();
+      let osc = ctx.createOscillator();
+      let gain = ctx.createGain();
+      gain.gain.value = 0;
+      gain.connect(ctx.destination);
+      osc.start(0);
+      setInterval(() => ++i && (i % 2 ? osc.connect(gain) : osc.disconnect()), 1000);
+    </script>
+  </body>
+
+</html>
--- a/browser/devtools/webaudioeditor/test/head.js
+++ b/browser/devtools/webaudioeditor/test/head.js
@@ -22,16 +22,18 @@ let TargetFactory = devtools.TargetFacto
 
 const EXAMPLE_URL = "http://example.com/browser/browser/devtools/webaudioeditor/test/";
 const SIMPLE_CONTEXT_URL = EXAMPLE_URL + "doc_simple-context.html";
 const COMPLEX_CONTEXT_URL = EXAMPLE_URL + "doc_complex-context.html";
 const SIMPLE_NODES_URL = EXAMPLE_URL + "doc_simple-node-creation.html";
 const MEDIA_NODES_URL = EXAMPLE_URL + "doc_media-node-creation.html";
 const BUFFER_AND_ARRAY_URL = EXAMPLE_URL + "doc_buffer-and-array.html";
 const DESTROY_NODES_URL = EXAMPLE_URL + "doc_destroy-nodes.html";
+const CONNECT_TOGGLE_URL = EXAMPLE_URL + "doc_connect-toggle.html";
+const CONNECT_TOGGLE_PARAM_URL = EXAMPLE_URL + "doc_connect-toggle-param.html";
 const CONNECT_PARAM_URL = EXAMPLE_URL + "doc_connect-param.html";
 const CONNECT_MULTI_PARAM_URL = EXAMPLE_URL + "doc_connect-multi-param.html";
 const IFRAME_CONTEXT_URL = EXAMPLE_URL + "doc_iframe-context.html";
 
 // All tests are asynchronous.
 waitForExplicitFinish();
 
 let gToolEnabled = Services.prefs.getBoolPref("devtools.webaudioeditor.enabled");