browser/devtools/webaudioeditor/test/browser_wa_params_view_events.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:832063069617
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
3
4 /**
5 * Tests if the shader editor shows the appropriate UI when opened.
6 */
7
8 function spawnTest() {
9 let [target, debuggee, panel] = yield initWebAudioEditor(SIMPLE_CONTEXT_URL);
10 let { gFront, $, $$, EVENTS } = panel.panelWin;
11
12 let started = once(gFront, "start-context");
13
14 reload(target);
15
16 let [[dest, osc, gain], [[_, destID], [_, oscID], [_, gainID]]] = yield Promise.all([
17 get3(gFront, "create-node"),
18 get3Spread(panel.panelWin, EVENTS.UI_ADD_NODE_LIST)
19 ]);
20
21 is(dest.actorID, destID, "EVENTS.UI_ADD_NODE_LIST fired for node with ID");
22 is(osc.actorID, oscID, "EVENTS.UI_ADD_NODE_LIST fired for node with ID");
23 is(gain.actorID, gainID, "EVENTS.UI_ADD_NODE_LIST fired for node with ID");
24
25 yield teardown(panel);
26 finish();
27 }

mercurial