browser/devtools/markupview/test/browser_markupview_highlight_hover_02.js

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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

mercurial