servo/tests/wpt/css-tests/css-writing-modes-3_dev/html/text-orientation-parsing-001.htm

35 lines
No EOL
1.5 KiB
HTML

<!DOCTYPE html>
<html><head><title>CSS Writing Modes: parsing text-orientation</title>
<link href="kojiishi@gmail.com" rel="author" title="Koji Ishii">
<link href="https://drafts.csswg.org/css-writing-modes-3/#text-orientation" rel="help">
<meta content="This test asserts the parser and getComputedStyle works correctly for the text-orientation property." name="assert">
<meta content="dom" name="flags">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head><body><div data-expected="mixed" title="text-orientation initial value"></div>
<div data-expected="upright" style="text-orientation: upright"></div>
<div data-expected="sideways" style="text-orientation: sideways"></div>
<div data-expected="sideways-right" style="text-orientation: sideways-right"></div>
<div style="text-orientation: upright">
<div data-expected="upright" title="text-orientation should inherit"></div>
<div data-expected="mixed" style="text-orientation: mixed"></div>
<div data-expected="mixed" style="text-orientation: initial"></div>
<div data-expected="upright" style="text-orientation: inherit"></div>
<div data-expected="upright" style="text-orientation: foo"></div>
</div>
<script>
Array.prototype.forEach.call(document.querySelectorAll("[data-expected]"), function (element) {
test(function () {
var actual = getComputedStyle(element).textOrientation;
assert_equals(actual, element.dataset.expected);
}, element.title || element.getAttribute("style"));
});
</script>
</body></html>