No bug - tagging b4d3227540c9ebc43d64aac6168fdca7019c22d8 with FIREFOX_BETA_126_BASE...
[gecko.git] / layout / style / test / test_default_bidi_css.html
blob9033c9b6a77162decf47c806c5fc691afaca7434
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Test for Bug </title>
6 <script src="/tests/SimpleTest/SimpleTest.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
8 </head>
9 <body>
10 <p id="display"></p>
11 <div id="content" style="display: none">
13 </div>
14 <pre id="test">
15 <script type="application/javascript">
17 /** Test for default bidi css **/
18 function styleOf(name, attributes) {
19 var element = document.createElement(name);
20 for (var name in attributes) {
21 var value = attributes[name];
22 element.setAttribute(name, value);
24 document.body.appendChild(element);
25 return getComputedStyle(element);
28 var tests = [
29 ['div', {}, 'ltr', 'isolate'],
30 ['div', {'dir': 'ltr'}, 'ltr', 'isolate'],
31 ['div', {'dir': 'rtl'}, 'rtl', 'isolate'],
32 ['div', {'dir': 'auto'}, 'ltr', 'isolate'],
33 ['div', {'dir': ''}, 'ltr', 'isolate'],
35 ['span', {}, 'ltr', 'normal'],
36 ['span', {'dir': 'ltr'}, 'ltr', 'isolate'],
37 ['span', {'dir': 'rtl'}, 'rtl', 'isolate'],
38 ['span', {'dir': 'auto'}, 'ltr', 'isolate'],
39 ['span', {'dir': ''}, 'ltr', 'isolate'],
41 ['bdi', {}, 'ltr', 'isolate'],
42 ['bdi', {'dir': 'ltr'}, 'ltr', 'isolate'],
43 ['bdi', {'dir': 'rtl'}, 'rtl', 'isolate'],
44 ['bdi', {'dir': 'auto'}, 'ltr', 'isolate'],
45 ['bdi', {'dir': ''}, 'ltr', 'isolate'],
47 ['output', {}, 'ltr', 'isolate'],
48 ['output', {'dir': 'ltr'}, 'ltr', 'isolate'],
49 ['output', {'dir': 'rtl'}, 'rtl', 'isolate'],
50 ['output', {'dir': 'auto'}, 'ltr', 'isolate'],
51 ['output', {'dir': ''}, 'ltr', 'isolate'],
53 ['bdo', {}, 'ltr', 'isolate-override'],
54 ['bdo', {'dir': 'ltr'}, 'ltr', 'isolate-override'],
55 ['bdo', {'dir': 'rtl'}, 'rtl', 'isolate-override'],
56 ['bdo', {'dir': 'auto'}, 'ltr', 'isolate-override'],
57 ['bdo', {'dir': ''}, 'ltr', 'isolate-override'],
59 ['textarea', {}, 'ltr', 'normal'],
60 ['textarea', {'dir': 'ltr'}, 'ltr', 'isolate'],
61 ['textarea', {'dir': 'rtl'}, 'rtl', 'isolate'],
62 ['textarea', {'dir': 'auto'}, 'ltr', 'plaintext'],
63 ['textarea', {'dir': ''}, 'ltr', 'isolate'],
65 ['pre', {}, 'ltr', 'isolate'],
66 ['pre', {'dir': 'ltr'}, 'ltr', 'isolate'],
67 ['pre', {'dir': 'rtl'}, 'rtl', 'isolate'],
68 ['pre', {'dir': 'auto'}, 'ltr', 'plaintext'],
69 ['pre', {'dir': ''}, 'ltr', 'isolate'],
70 ].forEach(function (test) {
71 var style = styleOf(test[0], test[1]);
72 is(style.direction, test[2], "default value for direction");
73 is(style.unicodeBidi, test[3], "default value for unicode-bidi");
74 });
77 </script>
78 </pre>
79 </body>
80 </html>