/* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Tests the behaviour of adding a new rule using the add rule button // on namespaced elements. const XHTML = ` `; const TEST_URI = "data:application/xhtml+xml;charset=utf-8," + encodeURI(XHTML); const TEST_DATA = [ { node: "clipPath", expected: "clipPath" }, { node: "rect", expected: "rect" }, { node: "circle", expected: "circle" }, ]; add_task(async function () { await addTab(TEST_URI); const { inspector, view } = await openRuleView(); for (const data of TEST_DATA) { const { node, expected } = data; await selectNode(node, inspector); await addNewRuleAndDismissEditor(inspector, view, expected, 1); } });