Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 /**
5 * Tests if the shader editor shows the appropriate UI when opened.
6 */
8 function spawnTest() {
9 let [target, debuggee, panel] = yield initWebAudioEditor(SIMPLE_CONTEXT_URL);
10 let { panelWin } = panel;
11 let { gFront, $, $$, EVENTS, WebAudioParamView } = panelWin;
12 let gVars = WebAudioParamView._paramsView;
14 let started = once(gFront, "start-context");
16 reload(target);
18 let [[dest, osc, gain], [[_, destID], [_, oscID], [_, gainID]]] = yield Promise.all([
19 get3(gFront, "create-node"),
20 get3Spread(panelWin, EVENTS.UI_ADD_NODE_LIST),
21 waitForGraphRendered(panelWin, 3, 2)
22 ]);
24 ok(findGraphNode(panelWin, oscID).classList.contains("type-OscillatorNode"), "found OscillatorNode with class");
25 ok(findGraphNode(panelWin, gainID).classList.contains("type-GainNode"), "found GainNode with class");
26 ok(findGraphNode(panelWin, destID).classList.contains("type-AudioDestinationNode"), "found AudioDestinationNode with class");
27 is(findGraphEdge(panelWin, oscID, gainID).toString(), "[object SVGGElement]", "found edge for osc -> gain");
28 is(findGraphEdge(panelWin, gainID, destID).toString(), "[object SVGGElement]", "found edge for gain -> dest");
30 yield teardown(panel);
31 finish();
32 }