/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; // Test that hovering over the markup-view's containers doesn't always show the // highlighter, depending on the type of node hovered over. const TEST_PAGE = URL_ROOT + "doc_inspector_highlighter-comments.html"; add_task(async function () { const { inspector, highlighterTestFront } = await openInspectorForURL( TEST_PAGE ); const { waitForHighlighterTypeShown } = getHighlighterTestHelpers(inspector); const markupView = inspector.markup; await selectNode("p", inspector); info("Hovering over #id1 and waiting for highlighter to appear."); await hoverElement("#id1"); await assertHighlighterShownOn("#id1"); info("Hovering over comment node and ensuring highlighter doesn't appear."); await hoverComment(); await assertHighlighterHidden(); info("Hovering over #id1 again and waiting for highlighter to appear."); await hoverElement("#id1"); await assertHighlighterShownOn("#id1"); info("Hovering over #id2 and waiting for highlighter to appear."); await hoverElement("#id2"); await assertHighlighterShownOn("#id2"); info("Hovering over