blob: d9aaccd58c08e9f5014efe7b3a298853d0387533 [file] [log] [blame]
dacarver58ad0f82008-10-01 03:29:54 +00001<?xml version='1.0'?>
2<testcases css="block-inline.css">
3
Florian Thienel64aa79f2013-01-19 14:18:50 +01004 <test id="Empty Root" layoutWidth="100">
5 <doc><![CDATA[ <root/> ]]></doc>
6 <result>
7 <box class="RootBox">
8 <box class="BlockElementBox">
9 <box class="BlockElementBox" element="root">
10 <box class="ParagraphBox">
11 <box class="LineBox">
12 <box class="PlaceholderBox" />
13 </box>
14 </box>
15 </box>
16 </box>
17 </box>
18 </result>
19 </test>
dacarver58ad0f82008-10-01 03:29:54 +000020
Florian Thienel64aa79f2013-01-19 14:18:50 +010021 <test id="Simple Text" layoutWidth="100">
22 <doc><![CDATA[ <root>Hello, world!</root> ]]></doc>
23 <result>
24 <box class="RootBox">
25 <box class="BlockElementBox">
26 <box class="BlockElementBox" element="root">
27 <box class="ParagraphBox">
28 <box class="LineBox">
29 <box class="DocumentTextBox" text="Hello, " />
30 <box class="DocumentTextBox" text="world!" />
31 <box class="PlaceholderBox" />
32 </box>
33 </box>
34 </box>
35 </box>
36 </box>
37 </result>
38 </test>
dacarver58ad0f82008-10-01 03:29:54 +000039
40
dacarver58ad0f82008-10-01 03:29:54 +000041
Florian Thienel64aa79f2013-01-19 14:18:50 +010042 <!-- A simple wrap. 42 = length("Hello, ") * 6 -->
43 <test id="Simple Wrap" layoutWidth="42">
44 <doc><![CDATA[ <root>Hello, world!</root> ]]></doc>
45 <result>
46 <box class="RootBox">
47 <box class="BlockElementBox">
48 <box class="BlockElementBox" element="root">
49 <box class="ParagraphBox">
50 <box class="LineBox">
51 <box class="DocumentTextBox" text="Hello, " />
52 </box>
53 <box class="LineBox">
54 <box class="DocumentTextBox" text="world!" />
55 <box class="PlaceholderBox" />
56 </box>
57 </box>
58 </box>
59 </box>
60 </box>
61 </result>
62 </test>
dacarver58ad0f82008-10-01 03:29:54 +000063
64
Florian Thienel64aa79f2013-01-19 14:18:50 +010065 <!-- Attempts to split the text inside the space after "Hello,". The space
66 should remain with "Hello," and not be split on to its own line -->
67 <test id="Split at First Space" layoutWidth="40">
68 <doc><![CDATA[ <root>Hello, world!</root> ]]></doc>
69 <result>
70 <box class="RootBox">
71 <box class="BlockElementBox">
72 <box class="BlockElementBox" element="root">
73 <box class="ParagraphBox">
74 <box class="LineBox">
75 <box class="DocumentTextBox" text="Hello, " />
76 </box>
77 <box class="LineBox">
78 <box class="DocumentTextBox" text="world!" />
79 <box class="PlaceholderBox" />
80 </box>
81 </box>
82 </box>
83 </box>
84 </box>
85 </result>
86 </test>
dacarver58ad0f82008-10-01 03:29:54 +000087
88
Florian Thienel64aa79f2013-01-19 14:18:50 +010089 <test id="Empty Inline" layoutWidth="100">
90 <doc><![CDATA[ <root><b></b></root> ]]></doc>
91 <result>
92 <box class="RootBox">
93 <box class="BlockElementBox">
94 <box class="BlockElementBox" element="root">
95 <box class="ParagraphBox">
96 <box class="LineBox">
97 <box class="PlaceholderBox" />
98 <box class="InlineElementBox">
99 <box class="DrawableBox" />
100 <box class="PlaceholderBox" />
101 <box class="DrawableBox" />
102 </box>
103 <box class="PlaceholderBox" />
104 </box>
105 </box>
106 </box>
107 </box>
108 </box>
109 </result>
110 </test>
dacarver58ad0f82008-10-01 03:29:54 +0000111
112
Florian Thienel64aa79f2013-01-19 14:18:50 +0100113 <test id="Simple Inline" layoutWidth="100">
114 <doc><![CDATA[ <root><b>cat sat</b></root> ]]></doc>
115 <result>
116 <box class="RootBox">
117 <box class="BlockElementBox">
118 <box class="BlockElementBox" element="root">
119 <box class="ParagraphBox">
120 <box class="LineBox">
121 <box class="PlaceholderBox" />
122 <box class="InlineElementBox">
123 <box class="DrawableBox" />
124 <box class="DocumentTextBox" text="cat " />
125 <box class="DocumentTextBox" text="sat" />
126 <box class="PlaceholderBox" />
127 <box class="DrawableBox" />
128 </box>
129 <box class="PlaceholderBox" />
130 </box>
131 </box>
132 </box>
133 </box>
134 </box>
135 </result>
136 </test>
dacarver58ad0f82008-10-01 03:29:54 +0000137
Florian Thienel64aa79f2013-01-19 14:18:50 +0100138
139 <test id="Simple Inline Split 1" layoutWidth="36">
140 <doc><![CDATA[ <root><b>cat sat</b></root> ]]></doc>
141 <result>
142 <box class="RootBox">
143 <box class="BlockElementBox">
144 <box class="BlockElementBox" element="root">
145 <box class="ParagraphBox">
146 <box class="LineBox">
147 <box class="PlaceholderBox" />
148 <box class="InlineElementBox">
149 <box class="DrawableBox" />
150 <box class="DocumentTextBox" text="cat " />
151 </box>
152 </box>
153 <box class="LineBox">
154 <box class="InlineElementBox">
155 <box class="DocumentTextBox" text="sat" />
156 <box class="PlaceholderBox" />
157 <box class="DrawableBox" />
158 </box>
159 <box class="PlaceholderBox" />
160 </box>
161 </box>
162 </box>
163 </box>
164 </box>
165 </result>
166 </test>
167
168
169 <test id="Inline With Surrounding Text" layoutWidth="100">
170 <doc><![CDATA[ <root>hat <b>cat sat</b> bat</root> ]]></doc>
171 <result>
172 <box class="RootBox">
173 <box class="BlockElementBox">
174 <box class="BlockElementBox" element="root">
175 <box class="ParagraphBox">
176 <box class="LineBox">
177 <box class="DocumentTextBox" text="hat " />
178 <box class="PlaceholderBox" />
179 <box class="InlineElementBox">
180 <box class="DrawableBox" />
181 <box class="DocumentTextBox" text="cat " />
182 <box class="DocumentTextBox" text="sat" />
183 <box class="PlaceholderBox" />
184 <box class="DrawableBox" />
185 </box>
186 <box class="DocumentTextBox" text=" " />
187 <box class="DocumentTextBox" text="bat" />
188 <box class="PlaceholderBox" />
189 </box>
190 </box>
191 </box>
192 </box>
193 </box>
194 </result>
195 </test>
196
197
198 <test id="Inline With Surrounding Text Split 1" layoutWidth="76">
199 <doc><![CDATA[ <root>hat <b>cat sat</b> bat</root> ]]></doc>
200 <result>
201 <box class="RootBox">
202 <box class="BlockElementBox">
203 <box class="BlockElementBox" element="root">
204 <box class="ParagraphBox">
205 <box class="LineBox">
206 <box class="DocumentTextBox" text="hat " />
207 <box class="PlaceholderBox" />
208 <box class="InlineElementBox">
209 <box class="DrawableBox" />
210 <box class="DocumentTextBox" text="cat " />
211 <box class="DocumentTextBox" text="sat" />
212 <box class="PlaceholderBox" />
213 <box class="DrawableBox" />
214 </box>
215 <box class="DocumentTextBox" text=" " />
216 </box>
217 <box class="LineBox">
218 <box class="DocumentTextBox" text="bat" />
219 <box class="PlaceholderBox" />
220 </box>
221 </box>
222 </box>
223 </box>
224 </box>
225 </result>
226 </test>
227
228
229 <test id="Inline With Surrounding Text Split 2" layoutWidth="75">
230 <doc><![CDATA[ <root>hat <b>cat sat</b> bat</root> ]]></doc>
231 <result>
232 <box class="RootBox">
233 <box class="BlockElementBox">
234 <box class="BlockElementBox" element="root">
235 <box class="ParagraphBox">
236 <box class="LineBox">
237 <box class="DocumentTextBox" text="hat " />
238 <box class="PlaceholderBox" />
239 <box class="InlineElementBox">
240 <box class="DrawableBox" />
241 <box class="DocumentTextBox" text="cat " />
242 </box>
243 </box>
244 <box class="LineBox">
245 <box class="InlineElementBox">
246 <box class="DocumentTextBox" text="sat" />
247 <box class="PlaceholderBox" />
248 <box class="DrawableBox" />
249 </box>
250 <box class="DocumentTextBox" text=" " />
251 <box class="DocumentTextBox" text="bat" />
252 <box class="PlaceholderBox" />
253 </box>
254 </box>
255 </box>
256 </box>
257 </box>
258 </result>
259 </test>
260
261
262
263 <test id="Block Child w/ Inline Before" layoutWidth="75">
264 <doc><![CDATA[ <root>Paris <p>Garters</p></root> ]]></doc>
265 <result>
266 <box class="RootBox">
267 <box class="BlockElementBox">
268 <box class="BlockElementBox" element="root">
269
270 <box class="ParagraphBox">
271 <box class="LineBox">
272 <box class="DocumentTextBox" text="Paris" />
273 <box class="PlaceholderBox" />
274 </box>
275 </box>
276
277 <box class="BlockElementBox">
278 <box class="ParagraphBox">
279 <box class="LineBox">
280 <box class="DocumentTextBox" text="Garters" />
281 <box class="PlaceholderBox" />
282 </box>
283 </box>
284 </box>
285
286 </box>
287 </box>
288 </box>
289 </result>
290 </test>
291
292
293
294 <test id="Block Child w/ Inline After" layoutWidth="100">
295 <doc><![CDATA[ <root><p>Harris</p> Tweed</root> ]]></doc>
296 <result>
297 <box class="RootBox">
298 <box class="BlockElementBox">
299 <box class="BlockElementBox" element="root">
300
301 <box class="BlockElementBox">
302 <box class="ParagraphBox">
303 <box class="LineBox">
304 <box class="DocumentTextBox" text="Harris" />
305 <box class="PlaceholderBox" />
306 </box>
307 </box>
308 </box>
309
310 <box class="ParagraphBox">
311 <box class="LineBox">
312 <box class="DocumentTextBox" text="Tweed" />
313 <box class="PlaceholderBox" />
314 </box>
315 </box>
316
317 </box>
318 </box>
319 </box>
320 </result>
321 </test>
322
323
324 <test id="Block Child w/ Surrounding Inlines" layoutWidth="200">
325 <doc><![CDATA[ <root>Oliver <p>Boliver</p> Butt</root> ]]></doc>
326 <result>
327 <box class="RootBox">
328 <box class="BlockElementBox">
329 <box class="BlockElementBox" element="root">
330
331 <box class="ParagraphBox">
332 <box class="LineBox">
333 <box class="DocumentTextBox" text="Oliver" />
334 <box class="PlaceholderBox" />
335 </box>
336 </box>
337
338 <box class="BlockElementBox">
339 <box class="ParagraphBox">
340 <box class="LineBox">
341 <box class="DocumentTextBox" text="Boliver" />
342 <box class="PlaceholderBox" />
343 </box>
344 </box>
345 </box>
346
347 <box class="ParagraphBox">
348 <box class="LineBox">
349 <box class="DocumentTextBox" text="Butt" />
350 <box class="PlaceholderBox" />
351 </box>
352 </box>
353
354 </box>
355 </box>
356 </box>
357 </result>
358 </test>
359
360
361 <!-- TODO test blocks inside inlines -->
362
363
dacarver58ad0f82008-10-01 03:29:54 +0000364</testcases>