/* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Tests that the parsed font-family property value shown in the rules // pane is correct. const TEST_URI = `
1
2
3
4
5
`; const TESTS = [ { selector: "#id1", expectedTextContent: "georgia, arial, sans-serif" }, { selector: "#id2", expectedTextContent: "georgia,arial,sans-serif" }, { selector: "#id3", expectedTextContent: "georgia ,arial ,sans-serif" }, { selector: "#id4", expectedTextContent: "arial, georgia, sans-serif" }, { selector: "#id5", expectedTextContent: "helvetica !important" }, ]; add_task(async function () { await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)); const { inspector, view } = await openRuleView(); for (const { selector, expectedTextContent } of TESTS) { await selectNode(selector, inspector); info("Looking for font-family property value in selector " + selector); const prop = getRuleViewProperty(view, selector, "font-family").valueSpan; is( prop.textContent, expectedTextContent, "The font-family property value is correct" ); } });