Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <meta charset="utf-8"> |
michael@0 | 5 | <title>Test for Bug </title> |
michael@0 | 6 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 7 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 8 | </head> |
michael@0 | 9 | <body> |
michael@0 | 10 | <p id="display"></p> |
michael@0 | 11 | <div id="content" style="display: none"> |
michael@0 | 12 | |
michael@0 | 13 | </div> |
michael@0 | 14 | <pre id="test"> |
michael@0 | 15 | <script type="application/javascript"> |
michael@0 | 16 | |
michael@0 | 17 | /** Test for default bidi css **/ |
michael@0 | 18 | function styleOf(name, attributes) { |
michael@0 | 19 | var element = document.createElement(name); |
michael@0 | 20 | for (var name in attributes) { |
michael@0 | 21 | var value = attributes[name]; |
michael@0 | 22 | element.setAttribute(name, value); |
michael@0 | 23 | } |
michael@0 | 24 | return getComputedStyle(element); |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | var tests = [ |
michael@0 | 28 | ['div', {}, 'ltr', '-moz-isolate'], |
michael@0 | 29 | ['div', {'dir': 'ltr'}, 'ltr', '-moz-isolate'], |
michael@0 | 30 | ['div', {'dir': 'rtl'}, 'rtl', '-moz-isolate'], |
michael@0 | 31 | ['div', {'dir': 'auto'}, 'ltr', '-moz-isolate'], |
michael@0 | 32 | ['div', {'dir': ''}, 'ltr', '-moz-isolate'], |
michael@0 | 33 | |
michael@0 | 34 | ['span', {}, 'ltr', 'normal'], |
michael@0 | 35 | ['span', {'dir': 'ltr'}, 'ltr', 'embed'], |
michael@0 | 36 | ['span', {'dir': 'rtl'}, 'rtl', 'embed'], |
michael@0 | 37 | ['span', {'dir': 'auto'}, 'ltr', '-moz-isolate'], |
michael@0 | 38 | ['span', {'dir': ''}, 'ltr', 'normal'], |
michael@0 | 39 | |
michael@0 | 40 | ['bdi', {}, 'ltr', '-moz-isolate'], |
michael@0 | 41 | ['bdi', {'dir': 'ltr'}, 'ltr', '-moz-isolate'], |
michael@0 | 42 | ['bdi', {'dir': 'rtl'}, 'rtl', '-moz-isolate'], |
michael@0 | 43 | ['bdi', {'dir': 'auto'}, 'ltr', '-moz-isolate'], |
michael@0 | 44 | ['bdi', {'dir': ''}, 'ltr', '-moz-isolate'], |
michael@0 | 45 | |
michael@0 | 46 | ['output', {}, 'ltr', '-moz-isolate'], |
michael@0 | 47 | ['output', {'dir': 'ltr'}, 'ltr', '-moz-isolate'], |
michael@0 | 48 | ['output', {'dir': 'rtl'}, 'rtl', '-moz-isolate'], |
michael@0 | 49 | ['output', {'dir': 'auto'}, 'ltr', '-moz-isolate'], |
michael@0 | 50 | ['output', {'dir': ''}, 'ltr', '-moz-isolate'], |
michael@0 | 51 | |
michael@0 | 52 | ['bdo', {}, 'ltr', 'bidi-override'], |
michael@0 | 53 | ['bdo', {'dir': 'ltr'}, 'ltr', 'bidi-override'], |
michael@0 | 54 | ['bdo', {'dir': 'rtl'}, 'rtl', 'bidi-override'], |
michael@0 | 55 | ['bdo', {'dir': 'auto'}, 'ltr', '-moz-isolate-override'], |
michael@0 | 56 | ['bdo', {'dir': ''}, 'ltr', 'bidi-override'], |
michael@0 | 57 | |
michael@0 | 58 | ['textarea', {}, 'ltr', 'normal'], |
michael@0 | 59 | ['textarea', {'dir': 'ltr'}, 'ltr', 'embed'], |
michael@0 | 60 | ['textarea', {'dir': 'rtl'}, 'rtl', 'embed'], |
michael@0 | 61 | ['textarea', {'dir': 'auto'}, 'ltr', '-moz-plaintext'], |
michael@0 | 62 | ['textarea', {'dir': ''}, 'ltr', 'normal'], |
michael@0 | 63 | |
michael@0 | 64 | ['pre', {}, 'ltr', '-moz-isolate'], |
michael@0 | 65 | ['pre', {'dir': 'ltr'}, 'ltr', '-moz-isolate'], |
michael@0 | 66 | ['pre', {'dir': 'rtl'}, 'rtl', '-moz-isolate'], |
michael@0 | 67 | ['pre', {'dir': 'auto'}, 'ltr', '-moz-plaintext'], |
michael@0 | 68 | ['pre', {'dir': ''}, 'ltr', '-moz-isolate'], |
michael@0 | 69 | ].forEach(function (test) { |
michael@0 | 70 | var style = styleOf(test[0], test[1]); |
michael@0 | 71 | is(style.direction, test[2], "default value for direction"); |
michael@0 | 72 | is(style.unicodeBidi, test[3], "default value for unicode-bidi"); |
michael@0 | 73 | }); |
michael@0 | 74 | |
michael@0 | 75 | |
michael@0 | 76 | </script> |
michael@0 | 77 | </pre> |
michael@0 | 78 | </body> |
michael@0 | 79 | </html> |