michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: "use strict"; michael@0: michael@0: // Test that when after an element is selected and highlighted on hover, if the michael@0: // mouse leaves the markup-view and comes back again on the same element, that michael@0: // the highlighter is shown again on the node michael@0: michael@0: let test = asyncTest(function*() { michael@0: let {inspector} = yield addTab("data:text/html,

Select me!

").then(openInspector); michael@0: michael@0: info("hover over the

line in the markup-view so that it's the currently hovered node"); michael@0: yield hoverContainer("p", inspector); michael@0: michael@0: info("select the

markup-container line by clicking"); michael@0: yield clickContainer("p", inspector); michael@0: ok(isHighlighterVisible(), "the highlighter is shown"); michael@0: michael@0: info("mouse-leave the markup-view"); michael@0: yield mouseLeaveMarkupView(inspector); michael@0: ok(!isHighlighterVisible(), "the highlighter is hidden after mouseleave"); michael@0: michael@0: info("hover over the

line again, which is still selected"); michael@0: yield hoverContainer("p", inspector); michael@0: ok(isHighlighterVisible(), "the highlighter is visible again"); michael@0: });