1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/devtools/markupview/test/browser_markupview_highlight_hover_02.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,28 @@ 1.4 +/* vim: set ts=2 et sw=2 tw=80: */ 1.5 +/* Any copyright is dedicated to the Public Domain. 1.6 + http://creativecommons.org/publicdomain/zero/1.0/ */ 1.7 + 1.8 +"use strict"; 1.9 + 1.10 +// Test that when after an element is selected and highlighted on hover, if the 1.11 +// mouse leaves the markup-view and comes back again on the same element, that 1.12 +// the highlighter is shown again on the node 1.13 + 1.14 +let test = asyncTest(function*() { 1.15 + let {inspector} = yield addTab("data:text/html,<p>Select me!</p>").then(openInspector); 1.16 + 1.17 + info("hover over the <p> line in the markup-view so that it's the currently hovered node"); 1.18 + yield hoverContainer("p", inspector); 1.19 + 1.20 + info("select the <p> markup-container line by clicking"); 1.21 + yield clickContainer("p", inspector); 1.22 + ok(isHighlighterVisible(), "the highlighter is shown"); 1.23 + 1.24 + info("mouse-leave the markup-view"); 1.25 + yield mouseLeaveMarkupView(inspector); 1.26 + ok(!isHighlighterVisible(), "the highlighter is hidden after mouseleave"); 1.27 + 1.28 + info("hover over the <p> line again, which is still selected"); 1.29 + yield hoverContainer("p", inspector); 1.30 + ok(isHighlighterVisible(), "the highlighter is visible again"); 1.31 +});