|
1 /* Any copyright is dedicated to the Public Domain. |
|
2 http://creativecommons.org/publicdomain/zero/1.0/ */ |
|
3 |
|
4 /** |
|
5 * Tests that the inspected indentifier is highlighted. |
|
6 */ |
|
7 |
|
8 const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html"; |
|
9 |
|
10 function test() { |
|
11 Task.spawn(function() { |
|
12 let [tab, debuggee, panel] = yield initDebugger(TAB_URL); |
|
13 let win = panel.panelWin; |
|
14 let bubble = win.DebuggerView.VariableBubble; |
|
15 |
|
16 // Allow this generator function to yield first. |
|
17 executeSoon(() => debuggee.start()); |
|
18 yield waitForSourceAndCaretAndScopes(panel, ".html", 24); |
|
19 |
|
20 // Inspect variable. |
|
21 yield openVarPopup(panel, { line: 15, ch: 12 }); |
|
22 |
|
23 ok(bubble.contentsShown(), |
|
24 "The variable should register as being shown."); |
|
25 ok(!bubble._tooltip.isEmpty(), |
|
26 "The variable inspection popup isn't empty."); |
|
27 ok(bubble._markedText, |
|
28 "There's some marked text in the editor."); |
|
29 ok(bubble._markedText.clear, |
|
30 "The marked text in the editor can be cleared."); |
|
31 |
|
32 yield hideVarPopup(panel); |
|
33 |
|
34 ok(!bubble.contentsShown(), |
|
35 "The variable should register as being hidden."); |
|
36 ok(bubble._tooltip.isEmpty(), |
|
37 "The variable inspection popup is now empty."); |
|
38 ok(!bubble._markedText, |
|
39 "The marked text in the editor was removed."); |
|
40 |
|
41 yield resumeDebuggerThenCloseAndFinish(panel); |
|
42 }); |
|
43 } |