browser/devtools/webaudioeditor/test/browser_wa_params_view_edit.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:6280a98af63f
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, WebAudioParamView } = panel.panelWin;
11 let gVars = WebAudioParamView._paramsView;
12
13 let started = once(gFront, "start-context");
14
15 reload(target);
16
17 let [[dest, osc, gain], [[_, destID], [_, oscID], [_, gainID]]] = yield Promise.all([
18 get3(gFront, "create-node"),
19 get3Spread(panel.panelWin, EVENTS.UI_ADD_NODE_LIST)
20 ]);
21
22
23 checkVariableView(gVars, 1, {
24 "type": "\"sine\"",
25 "frequency": 440,
26 "detune": 0
27 });
28
29 checkVariableView(gVars, 2, {
30 "gain": 0
31 });
32
33 yield modifyVariableView(panel.panelWin, gVars, 1, "type", "square");
34
35 checkVariableView(gVars, 1, {
36 "type": "\"square\""
37 });
38
39 yield teardown(panel);
40 finish();
41 }
42

mercurial