browser_markup_node_names.js (1034B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 // Test element node name in the markupview 7 const TEST_URL = URL_ROOT + "doc_markup_html_mixed_case.html"; 8 9 add_task(async function () { 10 const { inspector } = await openInspectorForURL(TEST_URL); 11 12 // Get and open the svg element to show its children 13 const svgNodeFront = await getNodeFront("svg", inspector); 14 await inspector.markup.expandNode(svgNodeFront); 15 await waitForMultipleChildrenUpdates(inspector); 16 17 const clipPathContainer = await getContainerForSelector( 18 "clipPath", 19 inspector 20 ); 21 info("Checking the clipPath element"); 22 Assert.strictEqual( 23 clipPathContainer.editor.tag.textContent, 24 "clipPath", 25 "clipPath node name is not lowercased" 26 ); 27 28 const divContainer = await getContainerForSelector("div", inspector); 29 30 info("Checking the div element"); 31 Assert.strictEqual( 32 divContainer.editor.tag.textContent, 33 "div", 34 "div node name is lowercased" 35 ); 36 });