Bug 1141261 - Immediately disconnecting an audio node is now reflected properly in the web audio graph due to bug 1204595; tests for that scenario. r=vp

This commit is contained in:
Jordan Santell 2015-09-15 17:02:16 -07:00
parent c79f23f06f
commit 13e4c858ae
5 changed files with 59 additions and 3 deletions

View File

@ -12,9 +12,10 @@ support-files =
doc_connect-multi-param.html
doc_iframe-context.html
doc_automation.html
doc_bug_1112378.html
doc_bug_1125817.html
doc_bug_1130901.html
doc_bug_1112378.html
doc_bug_1141261.html
440hz_sine.ogg
head.js
@ -53,6 +54,7 @@ skip-if = true # bug 1092571
[browser_wa_graph-render-04.js]
[browser_wa_graph-render-05.js]
skip-if = true # bug 1092571
[browser_wa_graph-render-06.js]
[browser_wa_graph-selected.js]
[browser_wa_graph-zoom.js]
[browser_wa_inspector.js]

View File

@ -18,7 +18,8 @@ add_task(function*() {
let [actors] = yield Promise.all([
once(gAudioNodes, "add", 2),
once(gAudioNodes, "disconnect")
once(gAudioNodes, "disconnect"),
waitForGraphRendered(panelWin, 2, 0)
]);
ok(true, "Successfully disconnected a just-created node.");

View File

@ -0,0 +1,25 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Tests to ensure that param connections trigger graph redraws
*/
const BUG_1141261_URL = EXAMPLE_URL + "doc_bug_1141261.html";
add_task(function*() {
let { target, panel } = yield initWebAudioEditor(BUG_1141261_URL);
let { panelWin } = panel;
let { gFront, $, $$, EVENTS } = panelWin;
reload(target);
let [actors] = yield Promise.all([
getN(gFront, "create-node", 3),
waitForGraphRendered(panelWin, 3, 1, 0)
]);
ok(true, "Graph correctly shows gain node as disconnected");
yield teardown(target);
});

View File

@ -4,7 +4,7 @@
///////////////////
//
// Whitelisting this test.
// As part of bug 1077403, the leaking uncaught rejection should be fixed.
// As part of bug 1077403, the leaking uncaught rejection should be fixed.
//
thisTestLeaksUncaughtRejectionsAndShouldBeFixed("Error: Connection closed");
@ -53,6 +53,7 @@ add_task(function*() {
reload(target);
yield Promise.all([navigating, started]);
let rendered = waitForGraphRendered(panel.panelWin, 3, 2);
is($("#reload-notice").hidden, true,
"The 'reload this page' notice should be hidden after context found after reload.");
@ -61,5 +62,7 @@ add_task(function*() {
is($("#content").hidden, false,
"The tool's content should reappear without closing and reopening the toolbox.");
yield rendered;
yield teardown(target);
});

View File

@ -0,0 +1,25 @@
<!-- 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 ctx = new AudioContext();
let osc = ctx.createOscillator();
let gain = ctx.createGain();
osc.connect(gain);
gain.connect(ctx.destination);
gain.disconnect();
</script>
</body>
</html>