/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ /* vim: set ts=2 et sw=2 tw=80: */ /* 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"; // // Whitelisting this test. // As part of bug 1077403, the leaking uncaught rejection should be fixed. // thisTestLeaksUncaughtRejectionsAndShouldBeFixed("false"); // 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(function* () { let {inspector, testActor} = yield openInspectorForURL(TEST_PAGE); let markupView = inspector.markup; yield selectNode("p", inspector); info("Hovering over #id1 and waiting for highlighter to appear."); yield hoverElement("#id1"); yield assertHighlighterShownOn("#id1"); info("Hovering over comment node and ensuring highlighter doesn't appear."); yield hoverComment(); yield assertHighlighterHidden(); info("Hovering over #id1 again and waiting for highlighter to appear."); yield hoverElement("#id1"); yield assertHighlighterShownOn("#id1"); info("Hovering over #id2 and waiting for highlighter to appear."); yield hoverElement("#id2"); yield assertHighlighterShownOn("#id2"); info("Hovering over