browser/devtools/debugger/test/browser_dbg_variables-view-popup-03.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-03.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,43 @@
     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 inspected indentifier is highlighted.
     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 +
    1.26 +    ok(bubble.contentsShown(),
    1.27 +      "The variable should register as being shown.");
    1.28 +    ok(!bubble._tooltip.isEmpty(),
    1.29 +      "The variable inspection popup isn't empty.");
    1.30 +    ok(bubble._markedText,
    1.31 +      "There's some marked text in the editor.");
    1.32 +    ok(bubble._markedText.clear,
    1.33 +      "The marked text in the editor can be cleared.");
    1.34 +
    1.35 +    yield hideVarPopup(panel);
    1.36 +
    1.37 +    ok(!bubble.contentsShown(),
    1.38 +      "The variable should register as being hidden.");
    1.39 +    ok(bubble._tooltip.isEmpty(),
    1.40 +      "The variable inspection popup is now empty.");
    1.41 +    ok(!bubble._markedText,
    1.42 +      "The marked text in the editor was removed.");
    1.43 +
    1.44 +    yield resumeDebuggerThenCloseAndFinish(panel);
    1.45 +  });
    1.46 +}

mercurial