summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/writing-mode/prefixed-parsing.html
blob: 630bbd0f05f724cee3fbf8be083a9ad993bf6503 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>

<div data-property="textCombineUpright">
  <div style="-webkit-text-combine: none" data-expected="none"></div>
  <div style="-webkit-text-combine: horizontal" data-expected="all"></div>
  <div style="-epub-text-combine: none" data-expected="none"></div>
  <div style="-epub-text-combine: horizontal" data-expected="all"></div>
</div>

<div data-property="webkitTextCombine">
  <div style="text-combine-upright: all" data-expected="horizontal"></div>
</div>

<div data-property="textOrientation">
  <div style="-webkit-text-orientation: vertical-right" data-expected="mixed"></div>
  <div style="-webkit-text-orientation: upright" data-expected="upright"></div>
  <div style="-webkit-text-orientation: sideways" data-expected="sideways"></div>
  <div style="-webkit-text-orientation: sideways-right" data-expected="sideways"></div>
  <div style="-epub-text-orientation: vertical-right" data-expected="mixed"></div>
  <div style="-epub-text-orientation: upright" data-expected="upright"></div>
  <div style="-epub-text-orientation: sideways" data-expected="sideways"></div>
  <div style="-epub-text-orientation: sideways-right" data-expected="sideways"></div>
</div>

<div data-property="webkitTextOrientation">
  <div title="Initial value of webkitTextOrientation" data-expected="vertical-right"></div>
  <div style="text-orientation: mixed" data-expected="vertical-right"></div>
</div>

<div data-property="unicodeBidi">
  <div style="unicode-bidi: -webkit-isolate" data-expected="isolate"></div>
  <div style="unicode-bidi: -webkit-isolate-override" data-expected="isolate-override"></div>
  <div style="unicode-bidi: -webkit-plaintext" data-expected="plaintext"></div>
</div>

<div data-property="writingMode">
  <div title="Initial value of writingMode" data-expected="horizontal-tb"></div>
  <div style="-webkit-writing-mode: vertical-lr" data-expected="vertical-lr">
    <div style="-webkit-writing-mode: horizontal-tb" data-expected="horizontal-tb"></div>
  </div>
  <div style="-webkit-writing-mode: vertical-rl" data-expected="vertical-rl"></div>
</div>

<div data-property="webkitWritingMode">
  <div title="Initial value of webkitWritingMode" data-expected="horizontal-tb"></div>
  <div style="writing-mode: vertical-lr" data-expected="vertical-lr">
    <div style="writing-mode: horizontal-tb" data-expected="horizontal-tb"></div>
  </div>
  <div style="writing-mode: vertical-rl" data-expected="vertical-rl"></div>
</div>

<script>
Array.prototype.forEach.call(document.querySelectorAll("[data-property]"), function (element) {
  var property = element.dataset.property;
  Array.prototype.forEach.call(element.querySelectorAll("[data-expected]"), function (element) {
    var expected = element.dataset.expected;
    test(function () {
      var actual = getComputedStyle(element)[property];
      assert_equals(actual, expected);
    }, (element.title || property + " of '" + element.getAttribute("style") + "'") + " should be '" + expected + "'");
  });
});
</script>