Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* Any copyright is dedicated to the Public Domain.
2 * http://creativecommons.org/publicdomain/zero/1.0/ */
4 const URL = "data:text/html;charset=utf8,<p>JavaScript Profiler test</p>";
6 let gTab, gPanel;
8 function test() {
9 waitForExplicitFinish();
11 setUp(URL, (tab, browser, panel) => {
12 gTab = tab;
13 gPanel = panel;
15 openConsole(tab, testConsoleProfile);
16 });
17 }
19 function testConsoleProfile(hud) {
20 hud.jsterm.clearOutput(true);
22 let profilesStarted = 0;
24 gPanel.once("parsed", () => {
25 let profile = gPanel.activeProfile;
27 is(profile.name, "Profile 1", "Profile name is OK");
28 is(gPanel.sidebar.selectedItem, gPanel.sidebar.getItemByProfile(profile), "Sidebar is OK");
29 is(gPanel.sidebar.selectedItem.attachment.state, PROFILE_COMPLETED);
30 tearDown(gTab, () => gTab = gPanel = null);
31 });
33 hud.jsterm.execute("console.profile()");
34 hud.jsterm.execute("console.profileEnd()");
35 }