diff options
Diffstat (limited to 'toolkit/devtools/profiler/test/browser_profiler_recording-selected-03.js')
-rw-r--r-- | toolkit/devtools/profiler/test/browser_profiler_recording-selected-03.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/toolkit/devtools/profiler/test/browser_profiler_recording-selected-03.js b/toolkit/devtools/profiler/test/browser_profiler_recording-selected-03.js new file mode 100644 index 000000000..d7422c924 --- /dev/null +++ b/toolkit/devtools/profiler/test/browser_profiler_recording-selected-03.js @@ -0,0 +1,35 @@ +/* vim: set ft=javascript ts=2 et sw=2 tw=80: */ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +/** + * Tests if the profiler UI does not forget that recording is active when + * selected recording changes. Bug 1060885. + */ + +let test = Task.async(function*() { + let [target, debuggee, panel] = yield initFrontend(SIMPLE_URL); + let { $, EVENTS, RecordingsListView, ProfileView } = panel.panelWin; + + yield startRecording(panel); + yield stopRecording(panel, { waitForDisplay: true }); + + yield startRecording(panel); + yield stopRecording(panel, { waitForDisplay: true }); + + yield startRecording(panel); + + info("Selecting recording #0 and waiting for it to be displayed."); + let selected = panel.panelWin.once(EVENTS.RECORDING_DISPLAYED); + RecordingsListView.selectedIndex = 0; + yield selected; + + ok($("#record-button").hasAttribute("checked"), + "Button is still checked after selecting another item."); + + ok(!$("#record-button").hasAttribute("locked"), + "Button is not locked after selecting another item."); + + yield teardown(panel); + finish(); +}); |