Adding test for bug 374719
[mozilla-central.git] / layout / reftests / bugs / 374719-1.xul
blobf007aa729c16ba9227999edbcff2c7ff92c33119
1 <?xml version="1.0"?>
3 <?xml-stylesheet href="chrome://global/skin/global.css"
4 type="text/css"?>
5 <?xml-stylesheet href="374719-1-css.css"
6 type="text/css"?>
8 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
9 onload="test2()">
11 <script>
12 function test2()
14 var r = document.getElementById('rbox');
16 const XULNS =
17 "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
19 var item = document.createElementNS(XULNS, "gridlikeitem");
20 item.setAttribute("value", "aValue");
22 var cell1 = document.createElementNS(XULNS, "gridlikecell");
23 var label1 = document.createElementNS(XULNS, "label");
24 label1.setAttribute("value", "aLabel1");
25 label1.setAttribute("flex", "1");
26 label1.setAttribute("crop", "end");
27 cell1.appendChild(label1);
28 item.appendChild(cell1);
30 var cell2 = document.createElementNS(XULNS, "gridlikecell");
31 var label2 = document.createElementNS(XULNS, "label");
32 label2.setAttribute("value", "aLabel2");
33 label2.setAttribute("flex", "1");
34 label2.setAttribute("crop", "end");
35 cell2.appendChild(label2);
36 item.appendChild(cell2);
38 var before = document.getElementById("inx");
39 if (!before)
40 r.appendChild(item);
41 else
42 r.insertBefore(item, before);
44 </script>
46 <gridlikebox flex="1" id="rbox">
47 <gridlikecols>
48 <gridlikecol flex="1"/>
49 <gridlikecol flex="1"/>
50 </gridlikecols>
52 <gridlikehead>
53 <gridlikeheader label="Col1"/>
54 <gridlikeheader label="Col2"/>
55 </gridlikehead>
57 <gridlikeitem value="hello1">
58 <gridlikecell><label value="Hello"/></gridlikecell>
59 <gridlikecell><label value="Hello"/></gridlikecell>
60 </gridlikeitem>
61 <gridlikeitem value="hello2" id="inx">
62 <gridlikecell><label value="Hello2"/></gridlikecell>
63 <gridlikecell><label value="Hello2.1"/></gridlikecell>
64 </gridlikeitem>
65 <gridlikeitem value="hello3">
66 <gridlikecell><label value="Hello592"/></gridlikecell>
67 <gridlikecell><label value="Hello592.1"/></gridlikecell>
68 </gridlikeitem>
69 <gridlikeitem value="hello4">
70 <gridlikecell><label value="Hello4"/></gridlikecell>
71 <gridlikecell><label value="Hello4--"/></gridlikecell>
72 </gridlikeitem>
73 </gridlikebox>
74 </window>