|
1 <?xml version="1.0"?> |
|
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
|
3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?> |
|
4 <?xml-stylesheet href="data:text/css,description {min-width: 1px; padding: 2px;}" type="text/css"?> |
|
5 <!-- |
|
6 https://bugzilla.mozilla.org/show_bug.cgi?id=393970 |
|
7 --> |
|
8 <window title="Mozilla Bug 393970" |
|
9 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
|
10 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> |
|
11 |
|
12 <!-- test results are displayed in the html:body --> |
|
13 <body xmlns="http://www.w3.org/1999/xhtml"> |
|
14 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=393970" |
|
15 target="_blank">Mozilla Bug 393970</a> |
|
16 </body> |
|
17 |
|
18 <hbox flex="1" pack="start" style="visibility: hidden;"> |
|
19 <grid min-width="1000" width="1000"> |
|
20 <columns> |
|
21 <column flex="1"/> |
|
22 <column flex="2"/> |
|
23 <column flex="3"/> |
|
24 </columns> |
|
25 <rows id="rows1"> |
|
26 <row> |
|
27 <description id="cell11">test1</description> |
|
28 <description id="cell12">test2</description> |
|
29 <description id="cell13">test3</description> |
|
30 </row> |
|
31 <rows id="rows2" flex="1"> |
|
32 <row> |
|
33 <description id="cell21">test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1</description> |
|
34 <description id="cell22">test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2</description> |
|
35 <description id="cell23">test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3</description> |
|
36 </row> |
|
37 <rows id="rows3"> |
|
38 <row> |
|
39 <description id="cell31">test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1</description> |
|
40 <description id="cell32">test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2 test2</description> |
|
41 <description id="cell33">test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3 test3</description> |
|
42 </row> |
|
43 </rows> |
|
44 </rows> |
|
45 </rows> |
|
46 </grid> |
|
47 </hbox> |
|
48 |
|
49 <!-- test code goes here --> |
|
50 <script type="application/javascript"><![CDATA[ |
|
51 /** Test for Bug 393970 **/ |
|
52 |
|
53 if (navigator.platform.startsWith("Linux")) { |
|
54 SimpleTest.expectAssertions(0, 24); |
|
55 } |
|
56 |
|
57 var tests = [ |
|
58 'overflow-x: hidden; overflow-y: hidden;', |
|
59 'overflow-x: scroll; overflow-y: hidden;', |
|
60 'overflow-x: hidden; overflow-y: scroll;', |
|
61 'overflow-x: scroll; overflow-y: scroll;', |
|
62 ]; |
|
63 var currentTest = -1; |
|
64 |
|
65 function runNextTest() { |
|
66 currentTest++; |
|
67 if (currentTest >= tests.length) { |
|
68 SimpleTest.finish(); |
|
69 return; |
|
70 } |
|
71 |
|
72 $("rows2").setAttribute("style", tests[currentTest]); |
|
73 setTimeout(checkPositions, 0, tests[currentTest]); |
|
74 } |
|
75 |
|
76 function checkPositions(variant) { |
|
77 for (var col = 1; col <= 3; col++) { |
|
78 is($('cell1' + col).boxObject.x, $('cell2' + col).boxObject.x, "Cells (1," + col + ") and (2," + col + ") line up horizontally (with " + variant + ")"); |
|
79 is($('cell2' + col).boxObject.x, $('cell3' + col).boxObject.x, "Cells (2," + col + ") and (3," + col + ") line up horizontally (with " + variant + ")"); |
|
80 } |
|
81 for (var row = 1; row <= 3; row++) { |
|
82 is($('cell' + row + '1').boxObject.y, $('cell' + row + '2').boxObject.y, "Cells (" + row + ",1) and (" + row + ",2) line up vertically (with " + variant + ")"); |
|
83 is($('cell' + row + '2').boxObject.y, $('cell' + row + '3').boxObject.y, "Cells (" + row + ",2) and (" + row + ",3) line up vertically (with " + variant + ")"); |
|
84 } |
|
85 runNextTest(); |
|
86 } |
|
87 |
|
88 addLoadEvent(runNextTest); |
|
89 SimpleTest.waitForExplicitFinish() |
|
90 ]]></script> |
|
91 </window> |