1 <pre id=
"console"></pre>
4 testRunner
.dumpAsText();
8 document
.getElementById("console").appendChild(document
.createTextNode(message
+ "\n"));
11 function testEpubProperty(name
, alias
, jsName
, jsAlias
, value
)
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") + ".");
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") + ".");
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");