michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: /** michael@0: * Tests if the shader editor shows the appropriate UI when opened. michael@0: */ michael@0: michael@0: function spawnTest() { michael@0: let [target, debuggee, panel] = yield initWebAudioEditor(SIMPLE_CONTEXT_URL); michael@0: let { gFront, $, $$, EVENTS, WebAudioParamView } = panel.panelWin; michael@0: let gVars = WebAudioParamView._paramsView; michael@0: michael@0: let started = once(gFront, "start-context"); michael@0: michael@0: reload(target); michael@0: michael@0: let [[dest, osc, gain], [[_, destID], [_, oscID], [_, gainID]]] = yield Promise.all([ michael@0: get3(gFront, "create-node"), michael@0: get3Spread(panel.panelWin, EVENTS.UI_ADD_NODE_LIST) michael@0: ]); michael@0: michael@0: michael@0: checkVariableView(gVars, 1, { michael@0: "type": "\"sine\"", michael@0: "frequency": 440, michael@0: "detune": 0 michael@0: }); michael@0: michael@0: checkVariableView(gVars, 2, { michael@0: "gain": 0 michael@0: }); michael@0: michael@0: yield modifyVariableView(panel.panelWin, gVars, 1, "type", "square"); michael@0: michael@0: checkVariableView(gVars, 1, { michael@0: "type": "\"square\"" michael@0: }); michael@0: michael@0: yield teardown(panel); michael@0: finish(); michael@0: } michael@0: