browser/devtools/debugger/test/browser_dbg_variables-view-popup-04.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/devtools/debugger/test/browser_dbg_variables-view-popup-04.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 +   http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +
     1.7 +/**
     1.8 + * Tests that the variable inspection popup is hidden when the editor scrolls.
     1.9 + */
    1.10 +
    1.11 +const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html";
    1.12 +
    1.13 +function test() {
    1.14 +  Task.spawn(function() {
    1.15 +    let [tab, debuggee, panel] = yield initDebugger(TAB_URL);
    1.16 +    let win = panel.panelWin;
    1.17 +    let bubble = win.DebuggerView.VariableBubble;
    1.18 +
    1.19 +    // Allow this generator function to yield first.
    1.20 +    executeSoon(() => debuggee.start());
    1.21 +    yield waitForSourceAndCaretAndScopes(panel, ".html", 24);
    1.22 +
    1.23 +    // Inspect variable.
    1.24 +    yield openVarPopup(panel, { line: 15, ch: 12 });
    1.25 +    yield hideVarPopupByScrollingEditor(panel);
    1.26 +    ok(true, "The variable inspection popup was hidden.");
    1.27 +
    1.28 +    ok(bubble._tooltip.isEmpty(),
    1.29 +      "The variable inspection popup is now empty.");
    1.30 +    ok(!bubble._markedText,
    1.31 +      "The marked text in the editor was removed.");
    1.32 +
    1.33 +    yield resumeDebuggerThenCloseAndFinish(panel);
    1.34 +  });
    1.35 +}

mercurial