Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
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 }