browser_inspector_highlighter-custom-element.js (891B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 // Test that the picker works correctly with XBL anonymous nodes 7 8 const TEST_URL = URL_ROOT + "doc_inspector_highlighter_custom_element.xhtml"; 9 10 add_task(async function () { 11 const { inspector, toolbox } = await openInspectorForURL(TEST_URL); 12 13 await startPicker(toolbox); 14 15 info("Selecting the custom element"); 16 await hoverElement(inspector, "#custom-element"); 17 18 info("Key pressed. Waiting for element to be picked"); 19 BrowserTestUtils.synthesizeKey("VK_RETURN", {}, gBrowser.selectedBrowser); 20 await Promise.all([ 21 inspector.selection.once("new-node-front"), 22 inspector.once("inspector-updated"), 23 ]); 24 25 is( 26 inspector.selection.nodeFront.className, 27 "custom-element-anon", 28 "The .custom-element-anon inside the div was selected" 29 ); 30 });