Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / unicode-bidi-computed-value.html
blob7e67bced7d2b906fdf1a54e4486c0f7ca1b6db53
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../resources/js-test.js"></script>
5 <p id="description">This tests the computed value of unicode-bidi property.</p>
6 <div id="container"></div>
7 <div id="console"></div>
8 <script>
10 var container = document.getElementById('container');
12 function styleOf(name, attributes) {
13 var element = document.createElement('div');
14 for (var name in attributes) {
15 var value = attributes[name];
16 element.setAttribute(name, value);
18 container.appendChild(element);
19 return getComputedStyle(element);
22 var tests = [
23 ['span', {}, 'normal'],
24 ['span', {'style': 'unicode-bidi: embed;'}, 'embed'],
25 ['span', {'style': 'unicode-bidi: -webkit-isolate;'}, '-webkit-isolate'],
26 ['span', {'style': 'unicode-bidi: bidi-override;'}, 'bidi-override'],
27 ['span', {'style': 'unicode-bidi: -webkit-plaintext;'}, '-webkit-plaintext'],
28 ['span', {'style': 'unicode-bidi: bad-value;'}, 'normal'],
29 ['span', {'style': 'unicode-bidi: embed embed;'}, 'normal'],
30 ['span', {'style': 'unicode-bidi: embed -webkit-plain-text;'}, 'normal'],
31 ['span', {'style': 'unicode-bidi: bidi-override -webkit-isolate;'}, 'normal'],
32 ['span', {'style': 'unicode-bidi: -webkit-isolate bidi-override;'}, 'normal'],
33 ['span', {'style': 'unicode-bidi: -webkit-isolate-override;'}, '-webkit-isolate-override'],
34 ['span', {'style': 'unicode-bidi: bidi-override -webkit-isolate bidi-override;'}, 'normal'],
35 ['span', {'style': 'unicode-bidi: bidi-override -webkit-isolate -webkit-isolate;'}, 'normal'],
36 ['span', {'style': 'unicode-bidi: bidi-override bad-value;'}, 'normal'],
37 ['span', {'style': 'unicode-bidi: bidi-override embed;'}, 'normal'],
38 ].forEach(function (test) {
39 shouldBe('styleOf("' + test[0] + '", ' + JSON.stringify(test[1]) + ').unicodeBidi', '"' + test[2] + '"');
40 });
42 </script>
43 </body>
44 </html>