Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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/ */
5 "use strict";
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
11 let test = asyncTest(function*() {
12 let {inspector} = yield addTab("data:text/html,<p>Select me!</p>").then(openInspector);
14 info("hover over the <p> line in the markup-view so that it's the currently hovered node");
15 yield hoverContainer("p", inspector);
17 info("select the <p> markup-container line by clicking");
18 yield clickContainer("p", inspector);
19 ok(isHighlighterVisible(), "the highlighter is shown");
21 info("mouse-leave the markup-view");
22 yield mouseLeaveMarkupView(inspector);
23 ok(!isHighlighterVisible(), "the highlighter is hidden after mouseleave");
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 });