blob: 232508980acd78a4413d502ee4a99b515182baf1 [file] [log] [blame]
Tests serializing various strings with quotation marks.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS namespaceRule.cssText is "@namespace html url(\"http://www.w3.org/1999/xhtml\");"
PASS supportsRule.conditionText is "(font-weight: \"San Francisco\")"
PASS ruleWithJSONContent.style.content is "\"{foo: \\\"bar\\\"}\""
PASS value = getComputedStyle(div).getPropertyValue("content"); value is "\"{foo: \\\"bar\\\"}\""
PASS parsed = eval(value.replace(/^'/, "").replace(/'$/, "")); is "{foo: \"bar\"}"
PASS ruleWithAttributeSelector.selectorText is "span[class=\"foo bar\"]"
PASS getComputedStyle(document.querySelector("span[class='foo bar']")).getPropertyValue("color") is "rgb(0, 128, 0)"
PASS counterRule.style.content is "counters(section, \".\")"
PASS fontFamilyRule.style.fontFamily is "\"Two Infinite Loop\", \"Cupertino CA\""
PASS getComputedStyle(document.querySelector("article")).getPropertyValue("font-family") is "\"Two Infinite Loop\", \"Cupertino CA\""
PASS backgroundImageRule.style.backgroundImage is "url(\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100px' height='100px'><rect width='100px' height='100px' fill='lightgreen' stroke='green' stroke-width='1px'/></svg>\")"
PASS getComputedStyle(document.querySelector("section")).backgroundImage is "url(\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100px' height='100px'><rect width='100px' height='100px' fill='lightgreen' stroke='green' stroke-width='1px'/></svg>\")"
PASS shapeRule.style["-webkit-clip-path"] is "path(\"M 100 40 l 20 0 l 0 60\")"
PASS getComputedStyle(document.querySelector(".shape"))["-webkit-clip-path"] is "path(\"M 100 40 l 20 0 l 0 60\")"
PASS successfullyParsed is true
TEST COMPLETE