|
1 /* vim: set ts=2 et sw=2 tw=80: */ |
|
2 /* Any copyright is dedicated to the Public Domain. |
|
3 http://creativecommons.org/publicdomain/zero/1.0/ */ |
|
4 |
|
5 "use strict"; |
|
6 |
|
7 // Test that when after an element is selected and highlighted on hover, if the |
|
8 // mouse leaves the markup-view and comes back again on the same element, that |
|
9 // the highlighter is shown again on the node |
|
10 |
|
11 let test = asyncTest(function*() { |
|
12 let {inspector} = yield addTab("data:text/html,<p>Select me!</p>").then(openInspector); |
|
13 |
|
14 info("hover over the <p> line in the markup-view so that it's the currently hovered node"); |
|
15 yield hoverContainer("p", inspector); |
|
16 |
|
17 info("select the <p> markup-container line by clicking"); |
|
18 yield clickContainer("p", inspector); |
|
19 ok(isHighlighterVisible(), "the highlighter is shown"); |
|
20 |
|
21 info("mouse-leave the markup-view"); |
|
22 yield mouseLeaveMarkupView(inspector); |
|
23 ok(!isHighlighterVisible(), "the highlighter is hidden after mouseleave"); |
|
24 |
|
25 info("hover over the <p> line again, which is still selected"); |
|
26 yield hoverContainer("p", inspector); |
|
27 ok(isHighlighterVisible(), "the highlighter is visible again"); |
|
28 }); |