1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/devtools/webaudioeditor/test/browser_wa_params_view_edit.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,42 @@ 1.4 +/* Any copyright is dedicated to the Public Domain. 1.5 + http://creativecommons.org/publicdomain/zero/1.0/ */ 1.6 + 1.7 +/** 1.8 + * Tests if the shader editor shows the appropriate UI when opened. 1.9 + */ 1.10 + 1.11 +function spawnTest() { 1.12 + let [target, debuggee, panel] = yield initWebAudioEditor(SIMPLE_CONTEXT_URL); 1.13 + let { gFront, $, $$, EVENTS, WebAudioParamView } = panel.panelWin; 1.14 + let gVars = WebAudioParamView._paramsView; 1.15 + 1.16 + let started = once(gFront, "start-context"); 1.17 + 1.18 + reload(target); 1.19 + 1.20 + let [[dest, osc, gain], [[_, destID], [_, oscID], [_, gainID]]] = yield Promise.all([ 1.21 + get3(gFront, "create-node"), 1.22 + get3Spread(panel.panelWin, EVENTS.UI_ADD_NODE_LIST) 1.23 + ]); 1.24 + 1.25 + 1.26 + checkVariableView(gVars, 1, { 1.27 + "type": "\"sine\"", 1.28 + "frequency": 440, 1.29 + "detune": 0 1.30 + }); 1.31 + 1.32 + checkVariableView(gVars, 2, { 1.33 + "gain": 0 1.34 + }); 1.35 + 1.36 + yield modifyVariableView(panel.panelWin, gVars, 1, "type", "square"); 1.37 + 1.38 + checkVariableView(gVars, 1, { 1.39 + "type": "\"square\"" 1.40 + }); 1.41 + 1.42 + yield teardown(panel); 1.43 + finish(); 1.44 +} 1.45 +