browser_inspector_highlighter-hover_01.js (1133B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 /* eslint-disable mozilla/no-arbitrary-setTimeout */ 4 5 "use strict"; 6 7 // Test that when first hovering over a node and immediately after selecting it 8 // by clicking on it, the highlighter stays visible 9 10 const TEST_URL = 11 "data:text/html;charset=utf-8," + "<p>It's going to be legen....</p>"; 12 13 add_task(async function () { 14 const { inspector, highlighterTestFront } = 15 await openInspectorForURL(TEST_URL); 16 17 info("hovering over the <p> line in the markup-view"); 18 await hoverContainer("p", inspector); 19 let isVisible = await highlighterTestFront.isHighlighting(); 20 ok(isVisible, "the highlighter is still visible"); 21 22 info("selecting the <p> line by clicking in the markup-view"); 23 await clickContainer("p", inspector); 24 25 info( 26 "wait and see if the highlighter stays visible even after the node " + 27 "was selected" 28 ); 29 30 await setContentPageElementProperty("p", "textContent", "dary!!!!"); 31 isVisible = await highlighterTestFront.isHighlighting(); 32 ok(isVisible, "the highlighter is still visible"); 33 });