michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: const URL = "data:text/html;charset=utf8,
JavaScript Profiler test
"; michael@0: michael@0: let gTab, gPanel; michael@0: michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: michael@0: setUp(URL, (tab, browser, panel) => { michael@0: gTab = tab; michael@0: gPanel = panel; michael@0: michael@0: openProfiler(tab, runTests); michael@0: }); michael@0: } michael@0: michael@0: function runTests(toolbox) { michael@0: let panel = toolbox.getPanel("jsprofiler"); michael@0: let record = gPanel.controls.record; michael@0: michael@0: panel.once("started", () => { michael@0: is(getSidebarItem(1, panel).attachment.state, PROFILE_RUNNING); michael@0: michael@0: openConsole(gTab, (hud) => { michael@0: panel.once("stopped", () => { michael@0: is(getSidebarItem(1, panel).attachment.state, PROFILE_COMPLETED); michael@0: tearDown(gTab, () => gTab = gPanel = null); michael@0: }); michael@0: michael@0: hud.jsterm.execute("console.profileEnd()"); michael@0: }); michael@0: }); michael@0: michael@0: record.click(); michael@0: }