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: openConsole(tab, testConsoleProfile); michael@0: }); michael@0: } michael@0: michael@0: function testConsoleProfile(hud) { michael@0: hud.jsterm.clearOutput(true); michael@0: michael@0: let profilesStarted = 0; michael@0: michael@0: gPanel.once("parsed", () => { michael@0: let profile = gPanel.activeProfile; michael@0: michael@0: is(profile.name, "Profile 1", "Profile name is OK"); michael@0: is(gPanel.sidebar.selectedItem, gPanel.sidebar.getItemByProfile(profile), "Sidebar is OK"); michael@0: is(gPanel.sidebar.selectedItem.attachment.state, PROFILE_COMPLETED); michael@0: tearDown(gTab, () => gTab = gPanel = null); michael@0: }); michael@0: michael@0: hud.jsterm.execute("console.profile()"); michael@0: hud.jsterm.execute("console.profileEnd()"); michael@0: }