diff options
author | Matt A. Tobin <email@mattatobin.com> | 2014-07-02 00:07:24 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2014-07-02 05:58:53 -0400 |
commit | 77707b62085f862709562185e615634e7431080a (patch) | |
tree | cb1d173d0dbae3332df6d4a1160336e04c2286a7 /browser/devtools/profiler/test/browser_profiler_console_api_named.js | |
parent | 432326d2eae38aaacaeff9e790a2835d6578ee3b (diff) | |
download | palemoon-gre-77707b62085f862709562185e615634e7431080a.tar.gz |
Remove tests from /browser (except /browser/metro)
Diffstat (limited to 'browser/devtools/profiler/test/browser_profiler_console_api_named.js')
-rw-r--r-- | browser/devtools/profiler/test/browser_profiler_console_api_named.js | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/browser/devtools/profiler/test/browser_profiler_console_api_named.js b/browser/devtools/profiler/test/browser_profiler_console_api_named.js deleted file mode 100644 index 460676aa7..000000000 --- a/browser/devtools/profiler/test/browser_profiler_console_api_named.js +++ /dev/null @@ -1,66 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ */ - -const URL = "data:text/html;charset=utf8,<p>JavaScript Profiler test</p>"; - -let gTab, gPanel; - -function test() { - waitForExplicitFinish(); - - setUp(URL, (tab, browser, panel) => { - gTab = tab; - gPanel = panel; - - openConsole(tab, testConsoleProfile); - }); -} - -function testConsoleProfile(hud) { - hud.jsterm.clearOutput(true); - - // Here we start two named profiles and then end one of them. - - let profilesStarted = 0; - - function profileEnd(_, uid) { - let profile = gPanel.profiles.get(uid); - - profile.once("started", () => { - if (++profilesStarted < 2) - return; - - gPanel.off("profileCreated", profileEnd); - gPanel.profiles.get(2).once("stopped", () => { - openProfiler(gTab, checkProfiles); - }); - - hud.jsterm.execute("console.profileEnd('Second')"); - }); - } - - gPanel.on("profileCreated", profileEnd); - hud.jsterm.execute("console.profile('Second')"); - hud.jsterm.execute("console.profile('Third')"); -} - -function checkProfiles(toolbox) { - let panel = toolbox.getPanel("jsprofiler"); - - is(getSidebarItem(1, panel).attachment.state, PROFILE_IDLE); - is(getSidebarItem(2, panel).attachment.name, "Second"); - is(getSidebarItem(2, panel).attachment.state, PROFILE_COMPLETED); - is(getSidebarItem(3, panel).attachment.name, "Third"); - is(getSidebarItem(3, panel).attachment.state, PROFILE_RUNNING); - - // Make sure we can still stop profiles via the queue pop. - - gPanel.profiles.get(3).once("stopped", () => { - openProfiler(gTab, () => { - is(getSidebarItem(3, panel).attachment.state, PROFILE_COMPLETED); - tearDown(gTab, () => gTab = gPanel = null); - }); - }); - - openConsole(gTab, (hud) => hud.jsterm.execute("console.profileEnd()")); -}
\ No newline at end of file |