Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 }