Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / epub-properties.html
blobeff63e13ef4620dbba166a7ed6922486cf155567
1 <pre id="console"></pre>
2 <script>
3 if (window.testRunner)
4 testRunner.dumpAsText();
6 function log(message)
8 document.getElementById("console").appendChild(document.createTextNode(message + "\n"));
11 function testEpubProperty(name, alias, jsName, jsAlias, value)
13 var pass = true;
14 var element = document.createElement("div");
15 element.setAttribute("style", name + ": " + value);
16 if (eval("element.style." + jsAlias) !== value) {
17 log("FAIL: element.style." + jsAlias + " is not '" + value + "' after setting style to " + element.getAttribute("style") + ".");
18 pass = false;
21 element.setAttribute("style", alias + ":" + value);
22 if (eval("element.style." + jsName) !== value) {
23 log("FAIL: element.style." + jsName + " is not '" + value + "' after setting style to " + element.getAttribute("style") + ".");
24 pass = false;
27 if (pass)
28 log("PASS: " + alias + " is an alias for " + name);
31 testEpubProperty("caption-side", "-epub-caption-side", "captionSide", "epubCaptionSide", "bottom");
32 testEpubProperty("-webkit-text-combine", "-epub-text-combine", "webkitTextCombine", "epubTextCombine", "horizontal");
33 testEpubProperty("-webkit-text-emphasis-style", "-epub-text-emphasis-style", "webkitTextEmphasisStyle", "epubTextEmphasisStyle", "open sesame");
34 testEpubProperty("-webkit-text-emphasis-color", "-epub-text-emphasis-color", "webkitTextEmphasisColor", "epubTextEmphasisColor", "red");
35 testEpubProperty("-webkit-text-orientation", "-epub-text-orientation", "webkitTextOrientation", "epubTextOrientation", "upright");
36 testEpubProperty("text-transform", "-epub-text-transform", "textTransform", "epubTextTransform", "uppercase");
37 testEpubProperty("word-break", "-epub-word-break", "wordBreak", "epubWordBreak", "break-all");
38 testEpubProperty("-webkit-writing-mode", "-epub-writing-mode", "webkitWritingMode", "epubWritingMode", "vertical-rl");
39 </script>