Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Test for Bug </title>
6 <script type="application/javascript" 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);
23 }
24 return getComputedStyle(element);
25 }
27 var tests = [
28 ['div', {}, 'ltr', '-moz-isolate'],
29 ['div', {'dir': 'ltr'}, 'ltr', '-moz-isolate'],
30 ['div', {'dir': 'rtl'}, 'rtl', '-moz-isolate'],
31 ['div', {'dir': 'auto'}, 'ltr', '-moz-isolate'],
32 ['div', {'dir': ''}, 'ltr', '-moz-isolate'],
34 ['span', {}, 'ltr', 'normal'],
35 ['span', {'dir': 'ltr'}, 'ltr', 'embed'],
36 ['span', {'dir': 'rtl'}, 'rtl', 'embed'],
37 ['span', {'dir': 'auto'}, 'ltr', '-moz-isolate'],
38 ['span', {'dir': ''}, 'ltr', 'normal'],
40 ['bdi', {}, 'ltr', '-moz-isolate'],
41 ['bdi', {'dir': 'ltr'}, 'ltr', '-moz-isolate'],
42 ['bdi', {'dir': 'rtl'}, 'rtl', '-moz-isolate'],
43 ['bdi', {'dir': 'auto'}, 'ltr', '-moz-isolate'],
44 ['bdi', {'dir': ''}, 'ltr', '-moz-isolate'],
46 ['output', {}, 'ltr', '-moz-isolate'],
47 ['output', {'dir': 'ltr'}, 'ltr', '-moz-isolate'],
48 ['output', {'dir': 'rtl'}, 'rtl', '-moz-isolate'],
49 ['output', {'dir': 'auto'}, 'ltr', '-moz-isolate'],
50 ['output', {'dir': ''}, 'ltr', '-moz-isolate'],
52 ['bdo', {}, 'ltr', 'bidi-override'],
53 ['bdo', {'dir': 'ltr'}, 'ltr', 'bidi-override'],
54 ['bdo', {'dir': 'rtl'}, 'rtl', 'bidi-override'],
55 ['bdo', {'dir': 'auto'}, 'ltr', '-moz-isolate-override'],
56 ['bdo', {'dir': ''}, 'ltr', 'bidi-override'],
58 ['textarea', {}, 'ltr', 'normal'],
59 ['textarea', {'dir': 'ltr'}, 'ltr', 'embed'],
60 ['textarea', {'dir': 'rtl'}, 'rtl', 'embed'],
61 ['textarea', {'dir': 'auto'}, 'ltr', '-moz-plaintext'],
62 ['textarea', {'dir': ''}, 'ltr', 'normal'],
64 ['pre', {}, 'ltr', '-moz-isolate'],
65 ['pre', {'dir': 'ltr'}, 'ltr', '-moz-isolate'],
66 ['pre', {'dir': 'rtl'}, 'rtl', '-moz-isolate'],
67 ['pre', {'dir': 'auto'}, 'ltr', '-moz-plaintext'],
68 ['pre', {'dir': ''}, 'ltr', '-moz-isolate'],
69 ].forEach(function (test) {
70 var style = styleOf(test[0], test[1]);
71 is(style.direction, test[2], "default value for direction");
72 is(style.unicodeBidi, test[3], "default value for unicode-bidi");
73 });
76 </script>
77 </pre>
78 </body>
79 </html>