summaryrefslogtreecommitdiff
path: root/browser/devtools/profiler/test/browser_profiler_profiles.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/devtools/profiler/test/browser_profiler_profiles.js')
-rw-r--r--browser/devtools/profiler/test/browser_profiler_profiles.js69
1 files changed, 0 insertions, 69 deletions
diff --git a/browser/devtools/profiler/test/browser_profiler_profiles.js b/browser/devtools/profiler/test/browser_profiler_profiles.js
deleted file mode 100644
index 10f7b4bcb..000000000
--- a/browser/devtools/profiler/test/browser_profiler_profiles.js
+++ /dev/null
@@ -1,69 +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, function onSetUp(tab, browser, panel) {
- gTab = tab;
- gPanel = panel;
-
- panel.once("profileCreated", onProfileCreated);
- panel.once("profileSwitched", onProfileSwitched);
-
- testNewProfile();
- });
-}
-
-function testNewProfile() {
- is(gPanel.profiles.size, 1, "There is only one profile");
-
- let btn = gPanel.document.getElementById("profiler-create");
- ok(!btn.getAttribute("disabled"), "Create Profile button is not disabled");
- btn.click();
-}
-
-function onProfileCreated(name, uid) {
- is(gPanel.profiles.size, 2, "There are two profiles now");
- ok(gPanel.activeProfile.uid !== uid, "New profile is not yet active");
-
- let btn = gPanel.document.getElementById("profile-" + uid);
- ok(btn, "Profile item has been added to the sidebar");
- btn.click();
-}
-
-function onProfileSwitched(name, uid) {
- gPanel.once("profileCreated", onNamedProfileCreated);
- gPanel.once("profileSwitched", onNamedProfileSwitched);
-
- ok(gPanel.activeProfile.uid === uid, "Switched to a new profile");
- gPanel.createProfile("Custom Profile");
-}
-
-function onNamedProfileCreated(name, uid) {
- is(gPanel.profiles.size, 3, "There are three profiles now");
- is(gPanel.getProfileByUID(uid).name, "Custom Profile", "Name is correct");
-
- let profile = gPanel.profiles.get(uid);
- let data = gPanel.sidebar.getItemByProfile(profile).attachment;
-
- is(data.uid, uid, "UID is correct");
- is(data.name, "Custom Profile", "Name is correct on the label");
-
- let btn = gPanel.document.getElementById("profile-" + uid);
- ok(btn, "Profile item has been added to the sidebar");
- btn.click();
-}
-
-function onNamedProfileSwitched(name, uid) {
- ok(gPanel.activeProfile.uid === uid, "Switched to a new profile");
-
- tearDown(gTab, function onTearDown() {
- gPanel = null;
- gTab = null;
- });
-} \ No newline at end of file