browser_dbg_variables-view-popup-04.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
  2. /* Any copyright is dedicated to the Public Domain.
  3. * http://creativecommons.org/publicdomain/zero/1.0/ */
  4. /**
  5. * Tests that the variable inspection popup is hidden when the editor scrolls.
  6. */
  7. const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html";
  8. function test() {
  9. Task.spawn(function* () {
  10. let options = {
  11. source: TAB_URL,
  12. line: 1
  13. };
  14. let [tab,, panel] = yield initDebugger(TAB_URL, options);
  15. let win = panel.panelWin;
  16. let bubble = win.DebuggerView.VariableBubble;
  17. let onCaretAndScopes = waitForCaretAndScopes(panel, 24);
  18. callInTab(tab, "start");
  19. yield onCaretAndScopes;
  20. // Inspect variable.
  21. yield openVarPopup(panel, { line: 15, ch: 12 });
  22. yield hideVarPopupByScrollingEditor(panel);
  23. ok(true, "The variable inspection popup was hidden.");
  24. ok(bubble._tooltip.isEmpty(),
  25. "The variable inspection popup is now empty.");
  26. ok(!bubble._markedText,
  27. "The marked text in the editor was removed.");
  28. yield resumeDebuggerThenCloseAndFinish(panel);
  29. });
  30. }