OSDN Git Service

* Added test code of CSS for div tag.
[modchxj/mod_chxj.git] / test / chxj_ixhtml10 / test_chxj_ixhtml10.c
1 #include <CUnit/CUnit.h>
2 #include <CUnit/Console.h>
3 #include <CUnit/Basic.h>
4 #include <stdio.h>
5 #define CHXJ_TEST
6 #define IMG_NOT_CONVERT_FILENAME
7
8 #include "chxj_apache.h"
9 #include "apr.h"
10 #include "qs_malloc.c"
11 #include "qs_log.c"
12 #include "qs_parse_tag.c"
13 #include "qs_parse_string.c"
14 #include "qs_parse_attr.c"
15 #include "qs_ignore_sp.c"
16 #include "qs_parse_file.c"
17 #include "chxj_buffered_write.c"
18 #include "chxj_chtml10.c"
19 #include "chxj_chtml20.c"
20 #include "chxj_chtml30.c"
21 #include "chxj_chtml40.c"
22 #include "chxj_chtml50.c"
23 #include "chxj_ixhtml10.c"
24 #include "chxj_jxhtml.c"
25 #include "chxj_jhtml.c"
26 #include "chxj_hdml.c"
27 #include "chxj_xhtml_mobile_1_0.c"
28 #include "chxj_node_convert.c"
29 #include "chxj_tag_util.c"
30 #include "chxj_encoding.c"
31 #include "chxj_cookie.c"
32 #include "chxj_img_conv.c"
33 #include "chxj_url_encode.c"
34 #include "chxj_apache.c"
35 #include "chxj_dbm.c"
36 #include "chxj_str_util.c"
37 #include <iconv.h>
38 #include "chxj_serf.h"
39 #include "chxj_css.h"
40 #include "chxj_serf.c"
41 #include "chxj_css.c"
42
43
44
45 void test_ixhtml10_001();
46 void test_ixhtml10_002();
47 void test_ixhtml10_comment_tag_001();
48
49 void test_ixhtml10_meta_tag_001();
50 void test_ixhtml10_meta_tag_002();
51 void test_ixhtml10_meta_tag_003();
52 void test_ixhtml10_meta_tag_004();
53 void test_ixhtml10_meta_tag_005();
54 void test_ixhtml10_meta_tag_006();
55 void test_ixhtml10_meta_tag_007();
56 void test_ixhtml10_meta_tag_008();
57 void test_ixhtml10_meta_tag_009();
58
59 void test_ixhtml10_textarea_tag_001();
60 void test_ixhtml10_textarea_tag_002();
61 void test_ixhtml10_textarea_tag_003();
62 void test_ixhtml10_textarea_tag_004();
63 void test_ixhtml10_textarea_tag_005();
64 void test_ixhtml10_textarea_tag_006();
65 void test_ixhtml10_textarea_tag_007();
66 void test_ixhtml10_textarea_tag_008();
67 void test_ixhtml10_textarea_tag_009();
68 void test_ixhtml10_textarea_tag_010();
69 void test_ixhtml10_textarea_tag_011();
70 void test_ixhtml10_textarea_tag_012();
71 void test_ixhtml10_textarea_tag_013();
72 void test_ixhtml10_textarea_tag_014();
73 void test_ixhtml10_textarea_tag_015();
74 void test_ixhtml10_textarea_tag_016();
75 void test_ixhtml10_textarea_tag_017();
76 void test_ixhtml10_textarea_tag_018();
77 void test_ixhtml10_textarea_tag_019();
78 void test_ixhtml10_textarea_tag_020();
79 void test_ixhtml10_textarea_tag_021();
80 void test_ixhtml10_textarea_tag_022();
81 void test_ixhtml10_textarea_tag_023();
82 void test_ixhtml10_textarea_tag_024();
83 void test_ixhtml10_textarea_tag_025();
84 void test_ixhtml10_textarea_tag_026();
85
86 void test_ixhtml10_p_tag_001();
87 void test_ixhtml10_p_tag_002();
88 void test_ixhtml10_p_tag_003();
89 void test_ixhtml10_p_tag_004();
90 void test_ixhtml10_p_tag_005();
91 void test_ixhtml10_p_tag_006();
92 void test_ixhtml10_p_tag_007();
93 void test_ixhtml10_p_tag_008();
94
95 void test_ixhtml10_pre_tag_001();
96 void test_ixhtml10_pre_tag_002();
97 void test_ixhtml10_pre_tag_003();
98 void test_ixhtml10_pre_tag_004();
99 void test_ixhtml10_pre_tag_005();
100
101 void test_ixhtml10_ul_tag_001();
102 void test_ixhtml10_ul_tag_002();
103 void test_ixhtml10_ul_tag_003();
104 void test_ixhtml10_ul_tag_004();
105 void test_ixhtml10_ul_tag_005();
106 void test_ixhtml10_ul_tag_006();
107 void test_ixhtml10_ul_tag_007();
108 void test_ixhtml10_ul_tag_008();
109 void test_ixhtml10_ul_tag_009();
110 void test_ixhtml10_ul_tag_010();
111 void test_ixhtml10_ul_tag_011();
112
113 void test_ixhtml10_li_tag_001();
114 void test_ixhtml10_li_tag_002();
115 void test_ixhtml10_li_tag_003();
116 void test_ixhtml10_li_tag_004();
117 void test_ixhtml10_li_tag_005();
118 void test_ixhtml10_li_tag_006();
119 void test_ixhtml10_li_tag_007();
120 void test_ixhtml10_li_tag_008();
121 void test_ixhtml10_li_tag_009();
122 void test_ixhtml10_li_tag_010();
123 void test_ixhtml10_li_tag_011();
124 void test_ixhtml10_li_tag_012();
125 void test_ixhtml10_li_tag_013();
126 void test_ixhtml10_li_tag_014();
127 void test_ixhtml10_li_tag_015();
128 void test_ixhtml10_li_tag_016();
129 void test_ixhtml10_li_tag_017();
130 void test_ixhtml10_li_tag_018();
131
132 void test_ixhtml10_ol_tag_001();
133 void test_ixhtml10_ol_tag_002();
134 void test_ixhtml10_ol_tag_003();
135 void test_ixhtml10_ol_tag_004();
136 void test_ixhtml10_ol_tag_005();
137 void test_ixhtml10_ol_tag_006();
138 void test_ixhtml10_ol_tag_007();
139 void test_ixhtml10_ol_tag_008();
140 void test_ixhtml10_ol_tag_009();
141 void test_ixhtml10_ol_tag_010();
142 void test_ixhtml10_ol_tag_011();
143 void test_ixhtml10_ol_tag_012();
144 void test_ixhtml10_ol_tag_013();
145 void test_ixhtml10_ol_tag_014();
146 void test_ixhtml10_ol_tag_015();
147 void test_ixhtml10_ol_tag_016();
148 void test_ixhtml10_ol_tag_017();
149 void test_ixhtml10_ol_tag_018();
150
151 void test_ixhtml10_h1_tag_001();
152 void test_ixhtml10_h1_tag_002();
153 void test_ixhtml10_h1_tag_003();
154 void test_ixhtml10_h1_tag_004();
155 void test_ixhtml10_h1_tag_005();
156 void test_ixhtml10_h1_tag_006();
157 void test_ixhtml10_h1_tag_007();
158 void test_ixhtml10_h1_tag_008();
159 void test_ixhtml10_h1_tag_009();
160 void test_ixhtml10_h1_tag_010();
161
162 void test_ixhtml10_h2_tag_001();
163 void test_ixhtml10_h2_tag_002();
164 void test_ixhtml10_h2_tag_003();
165 void test_ixhtml10_h2_tag_004();
166 void test_ixhtml10_h2_tag_005();
167 void test_ixhtml10_h2_tag_006();
168 void test_ixhtml10_h2_tag_007();
169 void test_ixhtml10_h2_tag_008();
170 void test_ixhtml10_h2_tag_009();
171 void test_ixhtml10_h2_tag_010();
172
173 void test_ixhtml10_h3_tag_001();
174 void test_ixhtml10_h3_tag_002();
175 void test_ixhtml10_h3_tag_003();
176 void test_ixhtml10_h3_tag_004();
177 void test_ixhtml10_h3_tag_005();
178 void test_ixhtml10_h3_tag_006();
179 void test_ixhtml10_h3_tag_007();
180 void test_ixhtml10_h3_tag_008();
181 void test_ixhtml10_h3_tag_009();
182 void test_ixhtml10_h3_tag_010();
183
184 void test_ixhtml10_h4_tag_001();
185 void test_ixhtml10_h4_tag_002();
186 void test_ixhtml10_h4_tag_003();
187 void test_ixhtml10_h4_tag_004();
188 void test_ixhtml10_h4_tag_005();
189 void test_ixhtml10_h4_tag_006();
190 void test_ixhtml10_h4_tag_007();
191 void test_ixhtml10_h4_tag_008();
192 void test_ixhtml10_h4_tag_009();
193 void test_ixhtml10_h4_tag_010();
194
195 void test_ixhtml10_h5_tag_001();
196 void test_ixhtml10_h5_tag_002();
197 void test_ixhtml10_h5_tag_003();
198 void test_ixhtml10_h5_tag_004();
199 void test_ixhtml10_h5_tag_005();
200 void test_ixhtml10_h5_tag_006();
201 void test_ixhtml10_h5_tag_007();
202 void test_ixhtml10_h5_tag_008();
203 void test_ixhtml10_h5_tag_009();
204 void test_ixhtml10_h5_tag_010();
205
206 void test_ixhtml10_h6_tag_001();
207 void test_ixhtml10_h6_tag_002();
208 void test_ixhtml10_h6_tag_003();
209 void test_ixhtml10_h6_tag_004();
210 void test_ixhtml10_h6_tag_005();
211 void test_ixhtml10_h6_tag_006();
212 void test_ixhtml10_h6_tag_007();
213 void test_ixhtml10_h6_tag_008();
214 void test_ixhtml10_h6_tag_009();
215 void test_ixhtml10_h6_tag_010();
216
217 void test_ixhtml10_head_tag_001();
218 void test_ixhtml10_head_tag_002();
219
220 void test_ixhtml10_title_tag_001();
221 void test_ixhtml10_title_tag_002();
222
223 void test_ixhtml10_base_tag_001();
224 void test_ixhtml10_base_tag_href_attribute_001();
225 void test_ixhtml10_base_tag_href_attribute_002();
226 void test_ixhtml10_base_tag_href_attribute_003();
227 void test_ixhtml10_base_tag_href_attribute_004();
228
229 void test_ixhtml10_body_tag_001();
230 void test_ixhtml10_body_tag_002();
231 void test_ixhtml10_body_tag_003();
232 void test_ixhtml10_body_tag_004();
233 void test_ixhtml10_body_tag_005();
234 void test_ixhtml10_body_tag_006();
235 void test_ixhtml10_body_tag_007();
236 void test_ixhtml10_body_tag_008();
237 void test_ixhtml10_body_tag_009();
238 void test_ixhtml10_body_tag_010();
239 void test_ixhtml10_body_tag_011();
240 void test_ixhtml10_body_tag_012();
241 void test_ixhtml10_body_tag_013();
242 void test_ixhtml10_body_tag_014();
243 void test_ixhtml10_body_tag_015();
244
245 void test_ixhtml10_style_tag_001();
246 void test_ixhtml10_style_tag_002();
247 void test_ixhtml10_style_tag_003();
248
249 void test_ixhtml10_a_tag_name_attribute_001();
250 void test_ixhtml10_a_tag_name_attribute_002();
251 void test_ixhtml10_a_tag_name_attribute_003();
252 void test_ixhtml10_a_tag_name_attribute_004();
253 void test_ixhtml10_a_tag_href_attribute_001();
254 void test_ixhtml10_a_tag_href_attribute_002();
255 void test_ixhtml10_a_tag_href_attribute_003();
256 void test_ixhtml10_a_tag_href_attribute_004();
257 void test_ixhtml10_a_tag_href_attribute_005();
258 void test_ixhtml10_a_tag_href_attribute_006();
259 void test_ixhtml10_a_tag_accesskey_attribute_001();
260 void test_ixhtml10_a_tag_accesskey_attribute_002();
261 void test_ixhtml10_a_tag_accesskey_attribute_003();
262
263 void test_ixhtml10_br_tag_001();
264 void test_ixhtml10_br_tag_002();
265 void test_ixhtml10_br_tag_003();
266 void test_ixhtml10_br_tag_004();
267 void test_ixhtml10_br_tag_005();
268 void test_ixhtml10_br_tag_006();
269 void test_ixhtml10_br_tag_007();
270
271 void test_ixhtml10_font_tag_001();
272 void test_ixhtml10_font_tag_002();
273 void test_ixhtml10_font_tag_003();
274 void test_ixhtml10_font_tag_004();
275 void test_ixhtml10_font_tag_005();
276 void test_ixhtml10_font_tag_006();
277 void test_ixhtml10_font_tag_007();
278 void test_ixhtml10_font_tag_008();
279 void test_ixhtml10_font_tag_009();
280 void test_ixhtml10_font_tag_010();
281 void test_ixhtml10_font_tag_011();
282 void test_ixhtml10_font_tag_012();
283 void test_ixhtml10_font_tag_013();
284 void test_ixhtml10_font_tag_014();
285 void test_ixhtml10_font_tag_015();
286 void test_ixhtml10_font_tag_016();
287 void test_ixhtml10_font_tag_017();
288 void test_ixhtml10_font_tag_018();
289 void test_ixhtml10_font_tag_019();
290 void test_ixhtml10_font_tag_020();
291 void test_ixhtml10_font_tag_021();
292 void test_ixhtml10_font_tag_022();
293
294 void test_ixhtml10_input_tag_001();
295 void test_ixhtml10_input_tag_002();
296 void test_ixhtml10_input_tag_003();
297 void test_ixhtml10_input_tag_004();
298 void test_ixhtml10_input_tag_005();
299 void test_ixhtml10_input_tag_006();
300 void test_ixhtml10_input_tag_007();
301 void test_ixhtml10_input_tag_008();
302 void test_ixhtml10_input_tag_009();
303 void test_ixhtml10_input_tag_010();
304 void test_ixhtml10_input_tag_011();
305 void test_ixhtml10_input_tag_012();
306 void test_ixhtml10_input_tag_013();
307 void test_ixhtml10_input_tag_014();
308 void test_ixhtml10_input_tag_015();
309 void test_ixhtml10_input_tag_016();
310 void test_ixhtml10_input_tag_017();
311 void test_ixhtml10_input_tag_018();
312 void test_ixhtml10_input_tag_019();
313 void test_ixhtml10_input_tag_020();
314 void test_ixhtml10_input_tag_021();
315 void test_ixhtml10_input_tag_022();
316 void test_ixhtml10_input_tag_023();
317 void test_ixhtml10_input_tag_024();
318 void test_ixhtml10_input_tag_025();
319 void test_ixhtml10_input_tag_026();
320 void test_ixhtml10_input_tag_027();
321 void test_ixhtml10_input_tag_028();
322 void test_ixhtml10_input_tag_029();
323 void test_ixhtml10_input_tag_030();
324 void test_ixhtml10_input_tag_031();
325 void test_ixhtml10_input_tag_032();
326 void test_ixhtml10_input_tag_033();
327 void test_ixhtml10_input_tag_034();
328 void test_ixhtml10_input_tag_035();
329 void test_ixhtml10_input_tag_036();
330 void test_ixhtml10_input_tag_037();
331 void test_ixhtml10_input_tag_038();
332 void test_ixhtml10_input_tag_039();
333 void test_ixhtml10_input_tag_040();
334 void test_ixhtml10_input_tag_041();
335 void test_ixhtml10_input_tag_042();
336 void test_ixhtml10_input_tag_043();
337 void test_ixhtml10_input_tag_044();
338 void test_ixhtml10_input_tag_045();
339 void test_ixhtml10_input_tag_046();
340 void test_ixhtml10_input_tag_047();
341
342 void test_ixhtml10_center_tag_001();
343
344 void test_ixhtml10_hr_tag_001();
345 void test_ixhtml10_hr_tag_002();
346 void test_ixhtml10_hr_tag_003();
347 void test_ixhtml10_hr_tag_004();
348 void test_ixhtml10_hr_tag_005();
349 void test_ixhtml10_hr_tag_006();
350 void test_ixhtml10_hr_tag_007();
351 void test_ixhtml10_hr_tag_008();
352 void test_ixhtml10_hr_tag_009();
353 void test_ixhtml10_hr_tag_010();
354 void test_ixhtml10_hr_tag_011();
355 void test_ixhtml10_hr_tag_012();
356 void test_ixhtml10_hr_tag_013();
357 void test_ixhtml10_hr_tag_014();
358 void test_ixhtml10_hr_tag_015();
359 void test_ixhtml10_hr_tag_016();
360 void test_ixhtml10_hr_tag_017();
361 void test_ixhtml10_hr_tag_018();
362 void test_ixhtml10_hr_tag_018_1();
363 void test_ixhtml10_hr_tag_018_2();
364
365 void test_ixhtml10_img_tag_001();
366 void test_ixhtml10_img_tag_002();
367 void test_ixhtml10_img_tag_003();
368 void test_ixhtml10_img_tag_004();
369 void test_ixhtml10_img_tag_005();
370 void test_ixhtml10_img_tag_006();
371 void test_ixhtml10_img_tag_007();
372 void test_ixhtml10_img_tag_008();
373 void test_ixhtml10_img_tag_009();
374 void test_ixhtml10_img_tag_010();
375 void test_ixhtml10_img_tag_011();
376 void test_ixhtml10_img_tag_012();
377 void test_ixhtml10_img_tag_013();
378 void test_ixhtml10_img_tag_013_1();
379 void test_ixhtml10_img_tag_014();
380 void test_ixhtml10_img_tag_015();
381 void test_ixhtml10_img_tag_016();
382 void test_ixhtml10_img_tag_017();
383 void test_ixhtml10_img_tag_018();
384 void test_ixhtml10_img_tag_019();
385 void test_ixhtml10_img_tag_020();
386 void test_ixhtml10_img_tag_021();
387 void test_ixhtml10_img_tag_022();
388 void test_ixhtml10_img_tag_023();
389 void test_ixhtml10_img_tag_024();
390 void test_ixhtml10_img_tag_025();
391 void test_ixhtml10_img_tag_026();
392 void test_ixhtml10_img_tag_027();
393 void test_ixhtml10_img_tag_028();
394 void test_ixhtml10_img_tag_029();
395 void test_ixhtml10_img_tag_030();
396 void test_ixhtml10_img_tag_031();
397 void test_ixhtml10_img_tag_032();
398 void test_ixhtml10_img_tag_033();
399 void test_ixhtml10_img_tag_034();
400 void test_ixhtml10_img_tag_035();
401 void test_ixhtml10_img_tag_036();
402 void test_ixhtml10_img_tag_037();
403
404 void test_ixhtml10_select_tag_001();
405 void test_ixhtml10_select_tag_002();
406 void test_ixhtml10_select_tag_003();
407 void test_ixhtml10_select_tag_004();
408 void test_ixhtml10_select_tag_005();
409 void test_ixhtml10_select_tag_006();
410 void test_ixhtml10_select_tag_007();
411 void test_ixhtml10_select_tag_008();
412 void test_ixhtml10_select_tag_009();
413 void test_ixhtml10_select_tag_010();
414 void test_ixhtml10_select_tag_011();
415 void test_ixhtml10_select_tag_012();
416 void test_ixhtml10_select_tag_013();
417 void test_ixhtml10_select_tag_014();
418
419 void test_ixhtml10_option_tag_001();
420 void test_ixhtml10_option_tag_002();
421 void test_ixhtml10_option_tag_003();
422 void test_ixhtml10_option_tag_004();
423 void test_ixhtml10_option_tag_005();
424 void test_ixhtml10_option_tag_006();
425 void test_ixhtml10_option_tag_007();
426
427 void test_ixhtml10_div_tag_001();
428 void test_ixhtml10_div_tag_002();
429 void test_ixhtml10_div_tag_003();
430 void test_ixhtml10_div_tag_004();
431 void test_ixhtml10_div_tag_005();
432 void test_ixhtml10_div_tag_006();
433 void test_ixhtml10_div_tag_007();
434
435 void test_ixhtml10_chxjif_tag_001();
436 void test_ixhtml10_chxjif_tag_002();
437 void test_ixhtml10_chxjif_tag_003();
438 void test_ixhtml10_chxjif_tag_004();
439 void test_ixhtml10_chxjif_tag_005();
440 void test_ixhtml10_chxjif_tag_006();
441 void test_ixhtml10_chxjif_tag_007();
442 void test_ixhtml10_chxjif_tag_008();
443
444 void test_ixhtml10_nobr_tag_001();
445 void test_ixhtml10_nobr_tag_002();
446
447 void test_ixhtml10_small_tag_001();
448 void test_ixhtml10_small_tag_002();
449
450 void test_ixhtml10_span_tag_001();
451 void test_ixhtml10_span_tag_002();
452
453 void test_ixhtml10_span_tag_with_css_001();
454 void test_ixhtml10_span_tag_with_css_002();
455 void test_ixhtml10_span_tag_with_css_003();
456 void test_ixhtml10_span_tag_with_css_004();
457 void test_ixhtml10_span_tag_with_css_005();
458 void test_ixhtml10_span_tag_with_css_006();
459 void test_ixhtml10_span_tag_with_css_007();
460 void test_ixhtml10_span_tag_with_css_008();
461 void test_ixhtml10_span_tag_with_css_009();
462 void test_ixhtml10_span_tag_with_css_010();
463 void test_ixhtml10_span_tag_with_css_011();
464 void test_ixhtml10_span_tag_with_css_012();
465 void test_ixhtml10_span_tag_with_css_013();
466 void test_ixhtml10_span_tag_with_css_014();
467 void test_ixhtml10_span_tag_with_css_015();
468 void test_ixhtml10_span_tag_with_css_016();
469 void test_ixhtml10_span_tag_with_css_017();
470 void test_ixhtml10_span_tag_with_css_018();
471 void test_ixhtml10_span_tag_with_css_019();
472 void test_ixhtml10_span_tag_with_css_020();
473 void test_ixhtml10_span_tag_with_css_021();
474 void test_ixhtml10_span_tag_with_css_022();
475 void test_ixhtml10_span_tag_with_css_023();
476 void test_ixhtml10_span_tag_with_css_024();
477 void test_ixhtml10_span_tag_with_css_025();
478 void test_ixhtml10_span_tag_with_css_026();
479 void test_ixhtml10_span_tag_with_css_027();
480 void test_ixhtml10_span_tag_with_css_028();
481 void test_ixhtml10_span_tag_with_css_029();
482 void test_ixhtml10_span_tag_with_css_030();
483 void test_ixhtml10_span_tag_with_css_031();
484 void test_ixhtml10_span_tag_with_css_032();
485 void test_ixhtml10_span_tag_with_css_033();
486 void test_ixhtml10_span_tag_with_css_034();
487 void test_ixhtml10_span_tag_with_css_035();
488 void test_ixhtml10_span_tag_with_css_036();
489 void test_ixhtml10_span_tag_with_css_037();
490 void test_ixhtml10_span_tag_with_css_038();
491 void test_ixhtml10_span_tag_with_css_039();
492 void test_ixhtml10_span_tag_with_css_040();
493
494 void test_ixhtml10_th_tag_001();
495 void test_ixhtml10_th_tag_002();
496
497 void test_ixhtml10_b_tag_001();
498 void test_ixhtml10_b_tag_002();
499
500 void test_ixhtml10_fieldset_tag_001();
501 void test_ixhtml10_fieldset_tag_002();
502
503 void test_ixhtml10_dt_tag_001();
504 void test_ixhtml10_dt_tag_002();
505 void test_ixhtml10_dt_tag_with_css_001();
506 void test_ixhtml10_dt_tag_with_css_002();
507 void test_ixhtml10_dt_tag_with_css_003();
508 void test_ixhtml10_dt_tag_with_css_004();
509 void test_ixhtml10_dt_tag_with_css_005();
510 void test_ixhtml10_dt_tag_with_css_006();
511 void test_ixhtml10_dt_tag_with_css_007();
512 void test_ixhtml10_dt_tag_with_css_008();
513 void test_ixhtml10_dt_tag_with_css_009();
514 void test_ixhtml10_dt_tag_with_css_010();
515 void test_ixhtml10_dt_tag_with_css_011();
516 void test_ixhtml10_dt_tag_with_css_012();
517 void test_ixhtml10_dt_tag_with_css_013();
518 void test_ixhtml10_dt_tag_with_css_014();
519
520 void test_ixhtml10_legend_tag_001();
521 void test_ixhtml10_legend_tag_002();
522
523 void test_ixhtml10_label_tag_001();
524 void test_ixhtml10_label_tag_002();
525
526 void test_ixhtml10_blockquote_tag_001();
527 void test_ixhtml10_blockquote_tag_002();
528 void test_ixhtml10_blockquote_tag_003();
529 void test_ixhtml10_blockquote_tag_004();
530
531 void test_ixhtml10_blockquote_tag_with_css_001();
532 void test_ixhtml10_blockquote_tag_with_css_002();
533 void test_ixhtml10_blockquote_tag_with_css_003();
534 void test_ixhtml10_blockquote_tag_with_css_004();
535 void test_ixhtml10_blockquote_tag_with_css_005();
536 void test_ixhtml10_blockquote_tag_with_css_006();
537 void test_ixhtml10_blockquote_tag_with_css_007();
538 void test_ixhtml10_blockquote_tag_with_css_008();
539 void test_ixhtml10_blockquote_tag_with_css_009();
540 void test_ixhtml10_blockquote_tag_with_css_010();
541 void test_ixhtml10_blockquote_tag_with_css_011();
542 void test_ixhtml10_blockquote_tag_with_css_012();
543 void test_ixhtml10_blockquote_tag_with_css_013();
544 void test_ixhtml10_blockquote_tag_with_css_014();
545 void test_ixhtml10_blockquote_tag_with_css_015();
546 void test_ixhtml10_blockquote_tag_with_css_016();
547
548 void test_ixhtml10_dir_tag_001();
549 void test_ixhtml10_dir_tag_002();
550 void test_ixhtml10_dir_tag_003();
551 void test_ixhtml10_dir_tag_004();
552 void test_ixhtml10_dir_tag_005();
553 void test_ixhtml10_dir_tag_006();
554 void test_ixhtml10_dir_tag_007();
555
556 void test_ixhtml10_dir_tag_with_css_001();
557 void test_ixhtml10_dir_tag_with_css_002();
558 void test_ixhtml10_dir_tag_with_css_003();
559 void test_ixhtml10_dir_tag_with_css_004();
560 void test_ixhtml10_dir_tag_with_css_005();
561 void test_ixhtml10_dir_tag_with_css_006();
562 void test_ixhtml10_dir_tag_with_css_007();
563 void test_ixhtml10_dir_tag_with_css_008();
564 void test_ixhtml10_dir_tag_with_css_009();
565 void test_ixhtml10_dir_tag_with_css_010();
566 void test_ixhtml10_dir_tag_with_css_011();
567 void test_ixhtml10_dir_tag_with_css_012();
568 void test_ixhtml10_dir_tag_with_css_013();
569 void test_ixhtml10_dir_tag_with_css_014();
570 void test_ixhtml10_dir_tag_with_css_015();
571 void test_ixhtml10_dir_tag_with_css_016();
572 void test_ixhtml10_dir_tag_with_css_017();
573 void test_ixhtml10_dir_tag_with_css_018();
574 void test_ixhtml10_dir_tag_with_css_019();
575 void test_ixhtml10_dir_tag_with_css_020();
576 void test_ixhtml10_dir_tag_with_css_021();
577 void test_ixhtml10_dir_tag_with_css_022();
578
579 void test_ixhtml10_dl_tag_001();
580
581 void test_ixhtml10_dl_tag_with_css_001();
582 void test_ixhtml10_dl_tag_with_css_002();
583 void test_ixhtml10_dl_tag_with_css_009();
584 void test_ixhtml10_dl_tag_with_css_010();
585 void test_ixhtml10_dl_tag_with_css_011();
586 void test_ixhtml10_dl_tag_with_css_012();
587 void test_ixhtml10_dl_tag_with_css_013();
588 void test_ixhtml10_dl_tag_with_css_014();
589 void test_ixhtml10_dl_tag_with_css_015();
590 void test_ixhtml10_dl_tag_with_css_016();
591 void test_ixhtml10_dl_tag_with_css_017();
592 void test_ixhtml10_dl_tag_with_css_018();
593 void test_ixhtml10_dl_tag_with_css_019();
594 void test_ixhtml10_dl_tag_with_css_020();
595 void test_ixhtml10_dl_tag_with_css_021();
596 void test_ixhtml10_dl_tag_with_css_022();
597
598 void test_ixhtml10_dd_tag_001();
599 void test_ixhtml10_dd_tag_002();
600
601 void test_ixhtml10_dd_tag_with_css_001();
602 void test_ixhtml10_dd_tag_with_css_002();
603 void test_ixhtml10_dd_tag_with_css_009();
604 void test_ixhtml10_dd_tag_with_css_010();
605 void test_ixhtml10_dd_tag_with_css_011();
606 void test_ixhtml10_dd_tag_with_css_012();
607 void test_ixhtml10_dd_tag_with_css_013();
608 void test_ixhtml10_dd_tag_with_css_014();
609 void test_ixhtml10_dd_tag_with_css_015();
610 void test_ixhtml10_dd_tag_with_css_016();
611 void test_ixhtml10_dd_tag_with_css_017();
612 void test_ixhtml10_dd_tag_with_css_018();
613 void test_ixhtml10_dd_tag_with_css_019();
614 void test_ixhtml10_dd_tag_with_css_020();
615 void test_ixhtml10_dd_tag_with_css_021();
616 void test_ixhtml10_dd_tag_with_css_022();
617
618 void test_ixhtml10_menu_tag_001();
619 void test_ixhtml10_menu_tag_002();
620 void test_ixhtml10_menu_tag_003();
621 void test_ixhtml10_menu_tag_004();
622 void test_ixhtml10_menu_tag_005();
623 void test_ixhtml10_menu_tag_006();
624 void test_ixhtml10_menu_tag_007();
625 void test_ixhtml10_menu_tag_008();
626 void test_ixhtml10_menu_tag_009();
627 void test_ixhtml10_menu_tag_010();
628
629 void test_ixhtml10_menu_tag_with_css_001();
630 void test_ixhtml10_menu_tag_with_css_002();
631 void test_ixhtml10_menu_tag_with_css_009();
632 void test_ixhtml10_menu_tag_with_css_010();
633 void test_ixhtml10_menu_tag_with_css_011();
634 void test_ixhtml10_menu_tag_with_css_012();
635 void test_ixhtml10_menu_tag_with_css_013();
636 void test_ixhtml10_menu_tag_with_css_014();
637 void test_ixhtml10_menu_tag_with_css_015();
638 void test_ixhtml10_menu_tag_with_css_016();
639 void test_ixhtml10_menu_tag_with_css_017();
640 void test_ixhtml10_menu_tag_with_css_018();
641 void test_ixhtml10_menu_tag_with_css_019();
642 void test_ixhtml10_menu_tag_with_css_020();
643 void test_ixhtml10_menu_tag_with_css_021();
644 void test_ixhtml10_menu_tag_with_css_022();
645
646 void test_ixhtml10_plaintext_tag_001();
647 void test_ixhtml10_plaintext_tag_002();
648 void test_ixhtml10_plaintext_tag_003();
649 void test_ixhtml10_plaintext_tag_004();
650
651 void test_ixhtml10_blink_tag_001();
652 void test_ixhtml10_blink_tag_002();
653 void test_ixhtml10_blink_tag_003();
654 void test_ixhtml10_blink_tag_004();
655
656 void test_ixhtml10_blink_tag_with_css_001();
657 void test_ixhtml10_blink_tag_with_css_002();
658 void test_ixhtml10_blink_tag_with_css_009();
659 void test_ixhtml10_blink_tag_with_css_010();
660 void test_ixhtml10_blink_tag_with_css_011();
661 void test_ixhtml10_blink_tag_with_css_012();
662 void test_ixhtml10_blink_tag_with_css_013();
663 void test_ixhtml10_blink_tag_with_css_014();
664 void test_ixhtml10_blink_tag_with_css_015();
665 void test_ixhtml10_blink_tag_with_css_016();
666 void test_ixhtml10_blink_tag_with_css_017();
667 void test_ixhtml10_blink_tag_with_css_018();
668 void test_ixhtml10_blink_tag_with_css_019();
669 void test_ixhtml10_blink_tag_with_css_020();
670 void test_ixhtml10_blink_tag_with_css_021();
671 void test_ixhtml10_blink_tag_with_css_022();
672
673 void test_ixhtml10_marquee_tag_001();
674 void test_ixhtml10_marquee_tag_002();
675 void test_ixhtml10_marquee_tag_003();
676 void test_ixhtml10_marquee_tag_004();
677 void test_ixhtml10_marquee_tag_005();
678 void test_ixhtml10_marquee_tag_006();
679 void test_ixhtml10_marquee_tag_007();
680 void test_ixhtml10_marquee_tag_008();
681 void test_ixhtml10_marquee_tag_009();
682 void test_ixhtml10_marquee_tag_010();
683 void test_ixhtml10_marquee_tag_011();
684 void test_ixhtml10_marquee_tag_012();
685 void test_ixhtml10_marquee_tag_013();
686 void test_ixhtml10_marquee_tag_014();
687 void test_ixhtml10_marquee_tag_015();
688 void test_ixhtml10_marquee_tag_016();
689 void test_ixhtml10_marquee_tag_017();
690 void test_ixhtml10_marquee_tag_018();
691 void test_ixhtml10_marquee_tag_019();
692 void test_ixhtml10_marquee_tag_020();
693 void test_ixhtml10_marquee_tag_021();
694
695 void test_ixhtml10_marquee_tag_with_css_001();
696 void test_ixhtml10_marquee_tag_with_css_002();
697 void test_ixhtml10_marquee_tag_with_css_009();
698 void test_ixhtml10_marquee_tag_with_css_010();
699 void test_ixhtml10_marquee_tag_with_css_011();
700 void test_ixhtml10_marquee_tag_with_css_012();
701 void test_ixhtml10_marquee_tag_with_css_013();
702 void test_ixhtml10_marquee_tag_with_css_014();
703 void test_ixhtml10_marquee_tag_with_css_015();
704 void test_ixhtml10_marquee_tag_with_css_016();
705 void test_ixhtml10_marquee_tag_with_css_017();
706 void test_ixhtml10_marquee_tag_with_css_018();
707 void test_ixhtml10_marquee_tag_with_css_019();
708 void test_ixhtml10_marquee_tag_with_css_020();
709 void test_ixhtml10_marquee_tag_with_css_021();
710 void test_ixhtml10_marquee_tag_with_css_022();
711
712 void test_ixhtml10_link_001();
713 void test_ixhtml10_link_002();
714 void test_ixhtml10_link_003();
715 void test_ixhtml10_link_004();
716 void test_ixhtml10_link_005();
717 void test_ixhtml10_link_006();
718 void test_ixhtml10_link_007();
719 void test_ixhtml10_link_008();
720 void test_ixhtml10_link_009();
721
722 void test_ixhtml10_nlmark_001();
723 void test_ixhtml10_nlmark_002();
724 void test_ixhtml10_nlmark_003();
725 void test_ixhtml10_nlmark_004();
726
727 void test_ixhtml10_html_tag_001();
728
729 void test_ixhtml10_form_tag_001();
730 void test_ixhtml10_form_tag_002();
731 void test_ixhtml10_form_tag_003();
732 void test_ixhtml10_form_tag_004();
733 void test_ixhtml10_form_tag_005();
734 void test_ixhtml10_form_tag_006();
735 void test_ixhtml10_form_tag_007();
736 void test_ixhtml10_form_tag_008();
737 void test_ixhtml10_form_tag_009();
738
739
740 void test_ixhtml10_param_tag_001();
741
742 /* CSS */
743
744 void test_ixhtml10_html_tag_with_css_001();
745 void test_ixhtml10_meta_tag_with_css_001();
746
747 void test_ixhtml10_textarea_tag_with_css_001();
748 void test_ixhtml10_textarea_tag_with_css_002();
749 void test_ixhtml10_textarea_tag_with_css_003();
750 void test_ixhtml10_textarea_tag_with_css_004();
751
752 void test_ixhtml10_textarea_tag_with_css_005();
753 void test_ixhtml10_textarea_tag_with_css_006();
754 void test_ixhtml10_textarea_tag_with_css_007();
755 void test_ixhtml10_textarea_tag_with_css_008();
756
757 void test_ixhtml10_p_tag_with_css_001();
758 void test_ixhtml10_p_tag_with_css_002();
759 void test_ixhtml10_p_tag_with_css_003();
760 void test_ixhtml10_p_tag_with_css_004();
761 void test_ixhtml10_p_tag_with_css_005();
762 void test_ixhtml10_p_tag_with_css_006();
763 void test_ixhtml10_p_tag_with_css_007();
764 void test_ixhtml10_p_tag_with_css_008();
765 void test_ixhtml10_p_tag_with_css_009();
766 void test_ixhtml10_p_tag_with_css_010();
767 void test_ixhtml10_p_tag_with_css_011();
768 void test_ixhtml10_p_tag_with_css_012();
769 void test_ixhtml10_p_tag_with_css_013();
770
771 void test_ixhtml10_ul_tag_with_css_001();
772 void test_ixhtml10_ul_tag_with_css_002();
773 void test_ixhtml10_ul_tag_with_css_003();
774 void test_ixhtml10_ul_tag_with_css_004();
775 void test_ixhtml10_ul_tag_with_css_005();
776 void test_ixhtml10_ul_tag_with_css_006();
777 void test_ixhtml10_ul_tag_with_css_007();
778 void test_ixhtml10_ul_tag_with_css_008();
779 void test_ixhtml10_ul_tag_with_css_009();
780
781 void test_ixhtml10_li_tag_with_css_001();
782 void test_ixhtml10_li_tag_with_css_002();
783 void test_ixhtml10_li_tag_with_css_003();
784 void test_ixhtml10_li_tag_with_css_004();
785 void test_ixhtml10_li_tag_with_css_005();
786 void test_ixhtml10_li_tag_with_css_006();
787 void test_ixhtml10_li_tag_with_css_007();
788 void test_ixhtml10_li_tag_with_css_008();
789 void test_ixhtml10_li_tag_with_css_009();
790 void test_ixhtml10_li_tag_with_css_010();
791 void test_ixhtml10_li_tag_with_css_011();
792 void test_ixhtml10_li_tag_with_css_012();
793
794 void test_ixhtml10_ol_tag_with_css_001();
795 void test_ixhtml10_ol_tag_with_css_002();
796 void test_ixhtml10_ol_tag_with_css_003();
797 void test_ixhtml10_ol_tag_with_css_004();
798 void test_ixhtml10_ol_tag_with_css_005();
799 void test_ixhtml10_ol_tag_with_css_006();
800
801 void test_ixhtml10_h1_tag_with_css_001();
802 void test_ixhtml10_h1_tag_with_css_002();
803 void test_ixhtml10_h1_tag_with_css_003();
804 void test_ixhtml10_h1_tag_with_css_004();
805 void test_ixhtml10_h1_tag_with_css_005();
806 void test_ixhtml10_h1_tag_with_css_006();
807
808 void test_ixhtml10_h2_tag_with_css_001();
809 void test_ixhtml10_h2_tag_with_css_002();
810 void test_ixhtml10_h2_tag_with_css_003();
811 void test_ixhtml10_h2_tag_with_css_004();
812 void test_ixhtml10_h2_tag_with_css_005();
813 void test_ixhtml10_h2_tag_with_css_006();
814
815 void test_ixhtml10_h3_tag_with_css_001();
816 void test_ixhtml10_h3_tag_with_css_002();
817 void test_ixhtml10_h3_tag_with_css_003();
818 void test_ixhtml10_h3_tag_with_css_004();
819 void test_ixhtml10_h3_tag_with_css_005();
820 void test_ixhtml10_h3_tag_with_css_006();
821
822 void test_ixhtml10_h4_tag_with_css_001();
823 void test_ixhtml10_h4_tag_with_css_002();
824 void test_ixhtml10_h4_tag_with_css_003();
825 void test_ixhtml10_h4_tag_with_css_004();
826 void test_ixhtml10_h4_tag_with_css_005();
827 void test_ixhtml10_h4_tag_with_css_006();
828
829 void test_ixhtml10_h5_tag_with_css_001();
830 void test_ixhtml10_h5_tag_with_css_002();
831 void test_ixhtml10_h5_tag_with_css_003();
832 void test_ixhtml10_h5_tag_with_css_004();
833 void test_ixhtml10_h5_tag_with_css_005();
834 void test_ixhtml10_h5_tag_with_css_006();
835
836 void test_ixhtml10_h6_tag_with_css_001();
837 void test_ixhtml10_h6_tag_with_css_002();
838 void test_ixhtml10_h6_tag_with_css_003();
839 void test_ixhtml10_h6_tag_with_css_004();
840 void test_ixhtml10_h6_tag_with_css_005();
841 void test_ixhtml10_h6_tag_with_css_006();
842
843 void test_ixhtml10_body_tag_with_css_001();
844 void test_ixhtml10_body_tag_with_css_002();
845 void test_ixhtml10_body_tag_with_css_003();
846 void test_ixhtml10_body_tag_with_css_004();
847
848 void test_ixhtml10_font_tag_with_css_001();
849 void test_ixhtml10_font_tag_with_css_002();
850 void test_ixhtml10_font_tag_with_css_003();
851 void test_ixhtml10_font_tag_with_css_004();
852 void test_ixhtml10_font_tag_with_css_005();
853 void test_ixhtml10_font_tag_with_css_006();
854 void test_ixhtml10_font_tag_with_css_007();
855 void test_ixhtml10_font_tag_with_css_008();
856 void test_ixhtml10_font_tag_with_css_009();
857 void test_ixhtml10_font_tag_with_css_010();
858 void test_ixhtml10_font_tag_with_css_011();
859 void test_ixhtml10_font_tag_with_css_012();
860 void test_ixhtml10_font_tag_with_css_013();
861 void test_ixhtml10_font_tag_with_css_014();
862 void test_ixhtml10_font_tag_with_css_015();
863 void test_ixhtml10_font_tag_with_css_016();
864
865 void test_ixhtml10_form_tag_with_css_001();
866 void test_ixhtml10_form_tag_with_css_002();
867 void test_ixhtml10_form_tag_with_css_003();
868 void test_ixhtml10_form_tag_with_css_004();
869 void test_ixhtml10_form_tag_with_css_005();
870 void test_ixhtml10_form_tag_with_css_006();
871 void test_ixhtml10_form_tag_with_css_007();
872 void test_ixhtml10_form_tag_with_css_008();
873
874 void test_ixhtml10_input_tag_with_css_001();
875 void test_ixhtml10_input_tag_with_css_002();
876 void test_ixhtml10_input_tag_with_css_003();
877 void test_ixhtml10_input_tag_with_css_004();
878 void test_ixhtml10_input_tag_with_css_005();
879 void test_ixhtml10_input_tag_with_css_006();
880 void test_ixhtml10_input_tag_with_css_007();
881 void test_ixhtml10_input_tag_with_css_008();
882
883 void test_ixhtml10_center_tag_with_css_001();
884 void test_ixhtml10_center_tag_with_css_002();
885 void test_ixhtml10_center_tag_with_css_003();
886 void test_ixhtml10_center_tag_with_css_004();
887 void test_ixhtml10_center_tag_with_css_005();
888 void test_ixhtml10_center_tag_with_css_006();
889 void test_ixhtml10_center_tag_with_css_007();
890 void test_ixhtml10_center_tag_with_css_008();
891 void test_ixhtml10_center_tag_with_css_009();
892 void test_ixhtml10_center_tag_with_css_010();
893 void test_ixhtml10_center_tag_with_css_011();
894 void test_ixhtml10_center_tag_with_css_012();
895 void test_ixhtml10_center_tag_with_css_013();
896 void test_ixhtml10_center_tag_with_css_014();
897 void test_ixhtml10_center_tag_with_css_015();
898 void test_ixhtml10_center_tag_with_css_016();
899
900 void test_ixhtml10_hr_tag_with_css_001();
901 void test_ixhtml10_hr_tag_with_css_002();
902 void test_ixhtml10_hr_tag_with_css_003();
903 void test_ixhtml10_hr_tag_with_css_004();
904 void test_ixhtml10_hr_tag_with_css_005();
905 void test_ixhtml10_hr_tag_with_css_006();
906 void test_ixhtml10_hr_tag_with_css_007();
907 void test_ixhtml10_hr_tag_with_css_008();
908
909 void test_ixhtml10_img_tag_with_css_001();
910 void test_ixhtml10_img_tag_with_css_002();
911 void test_ixhtml10_img_tag_with_css_003();
912 void test_ixhtml10_img_tag_with_css_004();
913 void test_ixhtml10_img_tag_with_css_005();
914 void test_ixhtml10_img_tag_with_css_006();
915 void test_ixhtml10_img_tag_with_css_007();
916 void test_ixhtml10_img_tag_with_css_008();
917 void test_ixhtml10_img_tag_with_css_009();
918 void test_ixhtml10_img_tag_with_css_010();
919
920 void test_ixhtml10_div_tag_with_css_001();
921 void test_ixhtml10_div_tag_with_css_002();
922 void test_ixhtml10_div_tag_with_css_003();
923 void test_ixhtml10_div_tag_with_css_004();
924 void test_ixhtml10_div_tag_with_css_005();
925 void test_ixhtml10_div_tag_with_css_006();
926 void test_ixhtml10_div_tag_with_css_007();
927 void test_ixhtml10_div_tag_with_css_008();
928 void test_ixhtml10_div_tag_with_css_009();
929 void test_ixhtml10_div_tag_with_css_010();
930 void test_ixhtml10_div_tag_with_css_011();
931 void test_ixhtml10_div_tag_with_css_012();
932 void test_ixhtml10_div_tag_with_css_013();
933 void test_ixhtml10_div_tag_with_css_014();
934 void test_ixhtml10_div_tag_with_css_015();
935 void test_ixhtml10_div_tag_with_css_016();
936 void test_ixhtml10_div_tag_with_css_017();
937 void test_ixhtml10_div_tag_with_css_018();
938 void test_ixhtml10_div_tag_with_css_019();
939 void test_ixhtml10_div_tag_with_css_020();
940 void test_ixhtml10_div_tag_with_css_021();
941 void test_ixhtml10_div_tag_with_css_022();
942 void test_ixhtml10_div_tag_with_css_023();
943 void test_ixhtml10_div_tag_with_css_024();
944 void test_ixhtml10_div_tag_with_css_025();
945 void test_ixhtml10_div_tag_with_css_026();
946 void test_ixhtml10_div_tag_with_css_027();
947 void test_ixhtml10_div_tag_with_css_028();
948 void test_ixhtml10_div_tag_with_css_029();
949 void test_ixhtml10_div_tag_with_css_030();
950 void test_ixhtml10_div_tag_with_css_031();
951 void test_ixhtml10_div_tag_with_css_032();
952 void test_ixhtml10_div_tag_with_css_033();
953 void test_ixhtml10_div_tag_with_css_034();
954 void test_ixhtml10_div_tag_with_css_035();
955 void test_ixhtml10_div_tag_with_css_036();
956 void test_ixhtml10_div_tag_with_css_037();
957 void test_ixhtml10_div_tag_with_css_038();
958 void test_ixhtml10_div_tag_with_css_039();
959 void test_ixhtml10_div_tag_with_css_040();
960 void test_ixhtml10_div_tag_with_css_041();
961 void test_ixhtml10_div_tag_with_css_042();
962
963 /* pend */
964
965 int
966 main()
967 {
968   CU_pSuite ixhtml10_suite;
969   CU_initialize_registry();
970   ixhtml10_suite = CU_add_suite("test chxj_convert_ixhtml10()", NULL, NULL);
971
972   /*=========================================================================*/
973   /* <!-- -->                                                                */
974   /*=========================================================================*/
975   CU_add_test(ixhtml10_suite, "test void src1",                                    test_ixhtml10_001);
976   CU_add_test(ixhtml10_suite, "test void src2",                                    test_ixhtml10_002);
977   CU_add_test(ixhtml10_suite, "test comment tag1",                                 test_ixhtml10_comment_tag_001);
978   /*=========================================================================*/
979   /* <META>                                                                  */
980   /*=========================================================================*/
981   CU_add_test(ixhtml10_suite, "test <meta> 1." ,                                   test_ixhtml10_meta_tag_001);
982   CU_add_test(ixhtml10_suite, "test <meta> 2." ,                                   test_ixhtml10_meta_tag_002);
983   CU_add_test(ixhtml10_suite, "test <meta> 3." ,                                   test_ixhtml10_meta_tag_003);
984   CU_add_test(ixhtml10_suite, "test <meta> 4." ,                                   test_ixhtml10_meta_tag_004);
985   CU_add_test(ixhtml10_suite, "test <meta> 5." ,                                   test_ixhtml10_meta_tag_005);
986   CU_add_test(ixhtml10_suite, "test <meta> 6." ,                                   test_ixhtml10_meta_tag_006);
987   CU_add_test(ixhtml10_suite, "test <meta> 7." ,                                   test_ixhtml10_meta_tag_007);
988   CU_add_test(ixhtml10_suite, "test <meta> 8." ,                                   test_ixhtml10_meta_tag_008);
989   CU_add_test(ixhtml10_suite, "test <meta> 9." ,                                   test_ixhtml10_meta_tag_009);
990
991   /*=========================================================================*/
992   /* <TEXTAREA>                                                              */
993   /*=========================================================================*/
994   CU_add_test(ixhtml10_suite, "test <textarea> 1." ,                               test_ixhtml10_textarea_tag_001);
995   CU_add_test(ixhtml10_suite, "test <textarea> 2." ,                               test_ixhtml10_textarea_tag_002);
996   CU_add_test(ixhtml10_suite, "test <textarea> 3." ,                               test_ixhtml10_textarea_tag_003);
997   CU_add_test(ixhtml10_suite, "test <textarea> 4." ,                               test_ixhtml10_textarea_tag_004);
998   CU_add_test(ixhtml10_suite, "test <textarea> 5." ,                               test_ixhtml10_textarea_tag_005);
999   CU_add_test(ixhtml10_suite, "test <textarea> 6." ,                               test_ixhtml10_textarea_tag_006);
1000   CU_add_test(ixhtml10_suite, "test <textarea> 7." ,                               test_ixhtml10_textarea_tag_007);
1001   CU_add_test(ixhtml10_suite, "test <textarea> 8." ,                               test_ixhtml10_textarea_tag_008);
1002   CU_add_test(ixhtml10_suite, "test <textarea> 9." ,                               test_ixhtml10_textarea_tag_009);
1003   CU_add_test(ixhtml10_suite, "test <textarea> 10." ,                              test_ixhtml10_textarea_tag_010);
1004   CU_add_test(ixhtml10_suite, "test <textarea> 11." ,                              test_ixhtml10_textarea_tag_011);
1005   CU_add_test(ixhtml10_suite, "test <textarea> 12." ,                              test_ixhtml10_textarea_tag_012);
1006   CU_add_test(ixhtml10_suite, "test <textarea> 13." ,                              test_ixhtml10_textarea_tag_013);
1007   CU_add_test(ixhtml10_suite, "test <textarea> 14." ,                              test_ixhtml10_textarea_tag_014);
1008   CU_add_test(ixhtml10_suite, "test <textarea> 15." ,                              test_ixhtml10_textarea_tag_015);
1009   CU_add_test(ixhtml10_suite, "test <textarea> 16." ,                              test_ixhtml10_textarea_tag_016);
1010   CU_add_test(ixhtml10_suite, "test <textarea> 17." ,                              test_ixhtml10_textarea_tag_017);
1011   CU_add_test(ixhtml10_suite, "test <textarea> 18." ,                              test_ixhtml10_textarea_tag_018);
1012   CU_add_test(ixhtml10_suite, "test <textarea> 19." ,                              test_ixhtml10_textarea_tag_019);
1013   CU_add_test(ixhtml10_suite, "test <textarea> 20." ,                              test_ixhtml10_textarea_tag_020);
1014   CU_add_test(ixhtml10_suite, "test <textarea> 21." ,                              test_ixhtml10_textarea_tag_021);
1015   CU_add_test(ixhtml10_suite, "test <textarea> 22." ,                              test_ixhtml10_textarea_tag_022);
1016   CU_add_test(ixhtml10_suite, "test <textarea> 23." ,                              test_ixhtml10_textarea_tag_023);
1017   CU_add_test(ixhtml10_suite, "test <textarea> 24." ,                              test_ixhtml10_textarea_tag_024);
1018   CU_add_test(ixhtml10_suite, "test <textarea> 25." ,                              test_ixhtml10_textarea_tag_025);
1019   CU_add_test(ixhtml10_suite, "test <textarea> 26." ,                              test_ixhtml10_textarea_tag_026);
1020
1021   /*=========================================================================*/
1022   /* <P>                                                                     */
1023   /*=========================================================================*/
1024   CU_add_test(ixhtml10_suite, "test <p> 1." ,                                      test_ixhtml10_p_tag_001);
1025   CU_add_test(ixhtml10_suite, "test <p> 2." ,                                      test_ixhtml10_p_tag_002);
1026   CU_add_test(ixhtml10_suite, "test <p> 3." ,                                      test_ixhtml10_p_tag_003);
1027   CU_add_test(ixhtml10_suite, "test <p> 4." ,                                      test_ixhtml10_p_tag_004);
1028   CU_add_test(ixhtml10_suite, "test <p> 5." ,                                      test_ixhtml10_p_tag_005);
1029   CU_add_test(ixhtml10_suite, "test <p> 6." ,                                      test_ixhtml10_p_tag_006);
1030   CU_add_test(ixhtml10_suite, "test <p> 7." ,                                      test_ixhtml10_p_tag_007);
1031   CU_add_test(ixhtml10_suite, "test <p> 8." ,                                      test_ixhtml10_p_tag_008);
1032
1033   /*=========================================================================*/
1034   /* <PRE>                                                                   */
1035   /*=========================================================================*/
1036   CU_add_test(ixhtml10_suite, "test <pre> 1." ,                                    test_ixhtml10_pre_tag_001);
1037   CU_add_test(ixhtml10_suite, "test <pre> 2." ,                                    test_ixhtml10_pre_tag_002);
1038   CU_add_test(ixhtml10_suite, "test <pre> 3." ,                                    test_ixhtml10_pre_tag_003);
1039   CU_add_test(ixhtml10_suite, "test <pre> 4." ,                                    test_ixhtml10_pre_tag_004);
1040   CU_add_test(ixhtml10_suite, "test <pre> 5." ,                                    test_ixhtml10_pre_tag_005);
1041
1042   /*=========================================================================*/
1043   /* <UL>                                                                    */
1044   /*=========================================================================*/
1045   CU_add_test(ixhtml10_suite, "test <ul> 1." ,                                     test_ixhtml10_ul_tag_001);
1046   CU_add_test(ixhtml10_suite, "test <ul> 2." ,                                     test_ixhtml10_ul_tag_002);
1047   CU_add_test(ixhtml10_suite, "test <ul> 3." ,                                     test_ixhtml10_ul_tag_003);
1048   CU_add_test(ixhtml10_suite, "test <ul> 4." ,                                     test_ixhtml10_ul_tag_004);
1049   CU_add_test(ixhtml10_suite, "test <ul> 5." ,                                     test_ixhtml10_ul_tag_005);
1050   CU_add_test(ixhtml10_suite, "test <ul> 6." ,                                     test_ixhtml10_ul_tag_006);
1051   CU_add_test(ixhtml10_suite, "test <ul> 7." ,                                     test_ixhtml10_ul_tag_007);
1052   CU_add_test(ixhtml10_suite, "test <ul> 8." ,                                     test_ixhtml10_ul_tag_008);
1053   CU_add_test(ixhtml10_suite, "test <ul> 9." ,                                     test_ixhtml10_ul_tag_009);
1054   CU_add_test(ixhtml10_suite, "test <ul> 10." ,                                    test_ixhtml10_ul_tag_010);
1055   CU_add_test(ixhtml10_suite, "test <ul> 11." ,                                    test_ixhtml10_ul_tag_011);
1056
1057   /*=========================================================================*/
1058   /* <LI>                                                                    */
1059   /*=========================================================================*/
1060   CU_add_test(ixhtml10_suite, "test <li>." ,                                       test_ixhtml10_li_tag_001);
1061   CU_add_test(ixhtml10_suite, "test <li> with alphabetic value." ,                 test_ixhtml10_li_tag_002);
1062   CU_add_test(ixhtml10_suite, "test <li> with japanese value." ,                   test_ixhtml10_li_tag_003);
1063   CU_add_test(ixhtml10_suite, "test <li> with japanese-hankaku value." ,           test_ixhtml10_li_tag_004);
1064   CU_add_test(ixhtml10_suite, "test <li> type attribute 1." ,                      test_ixhtml10_li_tag_005);
1065   CU_add_test(ixhtml10_suite, "test <li> type attribute 2." ,                      test_ixhtml10_li_tag_006);
1066   CU_add_test(ixhtml10_suite, "test <li> type attribute 3." ,                      test_ixhtml10_li_tag_007);
1067   CU_add_test(ixhtml10_suite, "test <li> type attribute 4." ,                      test_ixhtml10_li_tag_008);
1068   CU_add_test(ixhtml10_suite, "test <li> type attribute 5." ,                      test_ixhtml10_li_tag_009);
1069   CU_add_test(ixhtml10_suite, "test <li> type attribute 6." ,                      test_ixhtml10_li_tag_010);
1070   CU_add_test(ixhtml10_suite, "test <li> type attribute 7." ,                      test_ixhtml10_li_tag_011);
1071   CU_add_test(ixhtml10_suite, "test <li> type attribute 8." ,                      test_ixhtml10_li_tag_012);
1072   CU_add_test(ixhtml10_suite, "test <li> type attribute 9." ,                      test_ixhtml10_li_tag_013);
1073   CU_add_test(ixhtml10_suite, "test <li> type attribute 10." ,                     test_ixhtml10_li_tag_014);
1074   CU_add_test(ixhtml10_suite, "test <li> type attribute 11." ,                     test_ixhtml10_li_tag_015);
1075   CU_add_test(ixhtml10_suite, "test <li> type attribute 12." ,                     test_ixhtml10_li_tag_016);
1076   CU_add_test(ixhtml10_suite, "test <li> type attribute 13." ,                     test_ixhtml10_li_tag_017);
1077   CU_add_test(ixhtml10_suite, "test <li> type attribute 14." ,                     test_ixhtml10_li_tag_018);
1078
1079   /*=========================================================================*/
1080   /* <OL>                                                                    */
1081   /*=========================================================================*/
1082   CU_add_test(ixhtml10_suite, "test <ol>." ,                                       test_ixhtml10_ol_tag_001);
1083   CU_add_test(ixhtml10_suite, "test <ol> 2." ,                                     test_ixhtml10_ol_tag_002);
1084   CU_add_test(ixhtml10_suite, "test <ol> 3." ,                                     test_ixhtml10_ol_tag_003);
1085   CU_add_test(ixhtml10_suite, "test <ol> 4." ,                                     test_ixhtml10_ol_tag_004);
1086   CU_add_test(ixhtml10_suite, "test <ol> 5." ,                                     test_ixhtml10_ol_tag_005);
1087   CU_add_test(ixhtml10_suite, "test <ol> 6." ,                                     test_ixhtml10_ol_tag_006);
1088   CU_add_test(ixhtml10_suite, "test <ol> 7." ,                                     test_ixhtml10_ol_tag_007);
1089   CU_add_test(ixhtml10_suite, "test <ol> 8." ,                                     test_ixhtml10_ol_tag_008);
1090   CU_add_test(ixhtml10_suite, "test <ol> 9." ,                                     test_ixhtml10_ol_tag_009);
1091   CU_add_test(ixhtml10_suite, "test <ol> 10." ,                                    test_ixhtml10_ol_tag_010);
1092   CU_add_test(ixhtml10_suite, "test <ol> 11." ,                                    test_ixhtml10_ol_tag_011);
1093   CU_add_test(ixhtml10_suite, "test <ol> 12." ,                                    test_ixhtml10_ol_tag_012);
1094   CU_add_test(ixhtml10_suite, "test <ol> 13." ,                                    test_ixhtml10_ol_tag_013);
1095   CU_add_test(ixhtml10_suite, "test <ol> 14." ,                                    test_ixhtml10_ol_tag_014);
1096   CU_add_test(ixhtml10_suite, "test <ol> 15." ,                                    test_ixhtml10_ol_tag_015);
1097   CU_add_test(ixhtml10_suite, "test <ol> 16." ,                                    test_ixhtml10_ol_tag_016);
1098   CU_add_test(ixhtml10_suite, "test <ol> 17." ,                                    test_ixhtml10_ol_tag_017);
1099   CU_add_test(ixhtml10_suite, "test <ol> 18." ,                                    test_ixhtml10_ol_tag_018);
1100
1101   /*=========================================================================*/
1102   /* <H1>                                                                    */
1103   /*=========================================================================*/
1104   CU_add_test(ixhtml10_suite, "test <h1>.",                                        test_ixhtml10_h1_tag_001);
1105   CU_add_test(ixhtml10_suite, "test <h1> with value.",                             test_ixhtml10_h1_tag_002);
1106   CU_add_test(ixhtml10_suite, "test <h1> with value(japanese).",                   test_ixhtml10_h1_tag_003);
1107   CU_add_test(ixhtml10_suite, "test <h1> with value(japanese-hankaku).",           test_ixhtml10_h1_tag_004);
1108   CU_add_test(ixhtml10_suite, "test <h1> with align attribute(non).",              test_ixhtml10_h1_tag_005);
1109   CU_add_test(ixhtml10_suite, "test <h1> with align attribute(void).",             test_ixhtml10_h1_tag_006);
1110   CU_add_test(ixhtml10_suite, "test <h1> with align attribute(left).",             test_ixhtml10_h1_tag_007);
1111   CU_add_test(ixhtml10_suite, "test <h1> with align attribute(right).",            test_ixhtml10_h1_tag_008);
1112   CU_add_test(ixhtml10_suite, "test <h1> with align attribute(center).",           test_ixhtml10_h1_tag_009);
1113   CU_add_test(ixhtml10_suite, "test <h1> with align attribute(unkown).",           test_ixhtml10_h1_tag_010);
1114
1115   /*=========================================================================*/
1116   /* <H2>                                                                    */
1117   /*=========================================================================*/
1118   CU_add_test(ixhtml10_suite, "test <h2>.",                                        test_ixhtml10_h2_tag_001);
1119   CU_add_test(ixhtml10_suite, "test <h2> with value.",                             test_ixhtml10_h2_tag_002);
1120   CU_add_test(ixhtml10_suite, "test <h2> with value(japanese).",                   test_ixhtml10_h2_tag_003);
1121   CU_add_test(ixhtml10_suite, "test <h2> with value(japanese-hankaku).",           test_ixhtml10_h2_tag_004);
1122   CU_add_test(ixhtml10_suite, "test <h2> with align attribute(non).",              test_ixhtml10_h2_tag_005);
1123   CU_add_test(ixhtml10_suite, "test <h2> with align attribute(void).",             test_ixhtml10_h2_tag_006);
1124   CU_add_test(ixhtml10_suite, "test <h2> with align attribute(left).",             test_ixhtml10_h2_tag_007);
1125   CU_add_test(ixhtml10_suite, "test <h2> with align attribute(right).",            test_ixhtml10_h2_tag_008);
1126   CU_add_test(ixhtml10_suite, "test <h2> with align attribute(center).",           test_ixhtml10_h2_tag_009);
1127   CU_add_test(ixhtml10_suite, "test <h2> with align attribute(unkown).",           test_ixhtml10_h2_tag_010);
1128
1129   /*=========================================================================*/
1130   /* <H3>                                                                    */
1131   /*=========================================================================*/
1132   CU_add_test(ixhtml10_suite, "test <h3>.",                                        test_ixhtml10_h3_tag_001);
1133   CU_add_test(ixhtml10_suite, "test <h3> with value.",                             test_ixhtml10_h3_tag_002);
1134   CU_add_test(ixhtml10_suite, "test <h3> with value(japanese).",                   test_ixhtml10_h3_tag_003);
1135   CU_add_test(ixhtml10_suite, "test <h3> with value(japanese-hankaku).",           test_ixhtml10_h3_tag_004);
1136   CU_add_test(ixhtml10_suite, "test <h3> with align attribute(non).",              test_ixhtml10_h3_tag_005);
1137   CU_add_test(ixhtml10_suite, "test <h3> with align attribute(void).",             test_ixhtml10_h3_tag_006);
1138   CU_add_test(ixhtml10_suite, "test <h3> with align attribute(left).",             test_ixhtml10_h3_tag_007);
1139   CU_add_test(ixhtml10_suite, "test <h3> with align attribute(right).",            test_ixhtml10_h3_tag_008);
1140   CU_add_test(ixhtml10_suite, "test <h3> with align attribute(center).",           test_ixhtml10_h3_tag_009);
1141   CU_add_test(ixhtml10_suite, "test <h3> with align attribute(unkown).",           test_ixhtml10_h3_tag_010);
1142
1143   /*=========================================================================*/
1144   /* <H4>                                                                    */
1145   /*=========================================================================*/
1146   CU_add_test(ixhtml10_suite, "test <h4>.",                                        test_ixhtml10_h4_tag_001);
1147   CU_add_test(ixhtml10_suite, "test <h4> with value.",                             test_ixhtml10_h4_tag_002);
1148   CU_add_test(ixhtml10_suite, "test <h4> with value(japanese).",                   test_ixhtml10_h4_tag_003);
1149   CU_add_test(ixhtml10_suite, "test <h4> with value(japanese-hankaku).",           test_ixhtml10_h4_tag_004);
1150   CU_add_test(ixhtml10_suite, "test <h4> with align attribute(non).",              test_ixhtml10_h4_tag_005);
1151   CU_add_test(ixhtml10_suite, "test <h4> with align attribute(void).",             test_ixhtml10_h4_tag_006);
1152   CU_add_test(ixhtml10_suite, "test <h4> with align attribute(left).",             test_ixhtml10_h4_tag_007);
1153   CU_add_test(ixhtml10_suite, "test <h4> with align attribute(right).",            test_ixhtml10_h4_tag_008);
1154   CU_add_test(ixhtml10_suite, "test <h4> with align attribute(center).",           test_ixhtml10_h4_tag_009);
1155   CU_add_test(ixhtml10_suite, "test <h4> with align attribute(unkown).",           test_ixhtml10_h4_tag_010);
1156
1157   /*=========================================================================*/
1158   /* <H5>                                                                    */
1159   /*=========================================================================*/
1160   CU_add_test(ixhtml10_suite, "test <h5>.",                                        test_ixhtml10_h5_tag_001);
1161   CU_add_test(ixhtml10_suite, "test <h5> with value.",                             test_ixhtml10_h5_tag_002);
1162   CU_add_test(ixhtml10_suite, "test <h5> with value(japanese).",                   test_ixhtml10_h5_tag_003);
1163   CU_add_test(ixhtml10_suite, "test <h5> with value(japanese-hankaku).",           test_ixhtml10_h5_tag_004);
1164   CU_add_test(ixhtml10_suite, "test <h5> with align attribute(non).",              test_ixhtml10_h5_tag_005);
1165   CU_add_test(ixhtml10_suite, "test <h5> with align attribute(void).",             test_ixhtml10_h5_tag_006);
1166   CU_add_test(ixhtml10_suite, "test <h5> with align attribute(left).",             test_ixhtml10_h5_tag_007);
1167   CU_add_test(ixhtml10_suite, "test <h5> with align attribute(right).",            test_ixhtml10_h5_tag_008);
1168   CU_add_test(ixhtml10_suite, "test <h5> with align attribute(center).",           test_ixhtml10_h5_tag_009);
1169   CU_add_test(ixhtml10_suite, "test <h5> with align attribute(unkown).",           test_ixhtml10_h5_tag_010);
1170
1171   /*=========================================================================*/
1172   /* <H6>                                                                    */
1173   /*=========================================================================*/
1174   CU_add_test(ixhtml10_suite, "test <h6>.",                                        test_ixhtml10_h6_tag_001);
1175   CU_add_test(ixhtml10_suite, "test <h6> with value.",                             test_ixhtml10_h6_tag_002);
1176   CU_add_test(ixhtml10_suite, "test <h6> with value(japanese).",                   test_ixhtml10_h6_tag_003);
1177   CU_add_test(ixhtml10_suite, "test <h6> with value(japanese-hankaku).",           test_ixhtml10_h6_tag_004);
1178   CU_add_test(ixhtml10_suite, "test <h6> with align attribute(non).",              test_ixhtml10_h6_tag_005);
1179   CU_add_test(ixhtml10_suite, "test <h6> with align attribute(void).",             test_ixhtml10_h6_tag_006);
1180   CU_add_test(ixhtml10_suite, "test <h6> with align attribute(left).",             test_ixhtml10_h6_tag_007);
1181   CU_add_test(ixhtml10_suite, "test <h6> with align attribute(right).",            test_ixhtml10_h6_tag_008);
1182   CU_add_test(ixhtml10_suite, "test <h6> with align attribute(center).",           test_ixhtml10_h6_tag_009);
1183   CU_add_test(ixhtml10_suite, "test <h6> with align attribute(unkown).",           test_ixhtml10_h6_tag_010);
1184
1185   /*=========================================================================*/
1186   /* <HEAD>                                                                  */
1187   /*=========================================================================*/
1188   CU_add_test(ixhtml10_suite, "test <head>.",                                      test_ixhtml10_head_tag_001);
1189   CU_add_test(ixhtml10_suite, "test <head> with value.",                           test_ixhtml10_head_tag_002);
1190
1191   /*=========================================================================*/
1192   /* <TITLE>                                                                 */
1193   /*=========================================================================*/
1194   CU_add_test(ixhtml10_suite, "test <title> 1." ,                                  test_ixhtml10_title_tag_001);
1195   CU_add_test(ixhtml10_suite, "test <title> 2." ,                                  test_ixhtml10_title_tag_002);
1196
1197   /*=========================================================================*/
1198   /* <BASE>                                                                  */
1199   /*=========================================================================*/
1200   CU_add_test(ixhtml10_suite, "test base tag no attribute.",                       test_ixhtml10_base_tag_001);
1201   CU_add_test(ixhtml10_suite, "test base tag href attribute with no value.",       test_ixhtml10_base_tag_href_attribute_001);
1202   CU_add_test(ixhtml10_suite, "test base tag href attribute with void value.",     test_ixhtml10_base_tag_href_attribute_002);
1203   CU_add_test(ixhtml10_suite, "test base tag href attribute with normal value 1.", test_ixhtml10_base_tag_href_attribute_003);
1204   CU_add_test(ixhtml10_suite, "test base tag href attribute with normal value 2.", test_ixhtml10_base_tag_href_attribute_004);
1205
1206   /*=========================================================================*/
1207   /* <BODY>                                                                  */
1208   /*=========================================================================*/
1209   CU_add_test(ixhtml10_suite, "test <body> .",                                     test_ixhtml10_body_tag_001);
1210   CU_add_test(ixhtml10_suite, "test <body> with bgcolor attribute 1.",             test_ixhtml10_body_tag_002);
1211   CU_add_test(ixhtml10_suite, "test <body> with bgcolor attribute 2.",             test_ixhtml10_body_tag_003);
1212   CU_add_test(ixhtml10_suite, "test <body> with bgcolor attribute 3.",             test_ixhtml10_body_tag_004);
1213   CU_add_test(ixhtml10_suite, "test <body> with text attribute 1.",                test_ixhtml10_body_tag_005);
1214   CU_add_test(ixhtml10_suite, "test <body> with text attribute 2.",                test_ixhtml10_body_tag_006);
1215   CU_add_test(ixhtml10_suite, "test <body> with text attribute 3.",                test_ixhtml10_body_tag_007);
1216   CU_add_test(ixhtml10_suite, "test <body> with link attribute 1.",                test_ixhtml10_body_tag_008);
1217   CU_add_test(ixhtml10_suite, "test <body> with link attribute 2.",                test_ixhtml10_body_tag_009);
1218   CU_add_test(ixhtml10_suite, "test <body> with link attribute 3.",                test_ixhtml10_body_tag_010);
1219   CU_add_test(ixhtml10_suite, "test <body> with vlink attribute 1.",               test_ixhtml10_body_tag_011);
1220   CU_add_test(ixhtml10_suite, "test <body> with vlink attribute 2.",               test_ixhtml10_body_tag_012);
1221   CU_add_test(ixhtml10_suite, "test <body> with vlink attribute 3.",               test_ixhtml10_body_tag_013);
1222   CU_add_test(ixhtml10_suite, "test <body> with alink attribute.",                 test_ixhtml10_body_tag_014);
1223   CU_add_test(ixhtml10_suite, "test <body> with unknown attribute.",               test_ixhtml10_body_tag_015);
1224
1225   /*=========================================================================*/
1226   /* <STYLE>                                                                 */
1227   /*=========================================================================*/
1228   CU_add_test(ixhtml10_suite, "test style #001",                              test_ixhtml10_style_tag_001);
1229   CU_add_test(ixhtml10_suite, "test style #002",                              test_ixhtml10_style_tag_002);
1230   CU_add_test(ixhtml10_suite, "test style #003",                              test_ixhtml10_style_tag_003);
1231
1232   /*=========================================================================*/
1233   /* <A>                                                                     */
1234   /*=========================================================================*/
1235   CU_add_test(ixhtml10_suite, "test a tag name attr1",                             test_ixhtml10_a_tag_name_attribute_001);
1236   CU_add_test(ixhtml10_suite, "test a tag name attr2",                             test_ixhtml10_a_tag_name_attribute_002);
1237   CU_add_test(ixhtml10_suite, "test a tag name attr3 with japanese.",              test_ixhtml10_a_tag_name_attribute_003);
1238   CU_add_test(ixhtml10_suite, "test a tag name attr4 with japanese.",              test_ixhtml10_a_tag_name_attribute_004);
1239   CU_add_test(ixhtml10_suite, "test a tag href attr1 with void attribute.",        test_ixhtml10_a_tag_href_attribute_001);
1240   CU_add_test(ixhtml10_suite, "test a tag href attr2 with other site link.",       test_ixhtml10_a_tag_href_attribute_002);
1241   CU_add_test(ixhtml10_suite, "test a tag href attr3 with local link.",            test_ixhtml10_a_tag_href_attribute_003);
1242   CU_add_test(ixhtml10_suite, "test a tag href attr4 with maker.",                 test_ixhtml10_a_tag_href_attribute_004);
1243   CU_add_test(ixhtml10_suite, "test a tag href attr5 with void maker.",            test_ixhtml10_a_tag_href_attribute_005);
1244   CU_add_test(ixhtml10_suite, "test a tag href attr6 with no cookie.",             test_ixhtml10_a_tag_href_attribute_006);
1245   CU_add_test(ixhtml10_suite, "test a tag accesskey attribute.",                   test_ixhtml10_a_tag_accesskey_attribute_001);
1246   CU_add_test(ixhtml10_suite, "test a tag accesskey attribute with void char.",    test_ixhtml10_a_tag_accesskey_attribute_002);
1247   CU_add_test(ixhtml10_suite, "test a tag accesskey attribute with no value",      test_ixhtml10_a_tag_accesskey_attribute_003);
1248
1249   /*=========================================================================*/
1250   /* <BR>                                                                    */
1251   /*=========================================================================*/
1252   CU_add_test(ixhtml10_suite, "test <br>.",                                        test_ixhtml10_br_tag_001);
1253   CU_add_test(ixhtml10_suite, "test <br> with clear attribute(left).",             test_ixhtml10_br_tag_002);
1254   CU_add_test(ixhtml10_suite, "test <br> with clear attribute(right).",            test_ixhtml10_br_tag_003);
1255   CU_add_test(ixhtml10_suite, "test <br> with clear attribute(all).",              test_ixhtml10_br_tag_004);
1256   CU_add_test(ixhtml10_suite, "test <br> with clear attribute(void).",             test_ixhtml10_br_tag_005);
1257   CU_add_test(ixhtml10_suite, "test <br> with clear attribute(no value).",         test_ixhtml10_br_tag_006);
1258   CU_add_test(ixhtml10_suite, "test <br> with clear attribute(unknown value).",    test_ixhtml10_br_tag_007);
1259
1260   /*=========================================================================*/
1261   /* <font>                                                                  */
1262   /*=========================================================================*/
1263   CU_add_test(ixhtml10_suite, "test <font> 1." ,                                   test_ixhtml10_font_tag_001);
1264   CU_add_test(ixhtml10_suite, "test <font> 2." ,                                   test_ixhtml10_font_tag_002);
1265   CU_add_test(ixhtml10_suite, "test <font> 3." ,                                   test_ixhtml10_font_tag_003);
1266   CU_add_test(ixhtml10_suite, "test <font> 4." ,                                   test_ixhtml10_font_tag_004);
1267   CU_add_test(ixhtml10_suite, "test <font> 5." ,                                   test_ixhtml10_font_tag_005);
1268   CU_add_test(ixhtml10_suite, "test <font> 6." ,                                   test_ixhtml10_font_tag_006);
1269   CU_add_test(ixhtml10_suite, "test <font> 7." ,                                   test_ixhtml10_font_tag_007);
1270   CU_add_test(ixhtml10_suite, "test <font> 8." ,                                   test_ixhtml10_font_tag_008);
1271   CU_add_test(ixhtml10_suite, "test <font> 9." ,                                   test_ixhtml10_font_tag_009);
1272   CU_add_test(ixhtml10_suite, "test <font> 10." ,                                  test_ixhtml10_font_tag_010);
1273   CU_add_test(ixhtml10_suite, "test <font> 11." ,                                  test_ixhtml10_font_tag_011);
1274   CU_add_test(ixhtml10_suite, "test <font> 12." ,                                  test_ixhtml10_font_tag_012);
1275   CU_add_test(ixhtml10_suite, "test <font> 13." ,                                  test_ixhtml10_font_tag_013);
1276   CU_add_test(ixhtml10_suite, "test <font> 14." ,                                  test_ixhtml10_font_tag_014);
1277   CU_add_test(ixhtml10_suite, "test <font> 15." ,                                  test_ixhtml10_font_tag_015);
1278   CU_add_test(ixhtml10_suite, "test <font> 16." ,                                  test_ixhtml10_font_tag_016);
1279   CU_add_test(ixhtml10_suite, "test <font> 17." ,                                  test_ixhtml10_font_tag_017);
1280   CU_add_test(ixhtml10_suite, "test <font> 18." ,                                  test_ixhtml10_font_tag_018);
1281   CU_add_test(ixhtml10_suite, "test <font> 19." ,                                  test_ixhtml10_font_tag_019);
1282   CU_add_test(ixhtml10_suite, "test <font> 20." ,                                  test_ixhtml10_font_tag_020);
1283   CU_add_test(ixhtml10_suite, "test <font> 21." ,                                  test_ixhtml10_font_tag_021);
1284   CU_add_test(ixhtml10_suite, "test <font> 22." ,                                  test_ixhtml10_font_tag_022);
1285
1286   /*=========================================================================*/
1287   /* <INPUT>                                                                 */
1288   /*=========================================================================*/
1289   CU_add_test(ixhtml10_suite, "test <input>." ,                                    test_ixhtml10_input_tag_001);
1290   CU_add_test(ixhtml10_suite, "test <input type>." ,                               test_ixhtml10_input_tag_002);
1291   CU_add_test(ixhtml10_suite, "test <input type> with void value." ,               test_ixhtml10_input_tag_003);
1292   CU_add_test(ixhtml10_suite, "test <input type> with value(text)." ,              test_ixhtml10_input_tag_004);
1293   CU_add_test(ixhtml10_suite, "test <input type> with value(password)." ,          test_ixhtml10_input_tag_005);
1294   CU_add_test(ixhtml10_suite, "test <input type> with value(checkbox)." ,          test_ixhtml10_input_tag_006);
1295   CU_add_test(ixhtml10_suite, "test <input type> with value(radio)." ,             test_ixhtml10_input_tag_007);
1296   CU_add_test(ixhtml10_suite, "test <input type> with value(hidden)." ,            test_ixhtml10_input_tag_008);
1297   CU_add_test(ixhtml10_suite, "test <input type> with value(submit)." ,            test_ixhtml10_input_tag_009);
1298   CU_add_test(ixhtml10_suite, "test <input type> with value(reset)." ,             test_ixhtml10_input_tag_010);
1299   CU_add_test(ixhtml10_suite, "test <input type> with value(unknown)." ,           test_ixhtml10_input_tag_011);
1300   CU_add_test(ixhtml10_suite, "test <input name>." ,                               test_ixhtml10_input_tag_012);
1301   CU_add_test(ixhtml10_suite, "test <input name> with void value." ,               test_ixhtml10_input_tag_013);
1302   CU_add_test(ixhtml10_suite, "test <input name> with alphabetic value." ,         test_ixhtml10_input_tag_014);
1303   CU_add_test(ixhtml10_suite, "test <input name> with japanese value." ,           test_ixhtml10_input_tag_015);
1304   CU_add_test(ixhtml10_suite, "test <input name> with japanese-hankaku value." ,   test_ixhtml10_input_tag_016);
1305   CU_add_test(ixhtml10_suite, "test <input value>." ,                              test_ixhtml10_input_tag_017);
1306   CU_add_test(ixhtml10_suite, "test <input value> with void value." ,              test_ixhtml10_input_tag_018);
1307   CU_add_test(ixhtml10_suite, "test <input value> with alphabetic value." ,        test_ixhtml10_input_tag_019);
1308   CU_add_test(ixhtml10_suite, "test <input value> with japanese value." ,          test_ixhtml10_input_tag_020);
1309   CU_add_test(ixhtml10_suite, "test <input value> with japanese-hankaku value." ,  test_ixhtml10_input_tag_021);
1310   CU_add_test(ixhtml10_suite, "test <input size>." ,                               test_ixhtml10_input_tag_022);
1311   CU_add_test(ixhtml10_suite, "test <input size> with void value." ,               test_ixhtml10_input_tag_023);
1312   CU_add_test(ixhtml10_suite, "test <input size> with alphabetic value." ,         test_ixhtml10_input_tag_024);
1313   CU_add_test(ixhtml10_suite, "test <input size> with numeric value." ,            test_ixhtml10_input_tag_025);
1314   CU_add_test(ixhtml10_suite, "test <input maxlength>." ,                          test_ixhtml10_input_tag_026);
1315   CU_add_test(ixhtml10_suite, "test <input maxlength> with void value." ,          test_ixhtml10_input_tag_027);
1316   CU_add_test(ixhtml10_suite, "test <input maxlength> with alphabetic value." ,    test_ixhtml10_input_tag_028);
1317   CU_add_test(ixhtml10_suite, "test <input maxlength> with numeric value." ,       test_ixhtml10_input_tag_029);
1318   CU_add_test(ixhtml10_suite, "test <input checked>." ,                            test_ixhtml10_input_tag_030);
1319   CU_add_test(ixhtml10_suite, "test <input accesskey>." ,                          test_ixhtml10_input_tag_031);
1320   CU_add_test(ixhtml10_suite, "test <input accesskey> with void value." ,          test_ixhtml10_input_tag_032);
1321   CU_add_test(ixhtml10_suite, "test <input accesskey> with value." ,               test_ixhtml10_input_tag_033);
1322   CU_add_test(ixhtml10_suite, "test <input istyle> 1." ,                           test_ixhtml10_input_tag_034);
1323   CU_add_test(ixhtml10_suite, "test <input istyle> 2." ,                           test_ixhtml10_input_tag_035);
1324   CU_add_test(ixhtml10_suite, "test <input istyle> 3." ,                           test_ixhtml10_input_tag_036);
1325   CU_add_test(ixhtml10_suite, "test <input istyle> 4." ,                           test_ixhtml10_input_tag_037);
1326   CU_add_test(ixhtml10_suite, "test <input istyle> 5." ,                           test_ixhtml10_input_tag_038);
1327   CU_add_test(ixhtml10_suite, "test <input istyle> 6." ,                           test_ixhtml10_input_tag_039);
1328   CU_add_test(ixhtml10_suite, "test <input istyle> 7." ,                           test_ixhtml10_input_tag_040);
1329   CU_add_test(ixhtml10_suite, "test <input istyle> 8." ,                           test_ixhtml10_input_tag_041);
1330   CU_add_test(ixhtml10_suite, "test <input istyle> 9." ,                           test_ixhtml10_input_tag_042);
1331   CU_add_test(ixhtml10_suite, "test <input istyle> 10." ,                          test_ixhtml10_input_tag_043);
1332   CU_add_test(ixhtml10_suite, "test <input istyle> 11." ,                          test_ixhtml10_input_tag_044);
1333   CU_add_test(ixhtml10_suite, "test <input istyle> 12." ,                          test_ixhtml10_input_tag_045);
1334   CU_add_test(ixhtml10_suite, "test <input istyle> 13." ,                          test_ixhtml10_input_tag_046);
1335   CU_add_test(ixhtml10_suite, "test <input istyle> 14." ,                          test_ixhtml10_input_tag_047);
1336
1337   /*=========================================================================*/
1338   /* <CENTER>                                                                */
1339   /*=========================================================================*/
1340   CU_add_test(ixhtml10_suite, "test <center>.",                                    test_ixhtml10_center_tag_001);
1341
1342   /*=========================================================================*/
1343   /* <HR>                                                                    */
1344   /*=========================================================================*/
1345   CU_add_test(ixhtml10_suite, "test <hr>.",                                        test_ixhtml10_hr_tag_001);
1346   CU_add_test(ixhtml10_suite, "test <hr />.",                                      test_ixhtml10_hr_tag_002);
1347   CU_add_test(ixhtml10_suite, "test <hr align> with no value.",                    test_ixhtml10_hr_tag_003);
1348   CU_add_test(ixhtml10_suite, "test <hr align> with void value.",                  test_ixhtml10_hr_tag_004);
1349   CU_add_test(ixhtml10_suite, "test <hr align> with value(left).",                 test_ixhtml10_hr_tag_005);
1350   CU_add_test(ixhtml10_suite, "test <hr align> with value(right).",                test_ixhtml10_hr_tag_006);
1351   CU_add_test(ixhtml10_suite, "test <hr align> with value(center).",               test_ixhtml10_hr_tag_007);
1352   CU_add_test(ixhtml10_suite, "test <hr align> with value(unknown).",              test_ixhtml10_hr_tag_008);
1353   CU_add_test(ixhtml10_suite, "test <hr size> with no value.",                     test_ixhtml10_hr_tag_009);
1354   CU_add_test(ixhtml10_suite, "test <hr size> with void value.",                   test_ixhtml10_hr_tag_010);
1355   CU_add_test(ixhtml10_suite, "test <hr size> with non numeric value.",            test_ixhtml10_hr_tag_011);
1356   CU_add_test(ixhtml10_suite, "test <hr size> with numeric value.",                test_ixhtml10_hr_tag_012);
1357   CU_add_test(ixhtml10_suite, "test <hr width> with no value.",                    test_ixhtml10_hr_tag_013);
1358   CU_add_test(ixhtml10_suite, "test <hr width> with void value.",                  test_ixhtml10_hr_tag_014);
1359   CU_add_test(ixhtml10_suite, "test <hr width> with non numeric value.",           test_ixhtml10_hr_tag_015);
1360   CU_add_test(ixhtml10_suite, "test <hr width> with numeric value.",               test_ixhtml10_hr_tag_016);
1361   CU_add_test(ixhtml10_suite, "test <hr noshade>.",                                test_ixhtml10_hr_tag_017);
1362   CU_add_test(ixhtml10_suite, "test <hr color> 1.",                                test_ixhtml10_hr_tag_018);
1363   CU_add_test(ixhtml10_suite, "test <hr color> 2.",                                test_ixhtml10_hr_tag_018_1);
1364   CU_add_test(ixhtml10_suite, "test <hr color> 3.",                                test_ixhtml10_hr_tag_018_2);
1365
1366   /*=========================================================================*/
1367   /* <IMG>                                                                   */
1368   /*=========================================================================*/
1369   CU_add_test(ixhtml10_suite, "test <img>." ,                                      test_ixhtml10_img_tag_001);
1370   CU_add_test(ixhtml10_suite, "test <img src> with no value." ,                    test_ixhtml10_img_tag_002);
1371   CU_add_test(ixhtml10_suite, "test <img src> with void value." ,                  test_ixhtml10_img_tag_003);
1372   CU_add_test(ixhtml10_suite, "test <img src> with alphabetic value." ,            test_ixhtml10_img_tag_004);
1373   CU_add_test(ixhtml10_suite, "test <img src> with japanese value." ,              test_ixhtml10_img_tag_005);
1374   CU_add_test(ixhtml10_suite, "test <img src> with japanese-hankaku value." ,      test_ixhtml10_img_tag_006);
1375   CU_add_test(ixhtml10_suite, "test <img align> with no value." ,                  test_ixhtml10_img_tag_007);
1376   CU_add_test(ixhtml10_suite, "test <img align> with void value." ,                test_ixhtml10_img_tag_008);
1377   CU_add_test(ixhtml10_suite, "test <img align> with value(top)." ,                test_ixhtml10_img_tag_009);
1378   CU_add_test(ixhtml10_suite, "test <img align> with value(middle)." ,             test_ixhtml10_img_tag_020);
1379   CU_add_test(ixhtml10_suite, "test <img align> with value(bottom)." ,             test_ixhtml10_img_tag_011);
1380   CU_add_test(ixhtml10_suite, "test <img align> with value(left)." ,               test_ixhtml10_img_tag_012);
1381   CU_add_test(ixhtml10_suite, "test <img align> with value(right)." ,              test_ixhtml10_img_tag_013);
1382   CU_add_test(ixhtml10_suite, "test <img align> with value(center)." ,             test_ixhtml10_img_tag_013_1);
1383   CU_add_test(ixhtml10_suite, "test <img align> with value(unkown)." ,             test_ixhtml10_img_tag_014);
1384   CU_add_test(ixhtml10_suite, "test <img width> with no value." ,                  test_ixhtml10_img_tag_015);
1385   CU_add_test(ixhtml10_suite, "test <img width> with void value." ,                test_ixhtml10_img_tag_016);
1386   CU_add_test(ixhtml10_suite, "test <img width> with alphabetic value." ,          test_ixhtml10_img_tag_017);
1387   CU_add_test(ixhtml10_suite, "test <img width> with numeric value." ,             test_ixhtml10_img_tag_018);
1388   CU_add_test(ixhtml10_suite, "test <img width> with percentage value." ,          test_ixhtml10_img_tag_019);
1389   CU_add_test(ixhtml10_suite, "test <img height> with no value." ,                 test_ixhtml10_img_tag_020);
1390   CU_add_test(ixhtml10_suite, "test <img height> with void value." ,               test_ixhtml10_img_tag_021);
1391   CU_add_test(ixhtml10_suite, "test <img height> with alphabetic value." ,         test_ixhtml10_img_tag_022);
1392   CU_add_test(ixhtml10_suite, "test <img height> with numeric value." ,            test_ixhtml10_img_tag_023);
1393   CU_add_test(ixhtml10_suite, "test <img height> with percentage value." ,         test_ixhtml10_img_tag_024);
1394   CU_add_test(ixhtml10_suite, "test <img hspace> with no value." ,                 test_ixhtml10_img_tag_025);
1395   CU_add_test(ixhtml10_suite, "test <img hspace> with void value." ,               test_ixhtml10_img_tag_026);
1396   CU_add_test(ixhtml10_suite, "test <img hspace> with alphabetic value." ,         test_ixhtml10_img_tag_027);
1397   CU_add_test(ixhtml10_suite, "test <img hspace> with numeric value." ,            test_ixhtml10_img_tag_028);
1398   CU_add_test(ixhtml10_suite, "test <img vspace> with no value." ,                 test_ixhtml10_img_tag_029);
1399   CU_add_test(ixhtml10_suite, "test <img vspace> with void value." ,               test_ixhtml10_img_tag_030);
1400   CU_add_test(ixhtml10_suite, "test <img vspace> with alphabetic value." ,         test_ixhtml10_img_tag_031);
1401   CU_add_test(ixhtml10_suite, "test <img vspace> with numeric value." ,            test_ixhtml10_img_tag_032);
1402   CU_add_test(ixhtml10_suite, "test <img alt>." ,                                  test_ixhtml10_img_tag_033);
1403   CU_add_test(ixhtml10_suite, "test <img alt> with void value." ,                  test_ixhtml10_img_tag_034);
1404   CU_add_test(ixhtml10_suite, "test <img alt> with alphabetic value." ,            test_ixhtml10_img_tag_035);
1405   CU_add_test(ixhtml10_suite, "test <img alt> with japanese value." ,              test_ixhtml10_img_tag_036);
1406   CU_add_test(ixhtml10_suite, "test <img alt> with japanese-hankaku value." ,      test_ixhtml10_img_tag_037);
1407
1408   /*=========================================================================*/
1409   /* <SELECT>                                                                */
1410   /*=========================================================================*/
1411   CU_add_test(ixhtml10_suite, "test <select> 1." ,                                 test_ixhtml10_select_tag_001);
1412   CU_add_test(ixhtml10_suite, "test <select> 2." ,                                 test_ixhtml10_select_tag_002);
1413   CU_add_test(ixhtml10_suite, "test <select> 3." ,                                 test_ixhtml10_select_tag_003);
1414   CU_add_test(ixhtml10_suite, "test <select> 4." ,                                 test_ixhtml10_select_tag_004);
1415   CU_add_test(ixhtml10_suite, "test <select> 5." ,                                 test_ixhtml10_select_tag_005);
1416   CU_add_test(ixhtml10_suite, "test <select> 6." ,                                 test_ixhtml10_select_tag_006);
1417   CU_add_test(ixhtml10_suite, "test <select> 7." ,                                 test_ixhtml10_select_tag_007);
1418   CU_add_test(ixhtml10_suite, "test <select> 8." ,                                 test_ixhtml10_select_tag_008);
1419   CU_add_test(ixhtml10_suite, "test <select> 9." ,                                 test_ixhtml10_select_tag_009);
1420   CU_add_test(ixhtml10_suite, "test <select> 10." ,                                test_ixhtml10_select_tag_010);
1421   CU_add_test(ixhtml10_suite, "test <select> 11." ,                                test_ixhtml10_select_tag_011);
1422   CU_add_test(ixhtml10_suite, "test <select> 12." ,                                test_ixhtml10_select_tag_012);
1423   CU_add_test(ixhtml10_suite, "test <select> 13." ,                                test_ixhtml10_select_tag_013);
1424   CU_add_test(ixhtml10_suite, "test <select> 14." ,                                test_ixhtml10_select_tag_014);
1425
1426   /*=========================================================================*/
1427   /* <OPTION>                                                                */
1428   /*=========================================================================*/
1429   CU_add_test(ixhtml10_suite, "test <option>." ,                                   test_ixhtml10_option_tag_001);
1430   CU_add_test(ixhtml10_suite, "test <option value> with no value." ,               test_ixhtml10_option_tag_002);
1431   CU_add_test(ixhtml10_suite, "test <option value> with void value." ,             test_ixhtml10_option_tag_003);
1432   CU_add_test(ixhtml10_suite, "test <option value> with alphabetic value." ,       test_ixhtml10_option_tag_004);
1433   CU_add_test(ixhtml10_suite, "test <option value> with japanese value." ,         test_ixhtml10_option_tag_005);
1434   CU_add_test(ixhtml10_suite, "test <option value> with japanese-kana value." ,    test_ixhtml10_option_tag_006);
1435   CU_add_test(ixhtml10_suite, "test <option selected>." ,                          test_ixhtml10_option_tag_007);
1436
1437   /*=========================================================================*/
1438   /* <DIV>                                                                   */
1439   /*=========================================================================*/
1440   CU_add_test(ixhtml10_suite, "test <div>.",                                       test_ixhtml10_div_tag_001);
1441   CU_add_test(ixhtml10_suite, "test <div> with align attribute(left).",            test_ixhtml10_div_tag_002);
1442   CU_add_test(ixhtml10_suite, "test <div> with align attribute(right).",           test_ixhtml10_div_tag_003);
1443   CU_add_test(ixhtml10_suite, "test <div> with align attribute(center).",          test_ixhtml10_div_tag_004);
1444   CU_add_test(ixhtml10_suite, "test <div> with align attribute(void).",            test_ixhtml10_div_tag_005);
1445   CU_add_test(ixhtml10_suite, "test <div> with align attribute(unknown).",         test_ixhtml10_div_tag_006);
1446   CU_add_test(ixhtml10_suite, "test <div> with style attribute.",                  test_ixhtml10_div_tag_007);
1447   /*=========================================================================*/
1448   /* <CHXJIF>                                                                */
1449   /*=========================================================================*/
1450   CU_add_test(ixhtml10_suite, "test <chxj:if>.",                                    test_ixhtml10_chxjif_tag_001);
1451   CU_add_test(ixhtml10_suite, "test <chxj:if> 2.",                                  test_ixhtml10_chxjif_tag_002);
1452   CU_add_test(ixhtml10_suite, "test <chxj:if> 3.",                                  test_ixhtml10_chxjif_tag_003);
1453   CU_add_test(ixhtml10_suite, "test <chxj:if> 4.",                                  test_ixhtml10_chxjif_tag_004);
1454   CU_add_test(ixhtml10_suite, "test <chxj:if> 5.",                                  test_ixhtml10_chxjif_tag_005);
1455   CU_add_test(ixhtml10_suite, "test <chxj:if> 6.",                                  test_ixhtml10_chxjif_tag_006);
1456   CU_add_test(ixhtml10_suite, "test <chxj:if> 7.",                                  test_ixhtml10_chxjif_tag_007);
1457   CU_add_test(ixhtml10_suite, "test <chxj:if> 8.",                                  test_ixhtml10_chxjif_tag_008);
1458
1459   /*=========================================================================*/
1460   /* <NOBR>                                                                  */
1461   /*=========================================================================*/
1462   CU_add_test(ixhtml10_suite, "test <nobr> 1.",                                     test_ixhtml10_nobr_tag_001);
1463   CU_add_test(ixhtml10_suite, "test <nobr> 2.",                                     test_ixhtml10_nobr_tag_002);
1464
1465   /*=========================================================================*/
1466   /* <SMALL>                                                                 */
1467   /*=========================================================================*/
1468   CU_add_test(ixhtml10_suite, "test <small> 1.",                                    test_ixhtml10_small_tag_001);
1469   CU_add_test(ixhtml10_suite, "test <small> 2.",                                    test_ixhtml10_small_tag_002);
1470
1471   /*=========================================================================*/
1472   /* <SPAN>                                                                  */
1473   /*=========================================================================*/
1474   CU_add_test(ixhtml10_suite, "test <span> 1.",                                     test_ixhtml10_span_tag_001);
1475   CU_add_test(ixhtml10_suite, "test <span> 2.",                                     test_ixhtml10_span_tag_002);
1476   CU_add_test(ixhtml10_suite, "test span with css 001",                              test_ixhtml10_span_tag_with_css_001);
1477   CU_add_test(ixhtml10_suite, "test span with css 002",                              test_ixhtml10_span_tag_with_css_002);
1478   CU_add_test(ixhtml10_suite, "test span with css 003",                              test_ixhtml10_span_tag_with_css_003);
1479   CU_add_test(ixhtml10_suite, "test span with css 004",                              test_ixhtml10_span_tag_with_css_004);
1480   CU_add_test(ixhtml10_suite, "test span with css 005",                              test_ixhtml10_span_tag_with_css_005);
1481   CU_add_test(ixhtml10_suite, "test span with css 006",                              test_ixhtml10_span_tag_with_css_006);
1482   CU_add_test(ixhtml10_suite, "test span with css 007",                              test_ixhtml10_span_tag_with_css_007);
1483   CU_add_test(ixhtml10_suite, "test span with css 008",                              test_ixhtml10_span_tag_with_css_008);
1484   CU_add_test(ixhtml10_suite, "test span with css 009",                              test_ixhtml10_span_tag_with_css_009);
1485   CU_add_test(ixhtml10_suite, "test span with css 010",                              test_ixhtml10_span_tag_with_css_010);
1486   CU_add_test(ixhtml10_suite, "test span with css 011",                              test_ixhtml10_span_tag_with_css_011);
1487   CU_add_test(ixhtml10_suite, "test span with css 012",                              test_ixhtml10_span_tag_with_css_012);
1488   CU_add_test(ixhtml10_suite, "test span with css 013",                              test_ixhtml10_span_tag_with_css_013);
1489   CU_add_test(ixhtml10_suite, "test span with css 014",                              test_ixhtml10_span_tag_with_css_014);
1490   CU_add_test(ixhtml10_suite, "test span with css 015",                              test_ixhtml10_span_tag_with_css_015);
1491   CU_add_test(ixhtml10_suite, "test span with css 016",                              test_ixhtml10_span_tag_with_css_016);
1492   CU_add_test(ixhtml10_suite, "test span with css 017",                              test_ixhtml10_span_tag_with_css_017);
1493   CU_add_test(ixhtml10_suite, "test span with css 018",                              test_ixhtml10_span_tag_with_css_018);
1494   CU_add_test(ixhtml10_suite, "test span with css 019",                              test_ixhtml10_span_tag_with_css_019);
1495   CU_add_test(ixhtml10_suite, "test span with css 020",                              test_ixhtml10_span_tag_with_css_020);
1496   CU_add_test(ixhtml10_suite, "test span with css 021",                              test_ixhtml10_span_tag_with_css_021);
1497   CU_add_test(ixhtml10_suite, "test span with css 022",                              test_ixhtml10_span_tag_with_css_022);
1498   CU_add_test(ixhtml10_suite, "test span with css 023",                              test_ixhtml10_span_tag_with_css_023);
1499   CU_add_test(ixhtml10_suite, "test span with css 024",                              test_ixhtml10_span_tag_with_css_024);
1500   CU_add_test(ixhtml10_suite, "test span with css 025",                              test_ixhtml10_span_tag_with_css_025);
1501   CU_add_test(ixhtml10_suite, "test span with css 026",                              test_ixhtml10_span_tag_with_css_026);
1502   CU_add_test(ixhtml10_suite, "test span with css 027",                              test_ixhtml10_span_tag_with_css_027);
1503   CU_add_test(ixhtml10_suite, "test span with css 028",                              test_ixhtml10_span_tag_with_css_028);
1504   CU_add_test(ixhtml10_suite, "test span with css 029",                              test_ixhtml10_span_tag_with_css_029);
1505   CU_add_test(ixhtml10_suite, "test span with css 030",                              test_ixhtml10_span_tag_with_css_030);
1506   CU_add_test(ixhtml10_suite, "test span with css 031",                              test_ixhtml10_span_tag_with_css_031);
1507   CU_add_test(ixhtml10_suite, "test span with css 032",                              test_ixhtml10_span_tag_with_css_032);
1508   CU_add_test(ixhtml10_suite, "test span with css 033",                              test_ixhtml10_span_tag_with_css_033);
1509   CU_add_test(ixhtml10_suite, "test span with css 034",                              test_ixhtml10_span_tag_with_css_034);
1510   CU_add_test(ixhtml10_suite, "test span with css 035",                              test_ixhtml10_span_tag_with_css_035);
1511   CU_add_test(ixhtml10_suite, "test span with css 036",                              test_ixhtml10_span_tag_with_css_036);
1512   CU_add_test(ixhtml10_suite, "test span with css 037",                              test_ixhtml10_span_tag_with_css_037);
1513   CU_add_test(ixhtml10_suite, "test span with css 038",                              test_ixhtml10_span_tag_with_css_038);
1514   CU_add_test(ixhtml10_suite, "test span with css 039",                              test_ixhtml10_span_tag_with_css_039);
1515   CU_add_test(ixhtml10_suite, "test span with css 040",                              test_ixhtml10_span_tag_with_css_040);
1516
1517   CU_add_test(ixhtml10_suite, "test <th> 1",                test_ixhtml10_th_tag_001);
1518   CU_add_test(ixhtml10_suite, "test <th> 2",                test_ixhtml10_th_tag_002);
1519
1520   CU_add_test(ixhtml10_suite, "test <b> 1",                test_ixhtml10_b_tag_001);
1521   CU_add_test(ixhtml10_suite, "test <b> 2",                test_ixhtml10_b_tag_002);
1522
1523   CU_add_test(ixhtml10_suite, "test <fieldset> 1",                test_ixhtml10_fieldset_tag_001);
1524   CU_add_test(ixhtml10_suite, "test <fieldset> 2",                test_ixhtml10_fieldset_tag_002);
1525
1526   /*=========================================================================*/
1527   /* <DT>                                                                    */
1528   /*=========================================================================*/
1529   CU_add_test(ixhtml10_suite, "test <dt>.",                                        test_ixhtml10_dt_tag_001);
1530   CU_add_test(ixhtml10_suite, "test <dt> with void value.",                        test_ixhtml10_dt_tag_002);
1531   CU_add_test(ixhtml10_suite, "test dt with css 001",                              test_ixhtml10_dt_tag_with_css_001);
1532   CU_add_test(ixhtml10_suite, "test dt with css 002",                              test_ixhtml10_dt_tag_with_css_002);
1533   CU_add_test(ixhtml10_suite, "test dt with css 003",                              test_ixhtml10_dt_tag_with_css_003);
1534   CU_add_test(ixhtml10_suite, "test dt with css 004",                              test_ixhtml10_dt_tag_with_css_004);
1535   CU_add_test(ixhtml10_suite, "test dt with css 005",                              test_ixhtml10_dt_tag_with_css_005);
1536   CU_add_test(ixhtml10_suite, "test dt with css 006",                              test_ixhtml10_dt_tag_with_css_006);
1537   CU_add_test(ixhtml10_suite, "test dt with css 007",                              test_ixhtml10_dt_tag_with_css_007);
1538   CU_add_test(ixhtml10_suite, "test dt with css 008",                              test_ixhtml10_dt_tag_with_css_008);
1539   CU_add_test(ixhtml10_suite, "test dt with css 009",                              test_ixhtml10_dt_tag_with_css_009);
1540   CU_add_test(ixhtml10_suite, "test dt with css 010",                              test_ixhtml10_dt_tag_with_css_010);
1541   CU_add_test(ixhtml10_suite, "test dt with css 011",                              test_ixhtml10_dt_tag_with_css_011);
1542   CU_add_test(ixhtml10_suite, "test dt with css 012",                              test_ixhtml10_dt_tag_with_css_012);
1543   CU_add_test(ixhtml10_suite, "test dt with css 013",                              test_ixhtml10_dt_tag_with_css_013);
1544   CU_add_test(ixhtml10_suite, "test dt with css 014",                              test_ixhtml10_dt_tag_with_css_014);
1545
1546   /*=========================================================================*/
1547   /* <LEGEND>                                                                */
1548   /*=========================================================================*/
1549   CU_add_test(ixhtml10_suite, "test <legend>.",                                        test_ixhtml10_legend_tag_001);
1550   CU_add_test(ixhtml10_suite, "test <legend> 2.",                                      test_ixhtml10_legend_tag_002);
1551
1552   /*=========================================================================*/
1553   /* <LABEL>                                                                 */
1554   /*=========================================================================*/
1555   CU_add_test(ixhtml10_suite, "test <label>.",                                        test_ixhtml10_label_tag_001);
1556   CU_add_test(ixhtml10_suite, "test <label> 2.",                                      test_ixhtml10_label_tag_002);
1557
1558   /*=========================================================================*/
1559   /* <BLOCKQUOTE>                                                            */
1560   /*=========================================================================*/
1561   CU_add_test(ixhtml10_suite, "test <blockquote> with void value.",                test_ixhtml10_blockquote_tag_001);
1562   CU_add_test(ixhtml10_suite, "test <blockquote> with value.",                     test_ixhtml10_blockquote_tag_002);
1563   CU_add_test(ixhtml10_suite, "test <blockquote> with japanese value.",            test_ixhtml10_blockquote_tag_003);
1564   CU_add_test(ixhtml10_suite, "test <blockquote> with hankaku kana value.",        test_ixhtml10_blockquote_tag_004);
1565
1566   CU_add_test(ixhtml10_suite, "test blockquote with css 001",                       test_ixhtml10_blockquote_tag_with_css_001);
1567   CU_add_test(ixhtml10_suite, "test blockquote with css 002",                       test_ixhtml10_blockquote_tag_with_css_002);
1568   CU_add_test(ixhtml10_suite, "test blockquote with css 003",                       test_ixhtml10_blockquote_tag_with_css_003);
1569   CU_add_test(ixhtml10_suite, "test blockquote with css 004",                       test_ixhtml10_blockquote_tag_with_css_004);
1570   CU_add_test(ixhtml10_suite, "test blockquote with css 005",                       test_ixhtml10_blockquote_tag_with_css_005);
1571   CU_add_test(ixhtml10_suite, "test blockquote with css 006",                       test_ixhtml10_blockquote_tag_with_css_006);
1572   CU_add_test(ixhtml10_suite, "test blockquote with css 007",                       test_ixhtml10_blockquote_tag_with_css_007);
1573   CU_add_test(ixhtml10_suite, "test blockquote with css 008",                       test_ixhtml10_blockquote_tag_with_css_008);
1574   CU_add_test(ixhtml10_suite, "test blockquote with css 009",                       test_ixhtml10_blockquote_tag_with_css_009);
1575   CU_add_test(ixhtml10_suite, "test blockquote with css 010",                       test_ixhtml10_blockquote_tag_with_css_010);
1576   CU_add_test(ixhtml10_suite, "test blockquote with css 011",                       test_ixhtml10_blockquote_tag_with_css_011);
1577   CU_add_test(ixhtml10_suite, "test blockquote with css 012",                       test_ixhtml10_blockquote_tag_with_css_012);
1578   CU_add_test(ixhtml10_suite, "test blockquote with css 013",                       test_ixhtml10_blockquote_tag_with_css_013);
1579   CU_add_test(ixhtml10_suite, "test blockquote with css 014",                       test_ixhtml10_blockquote_tag_with_css_014);
1580   CU_add_test(ixhtml10_suite, "test blockquote with css 015",                       test_ixhtml10_blockquote_tag_with_css_015);
1581   CU_add_test(ixhtml10_suite, "test blockquote with css 016",                       test_ixhtml10_blockquote_tag_with_css_016);
1582
1583   /*=========================================================================*/
1584   /* <DIR>                                                                   */
1585   /*=========================================================================*/
1586   CU_add_test(ixhtml10_suite, "test <dir>.",                                       test_ixhtml10_dir_tag_001);
1587   CU_add_test(ixhtml10_suite, "test <dir> with no <li>.",                          test_ixhtml10_dir_tag_002);
1588   CU_add_test(ixhtml10_suite, "test <dir type> 1",                                 test_ixhtml10_dir_tag_003);
1589   CU_add_test(ixhtml10_suite, "test <dir type> 2",                                 test_ixhtml10_dir_tag_004);
1590   CU_add_test(ixhtml10_suite, "test <dir type> 3",                                 test_ixhtml10_dir_tag_005);
1591   CU_add_test(ixhtml10_suite, "test <dir type> 4",                                 test_ixhtml10_dir_tag_006);
1592   CU_add_test(ixhtml10_suite, "test <dir type> 5",                                 test_ixhtml10_dir_tag_007);
1593
1594   CU_add_test(ixhtml10_suite, "test dir with css 001",                       test_ixhtml10_dir_tag_with_css_001);
1595   CU_add_test(ixhtml10_suite, "test dir with css 002",                       test_ixhtml10_dir_tag_with_css_002);
1596   CU_add_test(ixhtml10_suite, "test dir with css 003",                       test_ixhtml10_dir_tag_with_css_003);
1597   CU_add_test(ixhtml10_suite, "test dir with css 004",                       test_ixhtml10_dir_tag_with_css_004);
1598   CU_add_test(ixhtml10_suite, "test dir with css 005",                       test_ixhtml10_dir_tag_with_css_005);
1599   CU_add_test(ixhtml10_suite, "test dir with css 006",                       test_ixhtml10_dir_tag_with_css_006);
1600   CU_add_test(ixhtml10_suite, "test dir with css 007",                       test_ixhtml10_dir_tag_with_css_007);
1601   CU_add_test(ixhtml10_suite, "test dir with css 008",                       test_ixhtml10_dir_tag_with_css_008);
1602   CU_add_test(ixhtml10_suite, "test dir with css 009",                       test_ixhtml10_dir_tag_with_css_009);
1603   CU_add_test(ixhtml10_suite, "test dir with css 010",                       test_ixhtml10_dir_tag_with_css_010);
1604   CU_add_test(ixhtml10_suite, "test dir with css 011",                       test_ixhtml10_dir_tag_with_css_011);
1605   CU_add_test(ixhtml10_suite, "test dir with css 012",                       test_ixhtml10_dir_tag_with_css_012);
1606   CU_add_test(ixhtml10_suite, "test dir with css 013",                       test_ixhtml10_dir_tag_with_css_013);
1607   CU_add_test(ixhtml10_suite, "test dir with css 014",                       test_ixhtml10_dir_tag_with_css_014);
1608   CU_add_test(ixhtml10_suite, "test dir with css 015",                       test_ixhtml10_dir_tag_with_css_015);
1609   CU_add_test(ixhtml10_suite, "test dir with css 016",                       test_ixhtml10_dir_tag_with_css_016);
1610   CU_add_test(ixhtml10_suite, "test dir with css 017",                       test_ixhtml10_dir_tag_with_css_017);
1611   CU_add_test(ixhtml10_suite, "test dir with css 018",                       test_ixhtml10_dir_tag_with_css_018);
1612   CU_add_test(ixhtml10_suite, "test dir with css 019",                       test_ixhtml10_dir_tag_with_css_019);
1613   CU_add_test(ixhtml10_suite, "test dir with css 020",                       test_ixhtml10_dir_tag_with_css_020);
1614   CU_add_test(ixhtml10_suite, "test dir with css 021",                       test_ixhtml10_dir_tag_with_css_021);
1615   CU_add_test(ixhtml10_suite, "test dir with css 022",                       test_ixhtml10_dir_tag_with_css_022);
1616
1617   /*=========================================================================*/
1618   /* <DL>                                                                    */
1619   /*=========================================================================*/
1620   CU_add_test(ixhtml10_suite, "test <dl>.",                                        test_ixhtml10_dl_tag_001);
1621
1622   CU_add_test(ixhtml10_suite, "test dl with css 001",                       test_ixhtml10_dl_tag_with_css_001);
1623   CU_add_test(ixhtml10_suite, "test dl with css 002",                       test_ixhtml10_dl_tag_with_css_002);
1624   CU_add_test(ixhtml10_suite, "test dl with css 009",                       test_ixhtml10_dl_tag_with_css_009);
1625   CU_add_test(ixhtml10_suite, "test dl with css 010",                       test_ixhtml10_dl_tag_with_css_010);
1626   CU_add_test(ixhtml10_suite, "test dl with css 011",                       test_ixhtml10_dl_tag_with_css_011);
1627   CU_add_test(ixhtml10_suite, "test dl with css 012",                       test_ixhtml10_dl_tag_with_css_012);
1628   CU_add_test(ixhtml10_suite, "test dl with css 013",                       test_ixhtml10_dl_tag_with_css_013);
1629   CU_add_test(ixhtml10_suite, "test dl with css 014",                       test_ixhtml10_dl_tag_with_css_014);
1630   CU_add_test(ixhtml10_suite, "test dl with css 015",                       test_ixhtml10_dl_tag_with_css_015);
1631   CU_add_test(ixhtml10_suite, "test dl with css 016",                       test_ixhtml10_dl_tag_with_css_016);
1632   CU_add_test(ixhtml10_suite, "test dl with css 017",                       test_ixhtml10_dl_tag_with_css_017);
1633   CU_add_test(ixhtml10_suite, "test dl with css 018",                       test_ixhtml10_dl_tag_with_css_018);
1634   CU_add_test(ixhtml10_suite, "test dl with css 019",                       test_ixhtml10_dl_tag_with_css_019);
1635   CU_add_test(ixhtml10_suite, "test dl with css 020",                       test_ixhtml10_dl_tag_with_css_020);
1636   CU_add_test(ixhtml10_suite, "test dl with css 021",                       test_ixhtml10_dl_tag_with_css_021);
1637   CU_add_test(ixhtml10_suite, "test dl with css 022",                       test_ixhtml10_dl_tag_with_css_022);
1638
1639   /*=========================================================================*/
1640   /* <DD>                                                                    */
1641   /*=========================================================================*/
1642   CU_add_test(ixhtml10_suite, "test <dd>.",                                        test_ixhtml10_dd_tag_001);
1643   CU_add_test(ixhtml10_suite, "test <dd> with void value.",                        test_ixhtml10_dd_tag_002);
1644
1645   CU_add_test(ixhtml10_suite, "test dd with css 001",                       test_ixhtml10_dd_tag_with_css_001);
1646   CU_add_test(ixhtml10_suite, "test dd with css 002",                       test_ixhtml10_dd_tag_with_css_002);
1647   CU_add_test(ixhtml10_suite, "test dd with css 009",                       test_ixhtml10_dd_tag_with_css_009);
1648   CU_add_test(ixhtml10_suite, "test dd with css 010",                       test_ixhtml10_dd_tag_with_css_010);
1649   CU_add_test(ixhtml10_suite, "test dd with css 011",                       test_ixhtml10_dd_tag_with_css_011);
1650   CU_add_test(ixhtml10_suite, "test dd with css 012",                       test_ixhtml10_dd_tag_with_css_012);
1651   CU_add_test(ixhtml10_suite, "test dd with css 013",                       test_ixhtml10_dd_tag_with_css_013);
1652   CU_add_test(ixhtml10_suite, "test dd with css 014",                       test_ixhtml10_dd_tag_with_css_014);
1653   CU_add_test(ixhtml10_suite, "test dd with css 015",                       test_ixhtml10_dd_tag_with_css_015);
1654   CU_add_test(ixhtml10_suite, "test dd with css 016",                       test_ixhtml10_dd_tag_with_css_016);
1655   CU_add_test(ixhtml10_suite, "test dd with css 017",                       test_ixhtml10_dd_tag_with_css_017);
1656   CU_add_test(ixhtml10_suite, "test dd with css 018",                       test_ixhtml10_dd_tag_with_css_018);
1657   CU_add_test(ixhtml10_suite, "test dd with css 019",                       test_ixhtml10_dd_tag_with_css_019);
1658   CU_add_test(ixhtml10_suite, "test dd with css 020",                       test_ixhtml10_dd_tag_with_css_020);
1659   CU_add_test(ixhtml10_suite, "test dd with css 021",                       test_ixhtml10_dd_tag_with_css_021);
1660   CU_add_test(ixhtml10_suite, "test dd with css 022",                       test_ixhtml10_dd_tag_with_css_022);
1661
1662   /*=========================================================================*/
1663   /* <MENU>                                                                  */
1664   /*=========================================================================*/
1665   CU_add_test(ixhtml10_suite, "test <menu>." ,                                     test_ixhtml10_menu_tag_001);
1666   CU_add_test(ixhtml10_suite, "test <menu> 2." ,                                   test_ixhtml10_menu_tag_002);
1667   CU_add_test(ixhtml10_suite, "test <menu> 3." ,                                   test_ixhtml10_menu_tag_003);
1668   CU_add_test(ixhtml10_suite, "test <menu> 4." ,                                   test_ixhtml10_menu_tag_004);
1669   CU_add_test(ixhtml10_suite, "test <menu> 5." ,                                   test_ixhtml10_menu_tag_005);
1670   CU_add_test(ixhtml10_suite, "test <menu> 6." ,                                   test_ixhtml10_menu_tag_006);
1671   CU_add_test(ixhtml10_suite, "test <menu> 7." ,                                   test_ixhtml10_menu_tag_007);
1672   CU_add_test(ixhtml10_suite, "test <menu> 8." ,                                   test_ixhtml10_menu_tag_008);
1673   CU_add_test(ixhtml10_suite, "test <menu> 9." ,                                   test_ixhtml10_menu_tag_009);
1674   CU_add_test(ixhtml10_suite, "test <menu> 10." ,                                  test_ixhtml10_menu_tag_010);
1675
1676   CU_add_test(ixhtml10_suite, "test menu with css 001",                       test_ixhtml10_menu_tag_with_css_001);
1677   CU_add_test(ixhtml10_suite, "test menu with css 002",                       test_ixhtml10_menu_tag_with_css_002);
1678   CU_add_test(ixhtml10_suite, "test menu with css 009",                       test_ixhtml10_menu_tag_with_css_009);
1679   CU_add_test(ixhtml10_suite, "test menu with css 010",                       test_ixhtml10_menu_tag_with_css_010);
1680   CU_add_test(ixhtml10_suite, "test menu with css 011",                       test_ixhtml10_menu_tag_with_css_011);
1681   CU_add_test(ixhtml10_suite, "test menu with css 012",                       test_ixhtml10_menu_tag_with_css_012);
1682   CU_add_test(ixhtml10_suite, "test menu with css 013",                       test_ixhtml10_menu_tag_with_css_013);
1683   CU_add_test(ixhtml10_suite, "test menu with css 014",                       test_ixhtml10_menu_tag_with_css_014);
1684   CU_add_test(ixhtml10_suite, "test menu with css 015",                       test_ixhtml10_menu_tag_with_css_015);
1685   CU_add_test(ixhtml10_suite, "test menu with css 016",                       test_ixhtml10_menu_tag_with_css_016);
1686   CU_add_test(ixhtml10_suite, "test menu with css 017",                       test_ixhtml10_menu_tag_with_css_017);
1687   CU_add_test(ixhtml10_suite, "test menu with css 018",                       test_ixhtml10_menu_tag_with_css_018);
1688   CU_add_test(ixhtml10_suite, "test menu with css 019",                       test_ixhtml10_menu_tag_with_css_019);
1689   CU_add_test(ixhtml10_suite, "test menu with css 020",                       test_ixhtml10_menu_tag_with_css_020);
1690   CU_add_test(ixhtml10_suite, "test menu with css 021",                       test_ixhtml10_menu_tag_with_css_021);
1691   CU_add_test(ixhtml10_suite, "test menu with css 022",                       test_ixhtml10_menu_tag_with_css_022);
1692
1693   /*=========================================================================*/
1694   /* <PLAINTEXT>                                                             */
1695   /*=========================================================================*/
1696   CU_add_test(ixhtml10_suite, "test <plaintext> 1." ,                              test_ixhtml10_plaintext_tag_001);
1697   CU_add_test(ixhtml10_suite, "test <plaintext> 2." ,                              test_ixhtml10_plaintext_tag_002);
1698   CU_add_test(ixhtml10_suite, "test <plaintext> 3. value is not closed." ,         test_ixhtml10_plaintext_tag_003);
1699   CU_add_test(ixhtml10_suite, "test <plaintext> 3. value is not closed and hankaku." , test_ixhtml10_plaintext_tag_004);
1700
1701   /*=========================================================================*/
1702   /* <BLINK>                                                                 */
1703   /*=========================================================================*/
1704   CU_add_test(ixhtml10_suite, "test <blink> 1." ,                                  test_ixhtml10_blink_tag_001);
1705   CU_add_test(ixhtml10_suite, "test <blink> 2." ,                                  test_ixhtml10_blink_tag_002);
1706   CU_add_test(ixhtml10_suite, "test <blink> 3." ,                                  test_ixhtml10_blink_tag_003);
1707   CU_add_test(ixhtml10_suite, "test <blink> 4." ,                                  test_ixhtml10_blink_tag_004);
1708
1709   CU_add_test(ixhtml10_suite, "test blink with css 001",                       test_ixhtml10_blink_tag_with_css_001);
1710   CU_add_test(ixhtml10_suite, "test blink with css 002",                       test_ixhtml10_blink_tag_with_css_002);
1711   CU_add_test(ixhtml10_suite, "test blink with css 009",                       test_ixhtml10_blink_tag_with_css_009);
1712   CU_add_test(ixhtml10_suite, "test blink with css 010",                       test_ixhtml10_blink_tag_with_css_010);
1713   CU_add_test(ixhtml10_suite, "test blink with css 011",                       test_ixhtml10_blink_tag_with_css_011);
1714   CU_add_test(ixhtml10_suite, "test blink with css 012",                       test_ixhtml10_blink_tag_with_css_012);
1715   CU_add_test(ixhtml10_suite, "test blink with css 013",                       test_ixhtml10_blink_tag_with_css_013);
1716   CU_add_test(ixhtml10_suite, "test blink with css 014",                       test_ixhtml10_blink_tag_with_css_014);
1717   CU_add_test(ixhtml10_suite, "test blink with css 015",                       test_ixhtml10_blink_tag_with_css_015);
1718   CU_add_test(ixhtml10_suite, "test blink with css 016",                       test_ixhtml10_blink_tag_with_css_016);
1719   CU_add_test(ixhtml10_suite, "test blink with css 017",                       test_ixhtml10_blink_tag_with_css_017);
1720   CU_add_test(ixhtml10_suite, "test blink with css 018",                       test_ixhtml10_blink_tag_with_css_018);
1721   CU_add_test(ixhtml10_suite, "test blink with css 019",                       test_ixhtml10_blink_tag_with_css_019);
1722   CU_add_test(ixhtml10_suite, "test blink with css 020",                       test_ixhtml10_blink_tag_with_css_020);
1723   CU_add_test(ixhtml10_suite, "test blink with css 021",                       test_ixhtml10_blink_tag_with_css_021);
1724   CU_add_test(ixhtml10_suite, "test blink with css 022",                       test_ixhtml10_blink_tag_with_css_022);
1725
1726   /*=========================================================================*/
1727   /* <MARQUEE>                                                               */
1728   /*=========================================================================*/
1729   CU_add_test(ixhtml10_suite, "test <marquee> 1." ,                                test_ixhtml10_marquee_tag_001);
1730   CU_add_test(ixhtml10_suite, "test <marquee> 2." ,                                test_ixhtml10_marquee_tag_002);
1731   CU_add_test(ixhtml10_suite, "test <marquee> 3." ,                                test_ixhtml10_marquee_tag_003);
1732   CU_add_test(ixhtml10_suite, "test <marquee> 4." ,                                test_ixhtml10_marquee_tag_004);
1733   CU_add_test(ixhtml10_suite, "test <marquee> 5." ,                                test_ixhtml10_marquee_tag_005);
1734   CU_add_test(ixhtml10_suite, "test <marquee> 6." ,                                test_ixhtml10_marquee_tag_006);
1735   CU_add_test(ixhtml10_suite, "test <marquee> 7." ,                                test_ixhtml10_marquee_tag_007);
1736   CU_add_test(ixhtml10_suite, "test <marquee> 8." ,                                test_ixhtml10_marquee_tag_008);
1737   CU_add_test(ixhtml10_suite, "test <marquee> 9." ,                                test_ixhtml10_marquee_tag_009);
1738   CU_add_test(ixhtml10_suite, "test <marquee> 10." ,                               test_ixhtml10_marquee_tag_010);
1739   CU_add_test(ixhtml10_suite, "test <marquee> 11." ,                               test_ixhtml10_marquee_tag_011);
1740   CU_add_test(ixhtml10_suite, "test <marquee> 12." ,                               test_ixhtml10_marquee_tag_012);
1741   CU_add_test(ixhtml10_suite, "test <marquee> 13." ,                               test_ixhtml10_marquee_tag_013);
1742   CU_add_test(ixhtml10_suite, "test <marquee> 14." ,                               test_ixhtml10_marquee_tag_014);
1743   CU_add_test(ixhtml10_suite, "test <marquee> 15." ,                               test_ixhtml10_marquee_tag_015);
1744   CU_add_test(ixhtml10_suite, "test <marquee> 16." ,                               test_ixhtml10_marquee_tag_016);
1745   CU_add_test(ixhtml10_suite, "test <marquee> 17." ,                               test_ixhtml10_marquee_tag_017);
1746   CU_add_test(ixhtml10_suite, "test <marquee> 18." ,                               test_ixhtml10_marquee_tag_018);
1747   CU_add_test(ixhtml10_suite, "test <marquee> 19." ,                               test_ixhtml10_marquee_tag_019);
1748   CU_add_test(ixhtml10_suite, "test <marquee> 20." ,                               test_ixhtml10_marquee_tag_020);
1749   CU_add_test(ixhtml10_suite, "test <marquee> 21." ,                               test_ixhtml10_marquee_tag_021);
1750
1751   CU_add_test(ixhtml10_suite, "test marquee with css 001",                       test_ixhtml10_marquee_tag_with_css_001);
1752   CU_add_test(ixhtml10_suite, "test marquee with css 002",                       test_ixhtml10_marquee_tag_with_css_002);
1753   CU_add_test(ixhtml10_suite, "test marquee with css 009",                       test_ixhtml10_marquee_tag_with_css_009);
1754   CU_add_test(ixhtml10_suite, "test marquee with css 010",                       test_ixhtml10_marquee_tag_with_css_010);
1755   CU_add_test(ixhtml10_suite, "test marquee with css 011",                       test_ixhtml10_marquee_tag_with_css_011);
1756   CU_add_test(ixhtml10_suite, "test marquee with css 012",                       test_ixhtml10_marquee_tag_with_css_012);
1757   CU_add_test(ixhtml10_suite, "test marquee with css 013",                       test_ixhtml10_marquee_tag_with_css_013);
1758   CU_add_test(ixhtml10_suite, "test marquee with css 014",                       test_ixhtml10_marquee_tag_with_css_014);
1759   CU_add_test(ixhtml10_suite, "test marquee with css 015",                       test_ixhtml10_marquee_tag_with_css_015);
1760   CU_add_test(ixhtml10_suite, "test marquee with css 016",                       test_ixhtml10_marquee_tag_with_css_016);
1761   CU_add_test(ixhtml10_suite, "test marquee with css 017",                       test_ixhtml10_marquee_tag_with_css_017);
1762   CU_add_test(ixhtml10_suite, "test marquee with css 018",                       test_ixhtml10_marquee_tag_with_css_018);
1763   CU_add_test(ixhtml10_suite, "test marquee with css 019",                       test_ixhtml10_marquee_tag_with_css_019);
1764   CU_add_test(ixhtml10_suite, "test marquee with css 020",                       test_ixhtml10_marquee_tag_with_css_020);
1765   CU_add_test(ixhtml10_suite, "test marquee with css 021",                       test_ixhtml10_marquee_tag_with_css_021);
1766   CU_add_test(ixhtml10_suite, "test marquee with css 022",                       test_ixhtml10_marquee_tag_with_css_022);
1767
1768   /*=========================================================================*/
1769   /* <LINK>                                                                  */
1770   /*=========================================================================*/
1771   CU_add_test(ixhtml10_suite, "test link 001." ,                                    test_ixhtml10_link_001);
1772   CU_add_test(ixhtml10_suite, "test link 002." ,                                    test_ixhtml10_link_002);
1773   CU_add_test(ixhtml10_suite, "test link 003." ,                                    test_ixhtml10_link_003);
1774   CU_add_test(ixhtml10_suite, "test link 004." ,                                    test_ixhtml10_link_004);
1775   CU_add_test(ixhtml10_suite, "test link 005." ,                                    test_ixhtml10_link_005);
1776   CU_add_test(ixhtml10_suite, "test link 006." ,                                    test_ixhtml10_link_006);
1777   CU_add_test(ixhtml10_suite, "test link 007." ,                                    test_ixhtml10_link_007);
1778   CU_add_test(ixhtml10_suite, "test link 008." ,                                    test_ixhtml10_link_008);
1779   CU_add_test(ixhtml10_suite, "test link 009." ,                                    test_ixhtml10_link_009);
1780
1781   /*=========================================================================*/
1782   /* NLCODE                                                                  */
1783   /*=========================================================================*/
1784   CU_add_test(ixhtml10_suite, "test nlmark 001." ,                                    test_ixhtml10_nlmark_001);
1785   CU_add_test(ixhtml10_suite, "test nlmark 002." ,                                    test_ixhtml10_nlmark_002);
1786   CU_add_test(ixhtml10_suite, "test nlmark 003." ,                                    test_ixhtml10_nlmark_003);
1787   CU_add_test(ixhtml10_suite, "test nlmark 004." ,                                    test_ixhtml10_nlmark_004);
1788
1789   /*=========================================================================*/
1790   /* <HTML>                                                                  */
1791   /*=========================================================================*/
1792   CU_add_test(ixhtml10_suite, "test <html>.",                                      test_ixhtml10_html_tag_001);
1793
1794   /*=========================================================================*/
1795   /* <FORM>                                                                  */
1796   /*=========================================================================*/
1797   CU_add_test(ixhtml10_suite, "test <form>.",                                      test_ixhtml10_form_tag_001);
1798   CU_add_test(ixhtml10_suite, "test <form method>.",                               test_ixhtml10_form_tag_002);
1799   CU_add_test(ixhtml10_suite, "test <form method=\"post\">.",                      test_ixhtml10_form_tag_003);
1800   CU_add_test(ixhtml10_suite, "test <form method=\"get\">.",                       test_ixhtml10_form_tag_004);
1801   CU_add_test(ixhtml10_suite, "test <form method=\"abc\">.",                       test_ixhtml10_form_tag_005);
1802   CU_add_test(ixhtml10_suite, "test <form action>.",                               test_ixhtml10_form_tag_006);
1803   CU_add_test(ixhtml10_suite, "test <form action> with null cookie.",              test_ixhtml10_form_tag_007);
1804   CU_add_test(ixhtml10_suite, "test <form action> with other site .",              test_ixhtml10_form_tag_008);
1805   CU_add_test(ixhtml10_suite, "test <form action method>.",                        test_ixhtml10_form_tag_009);
1806
1807   /*=========================================================================*/
1808   /* <param>                                                                 */
1809   /*=========================================================================*/
1810   CU_add_test(ixhtml10_suite, "test <param> 1.",                                   test_ixhtml10_param_tag_001);
1811
1812   /* CSS */
1813
1814   CU_add_test(ixhtml10_suite, "test html with css 001",                             test_ixhtml10_html_tag_with_css_001);
1815   CU_add_test(ixhtml10_suite, "test meta with css 001",                             test_ixhtml10_meta_tag_with_css_001);
1816
1817
1818   CU_add_test(ixhtml10_suite, "test textarea with css 001",                         test_ixhtml10_textarea_tag_with_css_001);
1819   CU_add_test(ixhtml10_suite, "test textarea with css 002",                         test_ixhtml10_textarea_tag_with_css_002);
1820   CU_add_test(ixhtml10_suite, "test textarea with css 003",                         test_ixhtml10_textarea_tag_with_css_003);
1821   CU_add_test(ixhtml10_suite, "test textarea with css 004",                         test_ixhtml10_textarea_tag_with_css_004);
1822
1823   CU_add_test(ixhtml10_suite, "test textarea with css 005",                         test_ixhtml10_textarea_tag_with_css_005);
1824   CU_add_test(ixhtml10_suite, "test textarea with css 006",                         test_ixhtml10_textarea_tag_with_css_006);
1825   CU_add_test(ixhtml10_suite, "test textarea with css 007",                         test_ixhtml10_textarea_tag_with_css_007);
1826   CU_add_test(ixhtml10_suite, "test textarea with css 008",                         test_ixhtml10_textarea_tag_with_css_008);
1827
1828   CU_add_test(ixhtml10_suite, "test p with css 001",                                test_ixhtml10_p_tag_with_css_001);
1829   CU_add_test(ixhtml10_suite, "test p with css 002",                                test_ixhtml10_p_tag_with_css_002);
1830   CU_add_test(ixhtml10_suite, "test p with css 003",                                test_ixhtml10_p_tag_with_css_003);
1831   CU_add_test(ixhtml10_suite, "test p with css 004",                                test_ixhtml10_p_tag_with_css_004);
1832   CU_add_test(ixhtml10_suite, "test p with css 005",                                test_ixhtml10_p_tag_with_css_005);
1833   CU_add_test(ixhtml10_suite, "test p with css 006",                                test_ixhtml10_p_tag_with_css_006);
1834   CU_add_test(ixhtml10_suite, "test p with css 007",                                test_ixhtml10_p_tag_with_css_007);
1835   CU_add_test(ixhtml10_suite, "test p with css 008",                                test_ixhtml10_p_tag_with_css_008);
1836   CU_add_test(ixhtml10_suite, "test p with css 010",                                test_ixhtml10_p_tag_with_css_010);
1837   CU_add_test(ixhtml10_suite, "test p with css 011",                                test_ixhtml10_p_tag_with_css_011);
1838   CU_add_test(ixhtml10_suite, "test p with css 012",                                test_ixhtml10_p_tag_with_css_012);
1839   CU_add_test(ixhtml10_suite, "test p with css 013",                                test_ixhtml10_p_tag_with_css_013);
1840
1841   CU_add_test(ixhtml10_suite, "test ul with css 001",                               test_ixhtml10_ul_tag_with_css_001);
1842   CU_add_test(ixhtml10_suite, "test ul with css 002",                               test_ixhtml10_ul_tag_with_css_002);
1843   CU_add_test(ixhtml10_suite, "test ul with css 003",                               test_ixhtml10_ul_tag_with_css_003);
1844   CU_add_test(ixhtml10_suite, "test ul with css 004",                               test_ixhtml10_ul_tag_with_css_004);
1845   CU_add_test(ixhtml10_suite, "test ul with css 005",                               test_ixhtml10_ul_tag_with_css_005);
1846   CU_add_test(ixhtml10_suite, "test ul with css 006",                               test_ixhtml10_ul_tag_with_css_006);
1847   CU_add_test(ixhtml10_suite, "test ul with css 007",                               test_ixhtml10_ul_tag_with_css_007);
1848   CU_add_test(ixhtml10_suite, "test ul with css 008",                               test_ixhtml10_ul_tag_with_css_008);
1849   CU_add_test(ixhtml10_suite, "test ul with css 009",                               test_ixhtml10_ul_tag_with_css_009);
1850
1851   CU_add_test(ixhtml10_suite, "test li with css 001",                               test_ixhtml10_li_tag_with_css_001);
1852   CU_add_test(ixhtml10_suite, "test li with css 002",                               test_ixhtml10_li_tag_with_css_002);
1853   CU_add_test(ixhtml10_suite, "test li with css 003",                               test_ixhtml10_li_tag_with_css_003);
1854   CU_add_test(ixhtml10_suite, "test li with css 004",                               test_ixhtml10_li_tag_with_css_004);
1855   CU_add_test(ixhtml10_suite, "test li with css 005",                               test_ixhtml10_li_tag_with_css_005);
1856   CU_add_test(ixhtml10_suite, "test li with css 006",                               test_ixhtml10_li_tag_with_css_006);
1857   CU_add_test(ixhtml10_suite, "test li with css 007",                               test_ixhtml10_li_tag_with_css_007);
1858   CU_add_test(ixhtml10_suite, "test li with css 008",                               test_ixhtml10_li_tag_with_css_008);
1859   CU_add_test(ixhtml10_suite, "test li with css 009",                               test_ixhtml10_li_tag_with_css_009);
1860   CU_add_test(ixhtml10_suite, "test li with css 010",                               test_ixhtml10_li_tag_with_css_010);
1861   CU_add_test(ixhtml10_suite, "test li with css 011",                               test_ixhtml10_li_tag_with_css_011);
1862   CU_add_test(ixhtml10_suite, "test li with css 012",                               test_ixhtml10_li_tag_with_css_012);
1863
1864   CU_add_test(ixhtml10_suite, "test ol with css 001",                               test_ixhtml10_ol_tag_with_css_001);
1865   CU_add_test(ixhtml10_suite, "test ol with css 002",                               test_ixhtml10_ol_tag_with_css_002);
1866   CU_add_test(ixhtml10_suite, "test ol with css 003",                               test_ixhtml10_ol_tag_with_css_003);
1867   CU_add_test(ixhtml10_suite, "test ol with css 004",                               test_ixhtml10_ol_tag_with_css_004);
1868   CU_add_test(ixhtml10_suite, "test ol with css 005",                               test_ixhtml10_ol_tag_with_css_005);
1869   CU_add_test(ixhtml10_suite, "test ol with css 006",                               test_ixhtml10_ol_tag_with_css_006);
1870
1871   CU_add_test(ixhtml10_suite, "test h1 with css 001",                               test_ixhtml10_h1_tag_with_css_001);
1872   CU_add_test(ixhtml10_suite, "test h1 with css 002",                               test_ixhtml10_h1_tag_with_css_002);
1873   CU_add_test(ixhtml10_suite, "test h1 with css 003",                               test_ixhtml10_h1_tag_with_css_003);
1874   CU_add_test(ixhtml10_suite, "test h1 with css 004",                               test_ixhtml10_h1_tag_with_css_004);
1875   CU_add_test(ixhtml10_suite, "test h1 with css 005",                               test_ixhtml10_h1_tag_with_css_005);
1876   CU_add_test(ixhtml10_suite, "test h1 with css 006",                               test_ixhtml10_h1_tag_with_css_006);
1877
1878   CU_add_test(ixhtml10_suite, "test h2 with css 001",                               test_ixhtml10_h2_tag_with_css_001);
1879   CU_add_test(ixhtml10_suite, "test h2 with css 002",                               test_ixhtml10_h2_tag_with_css_002);
1880   CU_add_test(ixhtml10_suite, "test h2 with css 003",                               test_ixhtml10_h2_tag_with_css_003);
1881   CU_add_test(ixhtml10_suite, "test h2 with css 004",                               test_ixhtml10_h2_tag_with_css_004);
1882   CU_add_test(ixhtml10_suite, "test h2 with css 005",                               test_ixhtml10_h2_tag_with_css_005);
1883   CU_add_test(ixhtml10_suite, "test h2 with css 006",                               test_ixhtml10_h2_tag_with_css_006);
1884
1885   CU_add_test(ixhtml10_suite, "test h3 with css 001",                               test_ixhtml10_h3_tag_with_css_001);
1886   CU_add_test(ixhtml10_suite, "test h3 with css 002",                               test_ixhtml10_h3_tag_with_css_002);
1887   CU_add_test(ixhtml10_suite, "test h3 with css 003",                               test_ixhtml10_h3_tag_with_css_003);
1888   CU_add_test(ixhtml10_suite, "test h3 with css 004",                               test_ixhtml10_h3_tag_with_css_004);
1889   CU_add_test(ixhtml10_suite, "test h3 with css 005",                               test_ixhtml10_h3_tag_with_css_005);
1890   CU_add_test(ixhtml10_suite, "test h3 with css 006",                               test_ixhtml10_h3_tag_with_css_006);
1891
1892   CU_add_test(ixhtml10_suite, "test h4 with css 001",                               test_ixhtml10_h4_tag_with_css_001);
1893   CU_add_test(ixhtml10_suite, "test h4 with css 002",                               test_ixhtml10_h4_tag_with_css_002);
1894   CU_add_test(ixhtml10_suite, "test h4 with css 003",                               test_ixhtml10_h4_tag_with_css_003);
1895   CU_add_test(ixhtml10_suite, "test h4 with css 004",                               test_ixhtml10_h4_tag_with_css_004);
1896   CU_add_test(ixhtml10_suite, "test h4 with css 005",                               test_ixhtml10_h4_tag_with_css_005);
1897   CU_add_test(ixhtml10_suite, "test h4 with css 006",                               test_ixhtml10_h4_tag_with_css_006);
1898
1899   CU_add_test(ixhtml10_suite, "test h5 with css 001",                               test_ixhtml10_h5_tag_with_css_001);
1900   CU_add_test(ixhtml10_suite, "test h5 with css 002",                               test_ixhtml10_h5_tag_with_css_002);
1901   CU_add_test(ixhtml10_suite, "test h5 with css 003",                               test_ixhtml10_h5_tag_with_css_003);
1902   CU_add_test(ixhtml10_suite, "test h5 with css 004",                               test_ixhtml10_h5_tag_with_css_004);
1903   CU_add_test(ixhtml10_suite, "test h5 with css 005",                               test_ixhtml10_h5_tag_with_css_005);
1904   CU_add_test(ixhtml10_suite, "test h5 with css 006",                               test_ixhtml10_h5_tag_with_css_006);
1905
1906   CU_add_test(ixhtml10_suite, "test h6 with css 001",                               test_ixhtml10_h6_tag_with_css_001);
1907   CU_add_test(ixhtml10_suite, "test h6 with css 002",                               test_ixhtml10_h6_tag_with_css_002);
1908   CU_add_test(ixhtml10_suite, "test h6 with css 003",                               test_ixhtml10_h6_tag_with_css_003);
1909   CU_add_test(ixhtml10_suite, "test h6 with css 004",                               test_ixhtml10_h6_tag_with_css_004);
1910   CU_add_test(ixhtml10_suite, "test h6 with css 005",                               test_ixhtml10_h6_tag_with_css_005);
1911   CU_add_test(ixhtml10_suite, "test h6 with css 006",                               test_ixhtml10_h6_tag_with_css_006);
1912
1913   CU_add_test(ixhtml10_suite, "test body with css 001",                             test_ixhtml10_body_tag_with_css_001);
1914   CU_add_test(ixhtml10_suite, "test body with css 002",                             test_ixhtml10_body_tag_with_css_002);
1915   CU_add_test(ixhtml10_suite, "test body with css 003",                             test_ixhtml10_body_tag_with_css_003);
1916   CU_add_test(ixhtml10_suite, "test body with css 004",                             test_ixhtml10_body_tag_with_css_004);
1917
1918   CU_add_test(ixhtml10_suite, "test font with css 001",                             test_ixhtml10_font_tag_with_css_001);
1919   CU_add_test(ixhtml10_suite, "test font with css 002",                             test_ixhtml10_font_tag_with_css_002);
1920   CU_add_test(ixhtml10_suite, "test font with css 003",                             test_ixhtml10_font_tag_with_css_003);
1921   CU_add_test(ixhtml10_suite, "test font with css 004",                             test_ixhtml10_font_tag_with_css_004);
1922   CU_add_test(ixhtml10_suite, "test font with css 005",                             test_ixhtml10_font_tag_with_css_005);
1923   CU_add_test(ixhtml10_suite, "test font with css 006",                             test_ixhtml10_font_tag_with_css_006);
1924   CU_add_test(ixhtml10_suite, "test font with css 007",                             test_ixhtml10_font_tag_with_css_007);
1925   CU_add_test(ixhtml10_suite, "test font with css 008",                             test_ixhtml10_font_tag_with_css_008);
1926   CU_add_test(ixhtml10_suite, "test font with css 009",                             test_ixhtml10_font_tag_with_css_009);
1927   CU_add_test(ixhtml10_suite, "test font with css 010",                             test_ixhtml10_font_tag_with_css_010);
1928   CU_add_test(ixhtml10_suite, "test font with css 011",                             test_ixhtml10_font_tag_with_css_011);
1929   CU_add_test(ixhtml10_suite, "test font with css 012",                             test_ixhtml10_font_tag_with_css_012);
1930   CU_add_test(ixhtml10_suite, "test font with css 013",                             test_ixhtml10_font_tag_with_css_013);
1931   CU_add_test(ixhtml10_suite, "test font with css 014",                             test_ixhtml10_font_tag_with_css_014);
1932   CU_add_test(ixhtml10_suite, "test font with css 015",                             test_ixhtml10_font_tag_with_css_015);
1933   CU_add_test(ixhtml10_suite, "test font with css 016",                             test_ixhtml10_font_tag_with_css_016);
1934
1935   CU_add_test(ixhtml10_suite, "test form with css 001",                             test_ixhtml10_form_tag_with_css_001);
1936   CU_add_test(ixhtml10_suite, "test form with css 002",                             test_ixhtml10_form_tag_with_css_002);
1937   CU_add_test(ixhtml10_suite, "test form with css 003",                             test_ixhtml10_form_tag_with_css_003);
1938   CU_add_test(ixhtml10_suite, "test form with css 004",                             test_ixhtml10_form_tag_with_css_004);
1939   CU_add_test(ixhtml10_suite, "test form with css 005",                             test_ixhtml10_form_tag_with_css_005);
1940   CU_add_test(ixhtml10_suite, "test form with css 006",                             test_ixhtml10_form_tag_with_css_006);
1941   CU_add_test(ixhtml10_suite, "test form with css 007",                             test_ixhtml10_form_tag_with_css_007);
1942   CU_add_test(ixhtml10_suite, "test form with css 008",                             test_ixhtml10_form_tag_with_css_008);
1943
1944   CU_add_test(ixhtml10_suite, "test input with css 001",                            test_ixhtml10_input_tag_with_css_001);
1945   CU_add_test(ixhtml10_suite, "test input with css 002",                            test_ixhtml10_input_tag_with_css_002);
1946   CU_add_test(ixhtml10_suite, "test input with css 003",                            test_ixhtml10_input_tag_with_css_003);
1947   CU_add_test(ixhtml10_suite, "test input with css 004",                            test_ixhtml10_input_tag_with_css_004);
1948   CU_add_test(ixhtml10_suite, "test input with css 005",                            test_ixhtml10_input_tag_with_css_005);
1949   CU_add_test(ixhtml10_suite, "test input with css 006",                            test_ixhtml10_input_tag_with_css_006);
1950   CU_add_test(ixhtml10_suite, "test input with css 007",                            test_ixhtml10_input_tag_with_css_007);
1951   CU_add_test(ixhtml10_suite, "test input with css 008",                            test_ixhtml10_input_tag_with_css_008);
1952
1953   CU_add_test(ixhtml10_suite, "test center with css 001",                           test_ixhtml10_center_tag_with_css_001);
1954   CU_add_test(ixhtml10_suite, "test center with css 002",                           test_ixhtml10_center_tag_with_css_002);
1955   CU_add_test(ixhtml10_suite, "test center with css 003",                           test_ixhtml10_center_tag_with_css_003);
1956   CU_add_test(ixhtml10_suite, "test center with css 004",                           test_ixhtml10_center_tag_with_css_004);
1957   CU_add_test(ixhtml10_suite, "test center with css 005",                           test_ixhtml10_center_tag_with_css_005);
1958   CU_add_test(ixhtml10_suite, "test center with css 006",                           test_ixhtml10_center_tag_with_css_006);
1959   CU_add_test(ixhtml10_suite, "test center with css 007",                           test_ixhtml10_center_tag_with_css_007);
1960   CU_add_test(ixhtml10_suite, "test center with css 008",                           test_ixhtml10_center_tag_with_css_008);
1961   CU_add_test(ixhtml10_suite, "test center with css 009",                           test_ixhtml10_center_tag_with_css_009);
1962   CU_add_test(ixhtml10_suite, "test center with css 010",                           test_ixhtml10_center_tag_with_css_010);
1963   CU_add_test(ixhtml10_suite, "test center with css 011",                           test_ixhtml10_center_tag_with_css_011);
1964   CU_add_test(ixhtml10_suite, "test center with css 012",                           test_ixhtml10_center_tag_with_css_012);
1965   CU_add_test(ixhtml10_suite, "test center with css 013",                           test_ixhtml10_center_tag_with_css_013);
1966   CU_add_test(ixhtml10_suite, "test center with css 014",                           test_ixhtml10_center_tag_with_css_014);
1967   CU_add_test(ixhtml10_suite, "test center with css 015",                           test_ixhtml10_center_tag_with_css_015);
1968   CU_add_test(ixhtml10_suite, "test center with css 016",                           test_ixhtml10_center_tag_with_css_016);
1969
1970   CU_add_test(ixhtml10_suite, "test hr with css 001",                               test_ixhtml10_hr_tag_with_css_001);
1971   CU_add_test(ixhtml10_suite, "test hr with css 002",                               test_ixhtml10_hr_tag_with_css_002);
1972   CU_add_test(ixhtml10_suite, "test hr with css 003",                               test_ixhtml10_hr_tag_with_css_003);
1973   CU_add_test(ixhtml10_suite, "test hr with css 004",                               test_ixhtml10_hr_tag_with_css_004);
1974   CU_add_test(ixhtml10_suite, "test hr with css 005",                               test_ixhtml10_hr_tag_with_css_005);
1975   CU_add_test(ixhtml10_suite, "test hr with css 006",                               test_ixhtml10_hr_tag_with_css_006);
1976   CU_add_test(ixhtml10_suite, "test hr with css 007",                               test_ixhtml10_hr_tag_with_css_007);
1977   CU_add_test(ixhtml10_suite, "test hr with css 008",                               test_ixhtml10_hr_tag_with_css_008);
1978
1979   CU_add_test(ixhtml10_suite, "test img with css 001",                              test_ixhtml10_img_tag_with_css_001);
1980   CU_add_test(ixhtml10_suite, "test img with css 002",                              test_ixhtml10_img_tag_with_css_002);
1981   CU_add_test(ixhtml10_suite, "test img with css 003",                              test_ixhtml10_img_tag_with_css_003);
1982   CU_add_test(ixhtml10_suite, "test img with css 004",                              test_ixhtml10_img_tag_with_css_004);
1983   CU_add_test(ixhtml10_suite, "test img with css 005",                              test_ixhtml10_img_tag_with_css_005);
1984   CU_add_test(ixhtml10_suite, "test img with css 006",                              test_ixhtml10_img_tag_with_css_006);
1985   CU_add_test(ixhtml10_suite, "test img with css 007",                              test_ixhtml10_img_tag_with_css_007);
1986   CU_add_test(ixhtml10_suite, "test img with css 008",                              test_ixhtml10_img_tag_with_css_008);
1987   CU_add_test(ixhtml10_suite, "test img with css 009",                              test_ixhtml10_img_tag_with_css_009);
1988   CU_add_test(ixhtml10_suite, "test img with css 010",                              test_ixhtml10_img_tag_with_css_010);
1989
1990   CU_add_test(ixhtml10_suite, "test div with css 001",                              test_ixhtml10_div_tag_with_css_001);
1991   CU_add_test(ixhtml10_suite, "test div with css 002",                              test_ixhtml10_div_tag_with_css_002);
1992   CU_add_test(ixhtml10_suite, "test div with css 003",                              test_ixhtml10_div_tag_with_css_003);
1993   CU_add_test(ixhtml10_suite, "test div with css 004",                              test_ixhtml10_div_tag_with_css_004);
1994   CU_add_test(ixhtml10_suite, "test div with css 005",                              test_ixhtml10_div_tag_with_css_005);
1995   CU_add_test(ixhtml10_suite, "test div with css 006",                              test_ixhtml10_div_tag_with_css_006);
1996   CU_add_test(ixhtml10_suite, "test div with css 007",                              test_ixhtml10_div_tag_with_css_007);
1997   CU_add_test(ixhtml10_suite, "test div with css 008",                              test_ixhtml10_div_tag_with_css_008);
1998   CU_add_test(ixhtml10_suite, "test div with css 009",                              test_ixhtml10_div_tag_with_css_009);
1999   CU_add_test(ixhtml10_suite, "test div with css 010",                              test_ixhtml10_div_tag_with_css_010);
2000   CU_add_test(ixhtml10_suite, "test div with css 011",                              test_ixhtml10_div_tag_with_css_011);
2001   CU_add_test(ixhtml10_suite, "test div with css 012",                              test_ixhtml10_div_tag_with_css_012);
2002   CU_add_test(ixhtml10_suite, "test div with css 013",                              test_ixhtml10_div_tag_with_css_013);
2003   CU_add_test(ixhtml10_suite, "test div with css 014",                              test_ixhtml10_div_tag_with_css_014);
2004   CU_add_test(ixhtml10_suite, "test div with css 015",                              test_ixhtml10_div_tag_with_css_015);
2005   CU_add_test(ixhtml10_suite, "test div with css 016",                              test_ixhtml10_div_tag_with_css_016);
2006   CU_add_test(ixhtml10_suite, "test div with css 017",                              test_ixhtml10_div_tag_with_css_017);
2007   CU_add_test(ixhtml10_suite, "test div with css 018",                              test_ixhtml10_div_tag_with_css_018);
2008   CU_add_test(ixhtml10_suite, "test div with css 019",                              test_ixhtml10_div_tag_with_css_019);
2009   CU_add_test(ixhtml10_suite, "test div with css 020",                              test_ixhtml10_div_tag_with_css_020);
2010   CU_add_test(ixhtml10_suite, "test div with css 021",                              test_ixhtml10_div_tag_with_css_021);
2011   CU_add_test(ixhtml10_suite, "test div with css 022",                              test_ixhtml10_div_tag_with_css_022);
2012   CU_add_test(ixhtml10_suite, "test div with css 023",                              test_ixhtml10_div_tag_with_css_023);
2013   CU_add_test(ixhtml10_suite, "test div with css 024",                              test_ixhtml10_div_tag_with_css_024);
2014   CU_add_test(ixhtml10_suite, "test div with css 025",                              test_ixhtml10_div_tag_with_css_025);
2015   CU_add_test(ixhtml10_suite, "test div with css 026",                              test_ixhtml10_div_tag_with_css_026);
2016   CU_add_test(ixhtml10_suite, "test div with css 027",                              test_ixhtml10_div_tag_with_css_027);
2017   CU_add_test(ixhtml10_suite, "test div with css 028",                              test_ixhtml10_div_tag_with_css_028);
2018   CU_add_test(ixhtml10_suite, "test div with css 029",                              test_ixhtml10_div_tag_with_css_029);
2019   CU_add_test(ixhtml10_suite, "test div with css 030",                              test_ixhtml10_div_tag_with_css_030);
2020   CU_add_test(ixhtml10_suite, "test div with css 031",                              test_ixhtml10_div_tag_with_css_031);
2021   CU_add_test(ixhtml10_suite, "test div with css 032",                              test_ixhtml10_div_tag_with_css_032);
2022   CU_add_test(ixhtml10_suite, "test div with css 033",                              test_ixhtml10_div_tag_with_css_033);
2023   CU_add_test(ixhtml10_suite, "test div with css 034",                              test_ixhtml10_div_tag_with_css_034);
2024   CU_add_test(ixhtml10_suite, "test div with css 035",                              test_ixhtml10_div_tag_with_css_035);
2025   CU_add_test(ixhtml10_suite, "test div with css 036",                              test_ixhtml10_div_tag_with_css_036);
2026   CU_add_test(ixhtml10_suite, "test div with css 037",                              test_ixhtml10_div_tag_with_css_037);
2027   CU_add_test(ixhtml10_suite, "test div with css 038",                              test_ixhtml10_div_tag_with_css_038);
2028   CU_add_test(ixhtml10_suite, "test div with css 039",                              test_ixhtml10_div_tag_with_css_039);
2029   CU_add_test(ixhtml10_suite, "test div with css 040",                              test_ixhtml10_div_tag_with_css_040);
2030   CU_add_test(ixhtml10_suite, "test div with css 041",                              test_ixhtml10_div_tag_with_css_041);
2031   CU_add_test(ixhtml10_suite, "test div with css 042",                              test_ixhtml10_div_tag_with_css_042);
2032 #if 0
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043 #endif
2044   /* aend */
2045
2046   CU_basic_run_tests();
2047   CU_cleanup_registry();
2048
2049   return(0);
2050 }
2051
2052 void test_log_rerror(const char *file, int line, int level, apr_status_t status, const request_rec *r, const char *fmt, ...)
2053 {
2054   va_list ap;
2055   fprintf(stderr, "ERROR LOG %s:%d ", file,line);
2056   va_start(ap, fmt);
2057   vfprintf(stderr, fmt,ap);
2058   va_end(ap);
2059   fprintf(stderr, "\n");
2060 }
2061 void test_log_error(const char *file, int line, int level, apr_status_t status, const request_rec *r, const char *fmt, ...)
2062 {
2063   va_list ap;
2064   fprintf(stderr, "ERROR LOG %s:%d ", file,line);
2065   va_start(ap, fmt);
2066   vfprintf(stderr, fmt,ap);
2067   va_end(ap);
2068   fprintf(stderr, "\n");
2069 }
2070
2071 char *chxj_qr_code_blob_handler(request_rec* r, const char* indata, size_t* len)
2072 {
2073   return NULL;
2074 }
2075
2076 char *test_os_escape_path(apr_pool_t *p, const char *path, int partial)
2077 {
2078   return (char *)path;
2079 }
2080
2081 void test_set_content_type(request_rec *r, const char *ct)
2082 {
2083   fprintf(stderr, "%s:%d set_content_type(%s)\n", __FILE__,__LINE__,ct);
2084 }
2085
2086 const char *test_run_http_scheme(request_rec *r)
2087 {
2088   static char *s = "http";
2089   return s;
2090 }
2091
2092 static int v_new_line_type = NLTYPE_NONE;
2093 void * test_get_module_config(const ap_conf_vector_t *cv, const module *m)
2094 {
2095   static mod_chxj_config cfg;
2096   memset(&cfg, 0, sizeof(mod_chxj_config));
2097   cfg.new_line_type = v_new_line_type;
2098   return &cfg;
2099 }
2100
2101 chxjconvrule_entry *
2102 chxj_apply_convrule(request_rec* r, apr_array_header_t* convrules)
2103 {
2104   static chxjconvrule_entry entries;
2105   memset(&entries, 0, sizeof(chxjconvrule_entry));
2106   entries.encoding = apr_pstrdup(r->pool, "UTF8");
2107   return &entries;
2108 }
2109
2110 char *test_ap_escape_html(apr_pool_t *pool, const char *s)
2111 {
2112   return (char *)s;
2113 }
2114
2115 #define APR_INIT \
2116   request_rec r; \
2117   apr_pool_t *p; \
2118   do { \
2119     apr_initialize(); \
2120     apr_pool_create(&p, NULL); \
2121     r.pool = p; \
2122     r.hostname = apr_pstrdup(p, "localhost"); \
2123   } \
2124   while (0)
2125
2126 #define APR_TERM \
2127   do { \
2128     apr_terminate(); \
2129   } while (0)
2130
2131 #define COOKIE_INIT(X) \
2132   do { \
2133     X.cookie_id = "test_cookie_id"; \
2134     memset(&entry, 0, sizeof(chxjconvrule_entry)); \
2135     entry.action |= CONVRULE_COOKIE_ON_BIT; \
2136     entry.action |= CONVRULE_ENGINE_ON_BIT; \
2137   } while (0) \
2138
2139 #define SPEC_INIT(X) \
2140   do { \
2141     X.html_spec_type = CHXJ_SPEC_Chtml_6_0; \
2142   } while (0)
2143
2144
2145
2146 /*===========================================================================*/
2147 /* COMMENT                                                                   */
2148 /*===========================================================================*/
2149 void test_ixhtml10_001()
2150 {
2151 #define  TEST_STRING "<!-- comment -->"
2152 #define TEST_RESULT "\n"
2153   char  *ret;
2154   device_table spec;
2155   chxjconvrule_entry entry;
2156   cookie_t cookie;
2157   apr_size_t destlen;
2158   APR_INIT;
2159
2160   COOKIE_INIT(cookie);
2161
2162   SPEC_INIT(spec);
2163
2164   ret = chxj_convert_ixhtml10(&r, &spec, TEST_STRING, sizeof(TEST_STRING)-1, &destlen, &entry, &cookie);
2165   fprintf(stderr, "actual:[%s]\n", ret);
2166   fprintf(stderr, "expect:[%s]\n", TEST_RESULT);
2167   CU_ASSERT(ret != NULL);
2168   CU_ASSERT(strcmp("\n", ret) == 0);
2169   CU_ASSERT(destlen == 1);
2170
2171   APR_TERM;
2172 #undef TEST_STRING
2173 }
2174 void test_ixhtml10_002()
2175 {
2176 #define  TEST_STRING ""
2177 #define TEST_RESULT "\n"
2178   char  *ret;
2179   device_table spec;
2180   chxjconvrule_entry entry;
2181   cookie_t cookie;
2182   apr_size_t destlen;
2183   APR_INIT;
2184
2185   COOKIE_INIT(cookie);
2186
2187   SPEC_INIT(spec);
2188
2189   ret = chxj_convert_ixhtml10(&r, &spec, TEST_STRING, sizeof(TEST_STRING)-1, &destlen, &entry, &cookie);
2190   fprintf(stderr, "actual:[%s]\n", ret);
2191   fprintf(stderr, "expect:[%s]\n", TEST_RESULT);
2192   CU_ASSERT(ret != NULL);
2193   CU_ASSERT(strcmp("\n", ret) == 0);
2194   CU_ASSERT(destlen == 1);
2195
2196   APR_TERM;
2197 #undef TEST_STRING
2198 }
2199 void test_ixhtml10_comment_tag_001()
2200 {
2201 #define  TEST_STRING "<html><!--</html><body>--><head></head><body></body></html>"
2202 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
2203                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
2204                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
2205                        "<head></head><body></body></html>"
2206   char  *ret;
2207   device_table spec;
2208   chxjconvrule_entry entry;
2209   cookie_t cookie;
2210   apr_size_t destlen;
2211   APR_INIT;
2212
2213   COOKIE_INIT(cookie);
2214
2215   SPEC_INIT(spec);
2216
2217   ret = chxj_convert_ixhtml10(&r, &spec, TEST_STRING, sizeof(TEST_STRING)-1, &destlen, &entry, &cookie);
2218   fprintf(stderr, "actual:[%s]\n", ret);
2219   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2220   CU_ASSERT(ret != NULL);
2221   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2222   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2223
2224   APR_TERM;
2225 #undef TEST_STRING
2226 #undef RESULT_STRING
2227 }
2228
2229
2230
2231
2232 /*============================================================================*/
2233 /* <TEXTAREA>                                                                 */
2234 /*============================================================================*/
2235 void test_ixhtml10_textarea_tag_001()
2236 {
2237 #define  TEST_STRING "<textarea>"
2238 #define  RESULT_STRING "<textarea></textarea>"
2239   char  *ret;
2240   char  *tmp;
2241   device_table spec;
2242   chxjconvrule_entry entry;
2243   cookie_t cookie;
2244   apr_size_t destlen;
2245   APR_INIT;
2246
2247   COOKIE_INIT(cookie);
2248
2249   SPEC_INIT(spec);
2250   destlen = sizeof(TEST_STRING)-1;
2251
2252   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2253   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2254   ret = chxj_rencoding(&r, ret, &destlen);
2255   fprintf(stderr, "actual:[%s]\n", ret);
2256   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2257   CU_ASSERT(ret != NULL);
2258   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2259   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2260
2261   APR_TERM;
2262 #undef TEST_STRING
2263 #undef RESULT_STRING
2264 }
2265 void test_ixhtml10_textarea_tag_002()
2266 {
2267 #define  TEST_STRING "<textarea></textarea>"
2268 #define  RESULT_STRING "<textarea></textarea>"
2269   char  *ret;
2270   char  *tmp;
2271   device_table spec;
2272   chxjconvrule_entry entry;
2273   cookie_t cookie;
2274   apr_size_t destlen;
2275   APR_INIT;
2276
2277   COOKIE_INIT(cookie);
2278
2279   SPEC_INIT(spec);
2280   destlen = sizeof(TEST_STRING)-1;
2281
2282   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2283   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2284   ret = chxj_rencoding(&r, ret, &destlen);
2285   fprintf(stderr, "actual:[%s]\n", ret);
2286   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2287   CU_ASSERT(ret != NULL);
2288   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2289   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2290
2291   APR_TERM;
2292 #undef TEST_STRING
2293 #undef RESULT_STRING
2294 }
2295 void test_ixhtml10_textarea_tag_003()
2296 {
2297 #define  TEST_STRING "<textarea>あああ</textarea>"
2298 #define  RESULT_STRING "<textarea>あああ</textarea>"
2299   char  *ret;
2300   char  *tmp;
2301   device_table spec;
2302   chxjconvrule_entry entry;
2303   cookie_t cookie;
2304   apr_size_t destlen;
2305   APR_INIT;
2306
2307   COOKIE_INIT(cookie);
2308
2309   SPEC_INIT(spec);
2310   destlen = sizeof(TEST_STRING)-1;
2311
2312   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2313   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2314   ret = chxj_rencoding(&r, ret, &destlen);
2315   fprintf(stderr, "actual:[%s]\n", ret);
2316   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2317   CU_ASSERT(ret != NULL);
2318   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2319   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2320
2321   APR_TERM;
2322 #undef TEST_STRING
2323 #undef RESULT_STRING
2324 }
2325 void test_ixhtml10_textarea_tag_004()
2326 {
2327 #define  TEST_STRING "<textarea>あああ\nいいい</textarea>"
2328 #define  RESULT_STRING "<textarea>あああ\nいいい</textarea>"
2329   char  *ret;
2330   char  *tmp;
2331   device_table spec;
2332   chxjconvrule_entry entry;
2333   cookie_t cookie;
2334   apr_size_t destlen;
2335   APR_INIT;
2336
2337   COOKIE_INIT(cookie);
2338
2339   SPEC_INIT(spec);
2340   destlen = sizeof(TEST_STRING)-1;
2341
2342   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2343   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2344   ret = chxj_rencoding(&r, ret, &destlen);
2345   fprintf(stderr, "actual:[%s]\n", ret);
2346   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2347   CU_ASSERT(ret != NULL);
2348   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2349   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2350
2351   APR_TERM;
2352 #undef TEST_STRING
2353 #undef RESULT_STRING
2354 }
2355 void test_ixhtml10_textarea_tag_005()
2356 {
2357 #define  TEST_STRING "<textarea>あああ\r\nいいい</textarea>"
2358 #define  RESULT_STRING "<textarea>あああ\r\nいいい</textarea>"
2359   char  *ret;
2360   char  *tmp;
2361   device_table spec;
2362   chxjconvrule_entry entry;
2363   cookie_t cookie;
2364   apr_size_t destlen;
2365   APR_INIT;
2366
2367   COOKIE_INIT(cookie);
2368
2369   SPEC_INIT(spec);
2370   destlen = sizeof(TEST_STRING)-1;
2371
2372   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2373   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2374   ret = chxj_rencoding(&r, ret, &destlen);
2375   fprintf(stderr, "actual:[%s]\n", ret);
2376   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2377   CU_ASSERT(ret != NULL);
2378   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2379   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2380
2381   APR_TERM;
2382 #undef TEST_STRING
2383 #undef RESULT_STRING
2384 }
2385 void test_ixhtml10_textarea_tag_006()
2386 {
2387 #define  TEST_STRING "<textarea>あああ\r\nいいい\n</textarea>"
2388 #define  RESULT_STRING "<textarea>あああ\r\nいいい\n</textarea>"
2389   char  *ret;
2390   char  *tmp;
2391   device_table spec;
2392   chxjconvrule_entry entry;
2393   cookie_t cookie;
2394   apr_size_t destlen;
2395   APR_INIT;
2396
2397   COOKIE_INIT(cookie);
2398
2399   SPEC_INIT(spec);
2400   destlen = sizeof(TEST_STRING)-1;
2401
2402   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2403   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2404   ret = chxj_rencoding(&r, ret, &destlen);
2405   fprintf(stderr, "actual:[%s]\n", ret);
2406   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2407   CU_ASSERT(ret != NULL);
2408   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2409   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2410
2411   APR_TERM;
2412 #undef TEST_STRING
2413 #undef RESULT_STRING
2414 }
2415 void test_ixhtml10_textarea_tag_007()
2416 {
2417 #define  TEST_STRING "<textarea>あああ\r\nいいい\r\n</textarea>"
2418 #define  RESULT_STRING "<textarea>あああ\r\nいいい\r\n</textarea>"
2419   char  *ret;
2420   char  *tmp;
2421   device_table spec;
2422   chxjconvrule_entry entry;
2423   cookie_t cookie;
2424   apr_size_t destlen;
2425   APR_INIT;
2426
2427   COOKIE_INIT(cookie);
2428
2429   SPEC_INIT(spec);
2430   destlen = sizeof(TEST_STRING)-1;
2431
2432   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2433   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2434   ret = chxj_rencoding(&r, ret, &destlen);
2435   fprintf(stderr, "actual:[%s]\n", ret);
2436   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2437   CU_ASSERT(ret != NULL);
2438   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2439   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2440
2441   APR_TERM;
2442 #undef TEST_STRING
2443 #undef RESULT_STRING
2444 }
2445 void test_ixhtml10_textarea_tag_008()
2446 {
2447 #define  TEST_STRING "<textarea name></textarea>"
2448 #define  RESULT_STRING "<textarea></textarea>"
2449   char  *ret;
2450   char  *tmp;
2451   device_table spec;
2452   chxjconvrule_entry entry;
2453   cookie_t cookie;
2454   apr_size_t destlen;
2455   APR_INIT;
2456
2457   COOKIE_INIT(cookie);
2458
2459   SPEC_INIT(spec);
2460   destlen = sizeof(TEST_STRING)-1;
2461
2462   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2463   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2464   ret = chxj_rencoding(&r, ret, &destlen);
2465   fprintf(stderr, "actual:[%s]\n", ret);
2466   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2467   CU_ASSERT(ret != NULL);
2468   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2469   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2470
2471   APR_TERM;
2472 #undef TEST_STRING
2473 #undef RESULT_STRING
2474 }
2475 void test_ixhtml10_textarea_tag_009()
2476 {
2477 #define  TEST_STRING "<textarea name=\"\"></textarea>"
2478 #define  RESULT_STRING "<textarea></textarea>"
2479   char  *ret;
2480   char  *tmp;
2481   device_table spec;
2482   chxjconvrule_entry entry;
2483   cookie_t cookie;
2484   apr_size_t destlen;
2485   APR_INIT;
2486
2487   COOKIE_INIT(cookie);
2488
2489   SPEC_INIT(spec);
2490   destlen = sizeof(TEST_STRING)-1;
2491
2492   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2493   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2494   ret = chxj_rencoding(&r, ret, &destlen);
2495   fprintf(stderr, "actual:[%s]\n", ret);
2496   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2497   CU_ASSERT(ret != NULL);
2498   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2499   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2500
2501   APR_TERM;
2502 #undef TEST_STRING
2503 #undef RESULT_STRING
2504 }
2505 void test_ixhtml10_textarea_tag_010()
2506 {
2507 #define  TEST_STRING "<textarea name=\"aaa\"></textarea>"
2508 #define  RESULT_STRING "<textarea name=\"aaa\"></textarea>"
2509   char  *ret;
2510   char  *tmp;
2511   device_table spec;
2512   chxjconvrule_entry entry;
2513   cookie_t cookie;
2514   apr_size_t destlen;
2515   APR_INIT;
2516
2517   COOKIE_INIT(cookie);
2518
2519   SPEC_INIT(spec);
2520   destlen = sizeof(TEST_STRING)-1;
2521
2522   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2523   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2524   ret = chxj_rencoding(&r, ret, &destlen);
2525   fprintf(stderr, "actual:[%s]\n", ret);
2526   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2527   CU_ASSERT(ret != NULL);
2528   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2529   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2530
2531   APR_TERM;
2532 #undef TEST_STRING
2533 #undef RESULT_STRING
2534 }
2535 void test_ixhtml10_textarea_tag_011()
2536 {
2537 #define  TEST_STRING "<textarea rows></textarea>"
2538 #define  RESULT_STRING "<textarea></textarea>"
2539   char  *ret;
2540   char  *tmp;
2541   device_table spec;
2542   chxjconvrule_entry entry;
2543   cookie_t cookie;
2544   apr_size_t destlen;
2545   APR_INIT;
2546
2547   COOKIE_INIT(cookie);
2548
2549   SPEC_INIT(spec);
2550   destlen = sizeof(TEST_STRING)-1;
2551
2552   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2553   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2554   ret = chxj_rencoding(&r, ret, &destlen);
2555   fprintf(stderr, "actual:[%s]\n", ret);
2556   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2557   CU_ASSERT(ret != NULL);
2558   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2559   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2560
2561   APR_TERM;
2562 #undef TEST_STRING
2563 #undef RESULT_STRING
2564 }
2565 void test_ixhtml10_textarea_tag_012()
2566 {
2567 #define  TEST_STRING "<textarea rows=\"\"></textarea>"
2568 #define  RESULT_STRING "<textarea></textarea>"
2569   char  *ret;
2570   char  *tmp;
2571   device_table spec;
2572   chxjconvrule_entry entry;
2573   cookie_t cookie;
2574   apr_size_t destlen;
2575   APR_INIT;
2576
2577   COOKIE_INIT(cookie);
2578
2579   SPEC_INIT(spec);
2580   destlen = sizeof(TEST_STRING)-1;
2581
2582   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2583   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2584   ret = chxj_rencoding(&r, ret, &destlen);
2585   fprintf(stderr, "actual:[%s]\n", ret);
2586   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2587   CU_ASSERT(ret != NULL);
2588   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2589   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2590
2591   APR_TERM;
2592 #undef TEST_STRING
2593 #undef RESULT_STRING
2594 }
2595 void test_ixhtml10_textarea_tag_013()
2596 {
2597 #define  TEST_STRING "<textarea rows=\"abc\"></textarea>"
2598 #define  RESULT_STRING "<textarea rows=\"abc\"></textarea>"
2599   char  *ret;
2600   char  *tmp;
2601   device_table spec;
2602   chxjconvrule_entry entry;
2603   cookie_t cookie;
2604   apr_size_t destlen;
2605   APR_INIT;
2606
2607   COOKIE_INIT(cookie);
2608
2609   SPEC_INIT(spec);
2610   destlen = sizeof(TEST_STRING)-1;
2611
2612   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2613   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2614   ret = chxj_rencoding(&r, ret, &destlen);
2615   fprintf(stderr, "actual:[%s]\n", ret);
2616   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2617   CU_ASSERT(ret != NULL);
2618   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2619   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2620
2621   APR_TERM;
2622 #undef TEST_STRING
2623 #undef RESULT_STRING
2624 }
2625 void test_ixhtml10_textarea_tag_014()
2626 {
2627 #define  TEST_STRING "<textarea cols></textarea>"
2628 #define  RESULT_STRING "<textarea></textarea>"
2629   char  *ret;
2630   char  *tmp;
2631   device_table spec;
2632   chxjconvrule_entry entry;
2633   cookie_t cookie;
2634   apr_size_t destlen;
2635   APR_INIT;
2636
2637   COOKIE_INIT(cookie);
2638
2639   SPEC_INIT(spec);
2640   destlen = sizeof(TEST_STRING)-1;
2641
2642   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2643   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2644   ret = chxj_rencoding(&r, ret, &destlen);
2645   fprintf(stderr, "actual:[%s]\n", ret);
2646   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2647   CU_ASSERT(ret != NULL);
2648   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2649   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2650
2651   APR_TERM;
2652 #undef TEST_STRING
2653 #undef RESULT_STRING
2654 }
2655 void test_ixhtml10_textarea_tag_015()
2656 {
2657 #define  TEST_STRING "<textarea cols=\"\"></textarea>"
2658 #define  RESULT_STRING "<textarea></textarea>"
2659   char  *ret;
2660   char  *tmp;
2661   device_table spec;
2662   chxjconvrule_entry entry;
2663   cookie_t cookie;
2664   apr_size_t destlen;
2665   APR_INIT;
2666
2667   COOKIE_INIT(cookie);
2668
2669   SPEC_INIT(spec);
2670   destlen = sizeof(TEST_STRING)-1;
2671
2672   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2673   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2674   ret = chxj_rencoding(&r, ret, &destlen);
2675   fprintf(stderr, "actual:[%s]\n", ret);
2676   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2677   CU_ASSERT(ret != NULL);
2678   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2679   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2680
2681   APR_TERM;
2682 #undef TEST_STRING
2683 #undef RESULT_STRING
2684 }
2685 void test_ixhtml10_textarea_tag_016()
2686 {
2687 #define  TEST_STRING "<textarea cols=\"123\"></textarea>"
2688 #define  RESULT_STRING "<textarea cols=\"123\"></textarea>"
2689   char  *ret;
2690   char  *tmp;
2691   device_table spec;
2692   chxjconvrule_entry entry;
2693   cookie_t cookie;
2694   apr_size_t destlen;
2695   APR_INIT;
2696
2697   COOKIE_INIT(cookie);
2698
2699   SPEC_INIT(spec);
2700   destlen = sizeof(TEST_STRING)-1;
2701
2702   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2703   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2704   ret = chxj_rencoding(&r, ret, &destlen);
2705   fprintf(stderr, "actual:[%s]\n", ret);
2706   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2707   CU_ASSERT(ret != NULL);
2708   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2709   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2710
2711   APR_TERM;
2712 #undef TEST_STRING
2713 #undef RESULT_STRING
2714 }
2715 void test_ixhtml10_textarea_tag_017()
2716 {
2717 #define  TEST_STRING "<textarea accesskey></textarea>"
2718 #define  RESULT_STRING "<textarea></textarea>"
2719   char  *ret;
2720   char  *tmp;
2721   device_table spec;
2722   chxjconvrule_entry entry;
2723   cookie_t cookie;
2724   apr_size_t destlen;
2725   APR_INIT;
2726
2727   COOKIE_INIT(cookie);
2728
2729   SPEC_INIT(spec);
2730   destlen = sizeof(TEST_STRING)-1;
2731
2732   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2733   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2734   ret = chxj_rencoding(&r, ret, &destlen);
2735   fprintf(stderr, "actual:[%s]\n", ret);
2736   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2737   CU_ASSERT(ret != NULL);
2738   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2739   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2740
2741   APR_TERM;
2742 #undef TEST_STRING
2743 #undef RESULT_STRING
2744 }
2745 void test_ixhtml10_textarea_tag_018()
2746 {
2747 #define  TEST_STRING "<textarea accesskey=\"\"></textarea>"
2748 #define  RESULT_STRING "<textarea></textarea>"
2749   char  *ret;
2750   char  *tmp;
2751   device_table spec;
2752   chxjconvrule_entry entry;
2753   cookie_t cookie;
2754   apr_size_t destlen;
2755   APR_INIT;
2756
2757   COOKIE_INIT(cookie);
2758
2759   SPEC_INIT(spec);
2760   destlen = sizeof(TEST_STRING)-1;
2761
2762   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2763   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2764   ret = chxj_rencoding(&r, ret, &destlen);
2765   fprintf(stderr, "actual:[%s]\n", ret);
2766   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2767   CU_ASSERT(ret != NULL);
2768   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2769   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2770
2771   APR_TERM;
2772 #undef TEST_STRING
2773 #undef RESULT_STRING
2774 }
2775 void test_ixhtml10_textarea_tag_019()
2776 {
2777 #define  TEST_STRING "<textarea accesskey=\"10\"></textarea>"
2778 #define  RESULT_STRING "<textarea accesskey=\"10\"></textarea>"
2779   char  *ret;
2780   char  *tmp;
2781   device_table spec;
2782   chxjconvrule_entry entry;
2783   cookie_t cookie;
2784   apr_size_t destlen;
2785   APR_INIT;
2786
2787   COOKIE_INIT(cookie);
2788
2789   SPEC_INIT(spec);
2790   destlen = sizeof(TEST_STRING)-1;
2791
2792   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2793   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2794   ret = chxj_rencoding(&r, ret, &destlen);
2795   fprintf(stderr, "actual:[%s]\n", ret);
2796   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2797   CU_ASSERT(ret != NULL);
2798   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2799   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2800
2801   APR_TERM;
2802 #undef TEST_STRING
2803 #undef RESULT_STRING
2804 }
2805 void test_ixhtml10_textarea_tag_020()
2806 {
2807 #define  TEST_STRING "<textarea istyle></textarea>"
2808 #define  RESULT_STRING "<textarea></textarea>"
2809   char  *ret;
2810   char  *tmp;
2811   device_table spec;
2812   chxjconvrule_entry entry;
2813   cookie_t cookie;
2814   apr_size_t destlen;
2815   APR_INIT;
2816
2817   COOKIE_INIT(cookie);
2818
2819   SPEC_INIT(spec);
2820   destlen = sizeof(TEST_STRING)-1;
2821
2822   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2823   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2824   ret = chxj_rencoding(&r, ret, &destlen);
2825   fprintf(stderr, "actual:[%s]\n", ret);
2826   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2827   CU_ASSERT(ret != NULL);
2828   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2829   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2830
2831   APR_TERM;
2832 #undef TEST_STRING
2833 #undef RESULT_STRING
2834 }
2835 void test_ixhtml10_textarea_tag_021()
2836 {
2837 #define  TEST_STRING "<textarea istyle=\"\"></textarea>"
2838 #define  RESULT_STRING "<textarea></textarea>"
2839   char  *ret;
2840   char  *tmp;
2841   device_table spec;
2842   chxjconvrule_entry entry;
2843   cookie_t cookie;
2844   apr_size_t destlen;
2845   APR_INIT;
2846
2847   COOKIE_INIT(cookie);
2848
2849   SPEC_INIT(spec);
2850   destlen = sizeof(TEST_STRING)-1;
2851
2852   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2853   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2854   ret = chxj_rencoding(&r, ret, &destlen);
2855   fprintf(stderr, "actual:[%s]\n", ret);
2856   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2857   CU_ASSERT(ret != NULL);
2858   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2859   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2860
2861   APR_TERM;
2862 #undef TEST_STRING
2863 #undef RESULT_STRING
2864 }
2865 void test_ixhtml10_textarea_tag_022()
2866 {
2867 #define  TEST_STRING "<textarea istyle=\"1\"></textarea>"
2868 #define  RESULT_STRING "<textarea style=\"-wap-input-format:&quot;*&lt;ja:h&gt;&quot;;\"></textarea>"
2869   char  *ret;
2870   char  *tmp;
2871   device_table spec;
2872   chxjconvrule_entry entry;
2873   cookie_t cookie;
2874   apr_size_t destlen;
2875   APR_INIT;
2876
2877   COOKIE_INIT(cookie);
2878
2879   SPEC_INIT(spec);
2880   destlen = sizeof(TEST_STRING)-1;
2881
2882   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2883   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2884   ret = chxj_rencoding(&r, ret, &destlen);
2885   fprintf(stderr, "actual:[%s]\n", ret);
2886   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2887   CU_ASSERT(ret != NULL);
2888   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2889   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2890
2891   APR_TERM;
2892 #undef TEST_STRING
2893 #undef RESULT_STRING
2894 }
2895 void test_ixhtml10_textarea_tag_023()
2896 {
2897 #define  TEST_STRING "<textarea istyle=\"2\"></textarea>"
2898 #define  RESULT_STRING "<textarea style=\"-wap-input-format:&quot;*&lt;ja:hk&gt;&quot;;\"></textarea>"
2899   char  *ret;
2900   char  *tmp;
2901   device_table spec;
2902   chxjconvrule_entry entry;
2903   cookie_t cookie;
2904   apr_size_t destlen;
2905   APR_INIT;
2906
2907   COOKIE_INIT(cookie);
2908
2909   SPEC_INIT(spec);
2910   destlen = sizeof(TEST_STRING)-1;
2911
2912   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2913   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2914   ret = chxj_rencoding(&r, ret, &destlen);
2915   fprintf(stderr, "actual:[%s]\n", ret);
2916   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2917   CU_ASSERT(ret != NULL);
2918   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2919   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2920
2921   APR_TERM;
2922 #undef TEST_STRING
2923 #undef RESULT_STRING
2924 }
2925 void test_ixhtml10_textarea_tag_024()
2926 {
2927 #define  TEST_STRING "<textarea istyle=\"3\"></textarea>"
2928 #define  RESULT_STRING "<textarea style=\"-wap-input-format:&quot;*&lt;ja:en&gt;&quot;;\"></textarea>"
2929   char  *ret;
2930   char  *tmp;
2931   device_table spec;
2932   chxjconvrule_entry entry;
2933   cookie_t cookie;
2934   apr_size_t destlen;
2935   APR_INIT;
2936
2937   COOKIE_INIT(cookie);
2938
2939   SPEC_INIT(spec);
2940   destlen = sizeof(TEST_STRING)-1;
2941
2942   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2943   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2944   ret = chxj_rencoding(&r, ret, &destlen);
2945   fprintf(stderr, "actual:[%s]\n", ret);
2946   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2947   CU_ASSERT(ret != NULL);
2948   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2949   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2950
2951   APR_TERM;
2952 #undef TEST_STRING
2953 #undef RESULT_STRING
2954 }
2955 void test_ixhtml10_textarea_tag_025()
2956 {
2957 #define  TEST_STRING "<textarea istyle=\"4\"></textarea>"
2958 #define  RESULT_STRING "<textarea style=\"-wap-input-format:&quot;*&lt;ja:n&gt;&quot;;\"></textarea>"
2959   char  *ret;
2960   char  *tmp;
2961   device_table spec;
2962   chxjconvrule_entry entry;
2963   cookie_t cookie;
2964   apr_size_t destlen;
2965   APR_INIT;
2966
2967   COOKIE_INIT(cookie);
2968
2969   SPEC_INIT(spec);
2970   destlen = sizeof(TEST_STRING)-1;
2971
2972   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
2973   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
2974   ret = chxj_rencoding(&r, ret, &destlen);
2975   fprintf(stderr, "actual:[%s]\n", ret);
2976   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
2977   CU_ASSERT(ret != NULL);
2978   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
2979   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
2980
2981   APR_TERM;
2982 #undef TEST_STRING
2983 #undef RESULT_STRING
2984 }
2985 void test_ixhtml10_textarea_tag_026()
2986 {
2987 #define  TEST_STRING "<textarea istyle=\"a\"></textarea>"
2988 #define  RESULT_STRING "<textarea></textarea>"
2989   char  *ret;
2990   char  *tmp;
2991   device_table spec;
2992   chxjconvrule_entry entry;
2993   cookie_t cookie;
2994   apr_size_t destlen;
2995   APR_INIT;
2996
2997   COOKIE_INIT(cookie);
2998
2999   SPEC_INIT(spec);
3000   destlen = sizeof(TEST_STRING)-1;
3001
3002   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3003   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3004   ret = chxj_rencoding(&r, ret, &destlen);
3005   fprintf(stderr, "actual:[%s]\n", ret);
3006   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3007   CU_ASSERT(ret != NULL);
3008   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3009   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3010
3011   APR_TERM;
3012 #undef TEST_STRING
3013 #undef RESULT_STRING
3014 }
3015 /*============================================================================*/
3016 /* <P>                                                                        */
3017 /*============================================================================*/
3018 void test_ixhtml10_p_tag_001()
3019 {
3020 #define  TEST_STRING "<p></p>"
3021 #define  RESULT_STRING "<p></p>"
3022   char  *ret;
3023   char  *tmp;
3024   device_table       spec;
3025   chxjconvrule_entry entry;
3026   cookie_t           cookie;
3027   apr_size_t destlen;
3028   APR_INIT;
3029
3030   COOKIE_INIT(cookie);
3031
3032   SPEC_INIT(spec);
3033   destlen = sizeof(TEST_STRING)-1;
3034
3035   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3036   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3037   ret = chxj_rencoding(&r, ret, &destlen);
3038   fprintf(stderr, "actual:[%s]\n", ret);
3039   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3040   CU_ASSERT(ret != NULL);
3041   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3042   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3043
3044   APR_TERM;
3045 #undef TEST_STRING
3046 #undef RESULT_STRING
3047 }
3048 void test_ixhtml10_p_tag_002()
3049 {
3050 #define  TEST_STRING "<p>あああ</p>"
3051 #define  RESULT_STRING "<p>あああ</p>"
3052   char  *ret;
3053   char  *tmp;
3054   device_table spec;
3055   chxjconvrule_entry entry;
3056   cookie_t cookie;
3057   apr_size_t destlen;
3058   APR_INIT;
3059
3060   COOKIE_INIT(cookie);
3061
3062   SPEC_INIT(spec);
3063   destlen = sizeof(TEST_STRING)-1;
3064
3065   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3066   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3067   ret = chxj_rencoding(&r, ret, &destlen);
3068   fprintf(stderr, "actual:[%s]\n", ret);
3069   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3070   CU_ASSERT(ret != NULL);
3071   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3072   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3073
3074   APR_TERM;
3075 #undef TEST_STRING
3076 #undef RESULT_STRING
3077 }
3078 void test_ixhtml10_p_tag_003()
3079 {
3080 #define  TEST_STRING "<p align>あああ</p>"
3081 #define  RESULT_STRING "<p>あああ</p>"
3082   char  *ret;
3083   char  *tmp;
3084   device_table spec;
3085   chxjconvrule_entry entry;
3086   cookie_t cookie;
3087   apr_size_t destlen;
3088   APR_INIT;
3089
3090   COOKIE_INIT(cookie);
3091
3092   SPEC_INIT(spec);
3093   destlen = sizeof(TEST_STRING)-1;
3094
3095   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3096   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3097   ret = chxj_rencoding(&r, ret, &destlen);
3098   fprintf(stderr, "actual:[%s]\n", ret);
3099   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3100   CU_ASSERT(ret != NULL);
3101   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3102   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3103
3104   APR_TERM;
3105 #undef TEST_STRING
3106 #undef RESULT_STRING
3107 }
3108 void test_ixhtml10_p_tag_004()
3109 {
3110 #define  TEST_STRING "<p align=\"\">あああ</p>"
3111 #define  RESULT_STRING "<p>あああ</p>"
3112   char  *ret;
3113   char  *tmp;
3114   device_table spec;
3115   chxjconvrule_entry entry;
3116   cookie_t cookie;
3117   apr_size_t destlen;
3118   APR_INIT;
3119
3120   COOKIE_INIT(cookie);
3121
3122   SPEC_INIT(spec);
3123   destlen = sizeof(TEST_STRING)-1;
3124
3125   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3126   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3127   ret = chxj_rencoding(&r, ret, &destlen);
3128   fprintf(stderr, "actual:[%s]\n", ret);
3129   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3130   CU_ASSERT(ret != NULL);
3131   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3132   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3133
3134   APR_TERM;
3135 #undef TEST_STRING
3136 #undef RESULT_STRING
3137 }
3138 void test_ixhtml10_p_tag_005()
3139 {
3140 #define  TEST_STRING "<p align=\"right\">あああ</p>"
3141 #define  RESULT_STRING "<p style=\"text-align:right;\">あああ</p>"
3142   char  *ret;
3143   char  *tmp;
3144   device_table spec;
3145   chxjconvrule_entry entry;
3146   cookie_t cookie;
3147   apr_size_t destlen;
3148   APR_INIT;
3149
3150   COOKIE_INIT(cookie);
3151
3152   SPEC_INIT(spec);
3153   destlen = sizeof(TEST_STRING)-1;
3154
3155   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3156   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3157   ret = chxj_rencoding(&r, ret, &destlen);
3158   fprintf(stderr, "actual:[%s]\n", ret);
3159   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3160   CU_ASSERT(ret != NULL);
3161   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3162   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3163
3164   APR_TERM;
3165 #undef TEST_STRING
3166 #undef RESULT_STRING
3167 }
3168 void test_ixhtml10_p_tag_006()
3169 {
3170 #define  TEST_STRING "<p align=\"left\">あああ</p>"
3171 #define  RESULT_STRING "<p style=\"text-align:left;\">あああ</p>"
3172   char  *ret;
3173   char  *tmp;
3174   device_table spec;
3175   chxjconvrule_entry entry;
3176   cookie_t cookie;
3177   apr_size_t destlen;
3178   APR_INIT;
3179
3180   COOKIE_INIT(cookie);
3181
3182   SPEC_INIT(spec);
3183   destlen = sizeof(TEST_STRING)-1;
3184
3185   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3186   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3187   ret = chxj_rencoding(&r, ret, &destlen);
3188   fprintf(stderr, "actual:[%s]\n", ret);
3189   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3190   CU_ASSERT(ret != NULL);
3191   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3192   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3193
3194   APR_TERM;
3195 #undef TEST_STRING
3196 #undef RESULT_STRING
3197 }
3198 void test_ixhtml10_p_tag_007()
3199 {
3200 #define  TEST_STRING "<p align=\"center\">あああ</p>"
3201 #define  RESULT_STRING "<p style=\"text-align:center;\">あああ</p>"
3202   char  *ret;
3203   char  *tmp;
3204   device_table spec;
3205   chxjconvrule_entry entry;
3206   cookie_t cookie;
3207   apr_size_t destlen;
3208   APR_INIT;
3209
3210   COOKIE_INIT(cookie);
3211
3212   SPEC_INIT(spec);
3213   destlen = sizeof(TEST_STRING)-1;
3214
3215   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3216   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3217   ret = chxj_rencoding(&r, ret, &destlen);
3218   fprintf(stderr, "actual:[%s]\n", ret);
3219   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3220   CU_ASSERT(ret != NULL);
3221   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3222   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3223
3224   APR_TERM;
3225 #undef TEST_STRING
3226 #undef RESULT_STRING
3227 }
3228 void test_ixhtml10_p_tag_008()
3229 {
3230 #define  TEST_STRING "<p align=\"unknown\">あああ</p>"
3231 #define  RESULT_STRING "<p>あああ</p>"
3232   char  *ret;
3233   char  *tmp;
3234   device_table spec;
3235   chxjconvrule_entry entry;
3236   cookie_t cookie;
3237   apr_size_t destlen;
3238   APR_INIT;
3239
3240   COOKIE_INIT(cookie);
3241
3242   SPEC_INIT(spec);
3243   destlen = sizeof(TEST_STRING)-1;
3244
3245   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3246   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3247   ret = chxj_rencoding(&r, ret, &destlen);
3248   fprintf(stderr, "actual:[%s]\n", ret);
3249   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3250   CU_ASSERT(ret != NULL);
3251   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3252   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3253
3254   APR_TERM;
3255 #undef TEST_STRING
3256 #undef RESULT_STRING
3257 }
3258 /*============================================================================*/
3259 /* <PRE>                                                                      */
3260 /*============================================================================*/
3261 void test_ixhtml10_pre_tag_001()
3262 {
3263 #define  TEST_STRING "<pre></pre>"
3264 #define  RESULT_STRING "<pre></pre>"
3265   char  *ret;
3266   char  *tmp;
3267   device_table spec;
3268   chxjconvrule_entry entry;
3269   cookie_t cookie;
3270   apr_size_t destlen;
3271   APR_INIT;
3272
3273   COOKIE_INIT(cookie);
3274
3275   SPEC_INIT(spec);
3276   destlen = sizeof(TEST_STRING)-1;
3277
3278   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3279   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3280   ret = chxj_rencoding(&r, ret, &destlen);
3281   fprintf(stderr, "actual:[%s]\n", ret);
3282   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3283   CU_ASSERT(ret != NULL);
3284   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3285   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3286
3287   APR_TERM;
3288 #undef TEST_STRING
3289 #undef RESULT_STRING
3290 }
3291 void test_ixhtml10_pre_tag_002()
3292 {
3293 #define  TEST_STRING "<pre>\n</pre>"
3294 #define  RESULT_STRING "<pre>\n</pre>"
3295   char  *ret;
3296   char  *tmp;
3297   device_table spec;
3298   chxjconvrule_entry entry;
3299   cookie_t cookie;
3300   apr_size_t destlen;
3301   APR_INIT;
3302
3303   COOKIE_INIT(cookie);
3304
3305   SPEC_INIT(spec);
3306   destlen = sizeof(TEST_STRING)-1;
3307
3308   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3309   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3310   ret = chxj_rencoding(&r, ret, &destlen);
3311   fprintf(stderr, "actual:[%s]\n", ret);
3312   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3313   CU_ASSERT(ret != NULL);
3314   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3315   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3316
3317   APR_TERM;
3318 #undef TEST_STRING
3319 #undef RESULT_STRING
3320 }
3321 void test_ixhtml10_pre_tag_003()
3322 {
3323 #define  TEST_STRING "<pre>\n\n</pre>"
3324 #define  RESULT_STRING "<pre>\n\n</pre>"
3325   char  *ret;
3326   char  *tmp;
3327   device_table spec;
3328   chxjconvrule_entry entry;
3329   cookie_t cookie;
3330   apr_size_t destlen;
3331   APR_INIT;
3332
3333   COOKIE_INIT(cookie);
3334
3335   SPEC_INIT(spec);
3336   destlen = sizeof(TEST_STRING)-1;
3337
3338   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3339   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3340   ret = chxj_rencoding(&r, ret, &destlen);
3341   fprintf(stderr, "actual:[%s]\n", ret);
3342   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3343   CU_ASSERT(ret != NULL);
3344   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3345   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3346
3347   APR_TERM;
3348 #undef TEST_STRING
3349 #undef RESULT_STRING
3350 }
3351 void test_ixhtml10_pre_tag_004()
3352 {
3353 #define  TEST_STRING "<pre><h1>あああ\n\n</pre>"
3354 #define  RESULT_STRING "<pre><h1>あああ\n\n</h1></pre>"
3355   char  *ret;
3356   char  *tmp;
3357   device_table spec;
3358   chxjconvrule_entry entry;
3359   cookie_t cookie;
3360   apr_size_t destlen;
3361   APR_INIT;
3362
3363   COOKIE_INIT(cookie);
3364
3365   SPEC_INIT(spec);
3366   destlen = sizeof(TEST_STRING)-1;
3367
3368   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3369   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3370   ret = chxj_rencoding(&r, ret, &destlen);
3371   fprintf(stderr, "actual:[%s]\n", ret);
3372   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3373   CU_ASSERT(ret != NULL);
3374   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3375   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3376
3377   APR_TERM;
3378 #undef TEST_STRING
3379 #undef RESULT_STRING
3380 }
3381 void test_ixhtml10_pre_tag_005()
3382 {
3383 #define  TEST_STRING "<pre><h1>ハンカク</h1>\n\n</pre>"
3384 #define  RESULT_STRING "<pre><h1>ハンカク</h1>\n\n</pre>"
3385   char  *ret;
3386   char  *tmp;
3387   device_table spec;
3388   chxjconvrule_entry entry;
3389   cookie_t cookie;
3390   apr_size_t destlen;
3391   APR_INIT;
3392
3393   COOKIE_INIT(cookie);
3394
3395   SPEC_INIT(spec);
3396   destlen = sizeof(TEST_STRING)-1;
3397
3398   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3399   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3400   ret = chxj_rencoding(&r, ret, &destlen);
3401   fprintf(stderr, "actual:[%s]\n", ret);
3402   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3403   CU_ASSERT(ret != NULL);
3404   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3405   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3406
3407   APR_TERM;
3408 #undef TEST_STRING
3409 #undef RESULT_STRING
3410 }
3411 /*============================================================================*/
3412 /* <UL>                                                                       */
3413 /*============================================================================*/
3414 void test_ixhtml10_ul_tag_001()
3415 {
3416 #define  TEST_STRING "<ul>"
3417 #define  RESULT_STRING "<ul></ul>"
3418   char  *ret;
3419   char  *tmp;
3420   device_table spec;
3421   chxjconvrule_entry entry;
3422   cookie_t cookie;
3423   apr_size_t destlen;
3424   APR_INIT;
3425
3426   COOKIE_INIT(cookie);
3427
3428   SPEC_INIT(spec);
3429   destlen = sizeof(TEST_STRING)-1;
3430
3431   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3432   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3433   ret = chxj_rencoding(&r, ret, &destlen);
3434   fprintf(stderr, "actual:[%s]\n", ret);
3435   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3436   CU_ASSERT(ret != NULL);
3437   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3438   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3439
3440   APR_TERM;
3441 #undef TEST_STRING
3442 #undef RESULT_STRING
3443 }
3444 void test_ixhtml10_ul_tag_002()
3445 {
3446 #define  TEST_STRING "<ul></ul>"
3447 #define  RESULT_STRING "<ul></ul>"
3448   char  *ret;
3449   char  *tmp;
3450   device_table spec;
3451   chxjconvrule_entry entry;
3452   cookie_t cookie;
3453   apr_size_t destlen;
3454   APR_INIT;
3455
3456   COOKIE_INIT(cookie);
3457
3458   SPEC_INIT(spec);
3459   destlen = sizeof(TEST_STRING)-1;
3460
3461   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3462   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3463   ret = chxj_rencoding(&r, ret, &destlen);
3464   fprintf(stderr, "actual:[%s]\n", ret);
3465   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3466   CU_ASSERT(ret != NULL);
3467   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3468   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3469
3470   APR_TERM;
3471 #undef TEST_STRING
3472 #undef RESULT_STRING
3473 }
3474 void test_ixhtml10_ul_tag_003()
3475 {
3476 #define  TEST_STRING "<ul><li></ul>"
3477 #define  RESULT_STRING "<ul><li></li></ul>"
3478   char  *ret;
3479   char  *tmp;
3480   device_table spec;
3481   chxjconvrule_entry entry;
3482   cookie_t cookie;
3483   apr_size_t destlen;
3484   APR_INIT;
3485
3486   COOKIE_INIT(cookie);
3487
3488   SPEC_INIT(spec);
3489   destlen = sizeof(TEST_STRING)-1;
3490
3491   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3492   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3493   ret = chxj_rencoding(&r, ret, &destlen);
3494   fprintf(stderr, "actual:[%s]\n", ret);
3495   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3496   CU_ASSERT(ret != NULL);
3497   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3498   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3499
3500   APR_TERM;
3501 #undef TEST_STRING
3502 #undef RESULT_STRING
3503 }
3504 void test_ixhtml10_ul_tag_004()
3505 {
3506 #define  TEST_STRING "<ul abc><li></ul>"
3507 #define  RESULT_STRING "<ul><li></li></ul>"
3508   char  *ret;
3509   char  *tmp;
3510   device_table spec;
3511   chxjconvrule_entry entry;
3512   cookie_t cookie;
3513   apr_size_t destlen;
3514   APR_INIT;
3515
3516   COOKIE_INIT(cookie);
3517
3518   SPEC_INIT(spec);
3519   destlen = sizeof(TEST_STRING)-1;
3520
3521   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3522   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3523   ret = chxj_rencoding(&r, ret, &destlen);
3524   fprintf(stderr, "actual:[%s]\n", ret);
3525   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3526   CU_ASSERT(ret != NULL);
3527   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3528   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3529
3530   APR_TERM;
3531 #undef TEST_STRING
3532 #undef RESULT_STRING
3533 }
3534 void test_ixhtml10_ul_tag_005()
3535 {
3536 #define  TEST_STRING "<ul abc><li>abc</ul>"
3537 #define  RESULT_STRING "<ul><li>abc</li></ul>"
3538   char  *ret;
3539   char  *tmp;
3540   device_table spec;
3541   chxjconvrule_entry entry;
3542   cookie_t cookie;
3543   apr_size_t destlen;
3544   APR_INIT;
3545
3546   COOKIE_INIT(cookie);
3547
3548   SPEC_INIT(spec);
3549   destlen = sizeof(TEST_STRING)-1;
3550
3551   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3552   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3553   ret = chxj_rencoding(&r, ret, &destlen);
3554   fprintf(stderr, "actual:[%s]\n", ret);
3555   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3556   CU_ASSERT(ret != NULL);
3557   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3558   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3559
3560   APR_TERM;
3561 #undef TEST_STRING
3562 #undef RESULT_STRING
3563 }
3564 void test_ixhtml10_ul_tag_006()
3565 {
3566 #define  TEST_STRING "<ul type=\"disc\"><li>abc</ul>"
3567 #define  RESULT_STRING "<ul style=\"list-style-type:disc;\"><li>abc</li></ul>"
3568   char  *ret;
3569   char  *tmp;
3570   device_table spec;
3571   chxjconvrule_entry entry;
3572   cookie_t cookie;
3573   apr_size_t destlen;
3574   APR_INIT;
3575
3576   COOKIE_INIT(cookie);
3577
3578   SPEC_INIT(spec);
3579   destlen = sizeof(TEST_STRING)-1;
3580
3581   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3582   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3583   ret = chxj_rencoding(&r, ret, &destlen);
3584   fprintf(stderr, "actual:[%s]\n", ret);
3585   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3586   CU_ASSERT(ret != NULL);
3587   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3588   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3589
3590   APR_TERM;
3591 #undef TEST_STRING
3592 #undef RESULT_STRING
3593 }
3594 void test_ixhtml10_ul_tag_007()
3595 {
3596 #define  TEST_STRING "<ul type=\"circle\"><li>abc</ul>"
3597 #define  RESULT_STRING "<ul style=\"list-style-type:circle;\"><li>abc</li></ul>"
3598   char  *ret;
3599   char  *tmp;
3600   device_table spec;
3601   chxjconvrule_entry entry;
3602   cookie_t cookie;
3603   apr_size_t destlen;
3604   APR_INIT;
3605
3606   COOKIE_INIT(cookie);
3607
3608   SPEC_INIT(spec);
3609   destlen = sizeof(TEST_STRING)-1;
3610
3611   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3612   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3613   ret = chxj_rencoding(&r, ret, &destlen);
3614   fprintf(stderr, "actual:[%s]\n", ret);
3615   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3616   CU_ASSERT(ret != NULL);
3617   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3618   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3619
3620   APR_TERM;
3621 #undef TEST_STRING
3622 #undef RESULT_STRING
3623 }
3624 void test_ixhtml10_ul_tag_008()
3625 {
3626 #define  TEST_STRING "<ul type=\"square\"><li>abc</ul>"
3627 #define  RESULT_STRING "<ul style=\"list-style-type:square;\"><li>abc</li></ul>"
3628   char  *ret;
3629   char  *tmp;
3630   device_table spec;
3631   chxjconvrule_entry entry;
3632   cookie_t cookie;
3633   apr_size_t destlen;
3634   APR_INIT;
3635
3636   COOKIE_INIT(cookie);
3637
3638   SPEC_INIT(spec);
3639   destlen = sizeof(TEST_STRING)-1;
3640
3641   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3642   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3643   ret = chxj_rencoding(&r, ret, &destlen);
3644   fprintf(stderr, "actual:[%s]\n", ret);
3645   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3646   CU_ASSERT(ret != NULL);
3647   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3648   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3649
3650   APR_TERM;
3651 #undef TEST_STRING
3652 #undef RESULT_STRING
3653 }
3654 void test_ixhtml10_ul_tag_009()
3655 {
3656 #define  TEST_STRING "<ul type=\"unknown\"><li>abc</ul>"
3657 #define  RESULT_STRING "<ul><li>abc</li></ul>"
3658   char  *ret;
3659   char  *tmp;
3660   device_table spec;
3661   chxjconvrule_entry entry;
3662   cookie_t cookie;
3663   apr_size_t destlen;
3664   APR_INIT;
3665
3666   COOKIE_INIT(cookie);
3667
3668   SPEC_INIT(spec);
3669   destlen = sizeof(TEST_STRING)-1;
3670
3671   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3672   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3673   ret = chxj_rencoding(&r, ret, &destlen);
3674   fprintf(stderr, "actual:[%s]\n", ret);
3675   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3676   CU_ASSERT(ret != NULL);
3677   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3678   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3679
3680   APR_TERM;
3681 #undef TEST_STRING
3682 #undef RESULT_STRING
3683 }
3684 void test_ixhtml10_ul_tag_010()
3685 {
3686 #define  TEST_STRING "<ul type=\"\"><li>abc</ul>"
3687 #define  RESULT_STRING "<ul><li>abc</li></ul>"
3688   char  *ret;
3689   char  *tmp;
3690   device_table spec;
3691   chxjconvrule_entry entry;
3692   cookie_t cookie;
3693   apr_size_t destlen;
3694   APR_INIT;
3695
3696   COOKIE_INIT(cookie);
3697
3698   SPEC_INIT(spec);
3699   destlen = sizeof(TEST_STRING)-1;
3700
3701   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3702   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3703   ret = chxj_rencoding(&r, ret, &destlen);
3704   fprintf(stderr, "actual:[%s]\n", ret);
3705   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3706   CU_ASSERT(ret != NULL);
3707   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3708   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3709
3710   APR_TERM;
3711 #undef TEST_STRING
3712 #undef RESULT_STRING
3713 }
3714 void test_ixhtml10_ul_tag_011()
3715 {
3716 #define  TEST_STRING "<ul type><li>abc</ul>"
3717 #define  RESULT_STRING "<ul><li>abc</li></ul>"
3718   char  *ret;
3719   char  *tmp;
3720   device_table spec;
3721   chxjconvrule_entry entry;
3722   cookie_t cookie;
3723   apr_size_t destlen;
3724   APR_INIT;
3725
3726   COOKIE_INIT(cookie);
3727
3728   SPEC_INIT(spec);
3729   destlen = sizeof(TEST_STRING)-1;
3730
3731   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3732   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3733   ret = chxj_rencoding(&r, ret, &destlen);
3734   fprintf(stderr, "actual:[%s]\n", ret);
3735   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3736   CU_ASSERT(ret != NULL);
3737   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3738   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3739
3740   APR_TERM;
3741 #undef TEST_STRING
3742 #undef RESULT_STRING
3743 }
3744 /*============================================================================*/
3745 /* <LI>                                                                       */
3746 /*============================================================================*/
3747 void test_ixhtml10_li_tag_001()
3748 {
3749 #define  TEST_STRING "<li></li>"
3750 #define  RESULT_STRING "<li></li>"
3751   char  *ret;
3752   char  *tmp;
3753   device_table spec;
3754   chxjconvrule_entry entry;
3755   cookie_t cookie;
3756   apr_size_t destlen;
3757   APR_INIT;
3758
3759   COOKIE_INIT(cookie);
3760
3761   SPEC_INIT(spec);
3762   destlen = sizeof(TEST_STRING)-1;
3763
3764   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3765   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3766   ret = chxj_rencoding(&r, ret, &destlen);
3767   fprintf(stderr, "actual:[%s]\n", ret);
3768   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3769   CU_ASSERT(ret != NULL);
3770   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3771   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3772
3773   APR_TERM;
3774 #undef TEST_STRING
3775 #undef RESULT_STRING
3776 }
3777 void test_ixhtml10_li_tag_002()
3778 {
3779 #define  TEST_STRING "<li>abc</li>"
3780 #define  RESULT_STRING "<li>abc</li>"
3781   char  *ret;
3782   char  *tmp;
3783   device_table spec;
3784   chxjconvrule_entry entry;
3785   cookie_t cookie;
3786   apr_size_t destlen;
3787   APR_INIT;
3788
3789   COOKIE_INIT(cookie);
3790
3791   SPEC_INIT(spec);
3792   destlen = sizeof(TEST_STRING)-1;
3793
3794   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3795   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3796   ret = chxj_rencoding(&r, ret, &destlen);
3797   fprintf(stderr, "actual:[%s]\n", ret);
3798   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3799   CU_ASSERT(ret != NULL);
3800   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3801   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3802
3803   APR_TERM;
3804 #undef TEST_STRING
3805 #undef RESULT_STRING
3806 }
3807 void test_ixhtml10_li_tag_003()
3808 {
3809 #define  TEST_STRING "<li>あいうえお</li>"
3810 #define  RESULT_STRING "<li>あいうえお</li>"
3811   char  *ret;
3812   char  *tmp;
3813   device_table spec;
3814   chxjconvrule_entry entry;
3815   cookie_t cookie;
3816   apr_size_t destlen;
3817   APR_INIT;
3818
3819   COOKIE_INIT(cookie);
3820
3821   SPEC_INIT(spec);
3822   destlen = sizeof(TEST_STRING)-1;
3823
3824   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3825   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3826   ret = chxj_rencoding(&r, ret, &destlen);
3827   fprintf(stderr, "actual:[%s]\n", ret);
3828   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3829   CU_ASSERT(ret != NULL);
3830   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3831   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3832
3833   APR_TERM;
3834 #undef TEST_STRING
3835 #undef RESULT_STRING
3836 }
3837 void test_ixhtml10_li_tag_004()
3838 {
3839 #define  TEST_STRING "<li>ハンカク</li>"
3840 #define  RESULT_STRING "<li>ハンカク</li>"
3841   char  *ret;
3842   char  *tmp;
3843   device_table spec;
3844   chxjconvrule_entry entry;
3845   cookie_t cookie;
3846   apr_size_t destlen;
3847   APR_INIT;
3848
3849   COOKIE_INIT(cookie);
3850
3851   SPEC_INIT(spec);
3852   destlen = sizeof(TEST_STRING)-1;
3853
3854   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3855   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3856   ret = chxj_rencoding(&r, ret, &destlen);
3857   fprintf(stderr, "actual:[%s]\n", ret);
3858   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3859   CU_ASSERT(ret != NULL);
3860   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3861   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3862
3863   APR_TERM;
3864 #undef TEST_STRING
3865 #undef RESULT_STRING
3866 }
3867 void test_ixhtml10_li_tag_005()
3868 {
3869 #define  TEST_STRING "<li type>ハンカク</li>"
3870 #define  RESULT_STRING "<li>ハンカク</li>"
3871   char  *ret;
3872   char  *tmp;
3873   device_table spec;
3874   chxjconvrule_entry entry;
3875   cookie_t cookie;
3876   apr_size_t destlen;
3877   APR_INIT;
3878
3879   COOKIE_INIT(cookie);
3880
3881   SPEC_INIT(spec);
3882   destlen = sizeof(TEST_STRING)-1;
3883
3884   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3885   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3886   ret = chxj_rencoding(&r, ret, &destlen);
3887   fprintf(stderr, "actual:[%s]\n", ret);
3888   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3889   CU_ASSERT(ret != NULL);
3890   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3891   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3892
3893   APR_TERM;
3894 #undef TEST_STRING
3895 #undef RESULT_STRING
3896 }
3897 void test_ixhtml10_li_tag_006()
3898 {
3899 #define  TEST_STRING "<li type=\"\">ハンカク</li>"
3900 #define  RESULT_STRING "<li>ハンカク</li>"
3901   char  *ret;
3902   char  *tmp;
3903   device_table spec;
3904   chxjconvrule_entry entry;
3905   cookie_t cookie;
3906   apr_size_t destlen;
3907   APR_INIT;
3908
3909   COOKIE_INIT(cookie);
3910
3911   SPEC_INIT(spec);
3912   destlen = sizeof(TEST_STRING)-1;
3913
3914   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3915   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3916   ret = chxj_rencoding(&r, ret, &destlen);
3917   fprintf(stderr, "actual:[%s]\n", ret);
3918   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3919   CU_ASSERT(ret != NULL);
3920   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3921   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3922
3923   APR_TERM;
3924 #undef TEST_STRING
3925 #undef RESULT_STRING
3926 }
3927 void test_ixhtml10_li_tag_007()
3928 {
3929 #define  TEST_STRING "<li type=\"\">ハンカク</li>"
3930 #define  RESULT_STRING "<li>ハンカク</li>"
3931   char  *ret;
3932   char  *tmp;
3933   device_table spec;
3934   chxjconvrule_entry entry;
3935   cookie_t cookie;
3936   apr_size_t destlen;
3937   APR_INIT;
3938
3939   COOKIE_INIT(cookie);
3940
3941   SPEC_INIT(spec);
3942   destlen = sizeof(TEST_STRING)-1;
3943
3944   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3945   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3946   ret = chxj_rencoding(&r, ret, &destlen);
3947   fprintf(stderr, "actual:[%s]\n", ret);
3948   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3949   CU_ASSERT(ret != NULL);
3950   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3951   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3952
3953   APR_TERM;
3954 #undef TEST_STRING
3955 #undef RESULT_STRING
3956 }
3957 void test_ixhtml10_li_tag_008()
3958 {
3959 #define  TEST_STRING "<li type=\"1\">ハンカク</li>"
3960 #define  RESULT_STRING "<li style=\"list-style-type:decimal;\">ハンカク</li>"
3961   char  *ret;
3962   char  *tmp;
3963   device_table spec;
3964   chxjconvrule_entry entry;
3965   cookie_t cookie;
3966   apr_size_t destlen;
3967   APR_INIT;
3968
3969   COOKIE_INIT(cookie);
3970
3971   SPEC_INIT(spec);
3972   destlen = sizeof(TEST_STRING)-1;
3973
3974   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
3975   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
3976   ret = chxj_rencoding(&r, ret, &destlen);
3977   fprintf(stderr, "actual:[%s]\n", ret);
3978   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
3979   CU_ASSERT(ret != NULL);
3980   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
3981   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
3982
3983   APR_TERM;
3984 #undef TEST_STRING
3985 #undef RESULT_STRING
3986 }
3987 void test_ixhtml10_li_tag_009()
3988 {
3989 #define  TEST_STRING "<li type=\"a\">ハンカク</li>"
3990 #define  RESULT_STRING "<li style=\"list-style-type:lower-alpha;\">ハンカク</li>"
3991   char  *ret;
3992   char  *tmp;
3993   device_table spec;
3994   chxjconvrule_entry entry;
3995   cookie_t cookie;
3996   apr_size_t destlen;
3997   APR_INIT;
3998
3999   COOKIE_INIT(cookie);
4000
4001   SPEC_INIT(spec);
4002   destlen = sizeof(TEST_STRING)-1;
4003
4004   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4005   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4006   ret = chxj_rencoding(&r, ret, &destlen);
4007   fprintf(stderr, "actual:[%s]\n", ret);
4008   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4009   CU_ASSERT(ret != NULL);
4010   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4011   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4012
4013   APR_TERM;
4014 #undef TEST_STRING
4015 #undef RESULT_STRING
4016 }
4017 void test_ixhtml10_li_tag_010()
4018 {
4019 #define  TEST_STRING "<li type=\"A\">ハンカク</li>"
4020 #define  RESULT_STRING "<li style=\"list-style-type:upper-alpha;\">ハンカク</li>"
4021   char  *ret;
4022   char  *tmp;
4023   device_table spec;
4024   chxjconvrule_entry entry;
4025   cookie_t cookie;
4026   apr_size_t destlen;
4027   APR_INIT;
4028
4029   COOKIE_INIT(cookie);
4030
4031   SPEC_INIT(spec);
4032   destlen = sizeof(TEST_STRING)-1;
4033
4034   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4035   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4036   ret = chxj_rencoding(&r, ret, &destlen);
4037   fprintf(stderr, "actual:[%s]\n", ret);
4038   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4039   CU_ASSERT(ret != NULL);
4040   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4041   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4042
4043   APR_TERM;
4044 #undef TEST_STRING
4045 #undef RESULT_STRING
4046 }
4047 void test_ixhtml10_li_tag_011()
4048 {
4049 #define  TEST_STRING "<li value>ハンカク</li>"
4050 #define  RESULT_STRING "<li>ハンカク</li>"
4051   char  *ret;
4052   char  *tmp;
4053   device_table spec;
4054   chxjconvrule_entry entry;
4055   cookie_t cookie;
4056   apr_size_t destlen;
4057   APR_INIT;
4058
4059   COOKIE_INIT(cookie);
4060
4061   SPEC_INIT(spec);
4062   destlen = sizeof(TEST_STRING)-1;
4063
4064   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4065   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4066   ret = chxj_rencoding(&r, ret, &destlen);
4067   fprintf(stderr, "actual:[%s]\n", ret);
4068   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4069   CU_ASSERT(ret != NULL);
4070   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4071   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4072
4073   APR_TERM;
4074 #undef TEST_STRING
4075 #undef RESULT_STRING
4076 }
4077 void test_ixhtml10_li_tag_012()
4078 {
4079 #define  TEST_STRING "<li value=\"\">ハンカク</li>"
4080 #define  RESULT_STRING "<li>ハンカク</li>"
4081   char  *ret;
4082   char  *tmp;
4083   device_table spec;
4084   chxjconvrule_entry entry;
4085   cookie_t cookie;
4086   apr_size_t destlen;
4087   APR_INIT;
4088
4089   COOKIE_INIT(cookie);
4090
4091   SPEC_INIT(spec);
4092   destlen = sizeof(TEST_STRING)-1;
4093
4094   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4095   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4096   ret = chxj_rencoding(&r, ret, &destlen);
4097   fprintf(stderr, "actual:[%s]\n", ret);
4098   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4099   CU_ASSERT(ret != NULL);
4100   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4101   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4102
4103   APR_TERM;
4104 #undef TEST_STRING
4105 #undef RESULT_STRING
4106 }
4107 void test_ixhtml10_li_tag_013()
4108 {
4109 #define  TEST_STRING "<li value=\"1\">ハンカク</li>"
4110 #define  RESULT_STRING "<li value=\"1\">ハンカク</li>"
4111   char  *ret;
4112   char  *tmp;
4113   device_table spec;
4114   chxjconvrule_entry entry;
4115   cookie_t cookie;
4116   apr_size_t destlen;
4117   APR_INIT;
4118
4119   COOKIE_INIT(cookie);
4120
4121   SPEC_INIT(spec);
4122   destlen = sizeof(TEST_STRING)-1;
4123
4124   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4125   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4126   ret = chxj_rencoding(&r, ret, &destlen);
4127   fprintf(stderr, "actual:[%s]\n", ret);
4128   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4129   CU_ASSERT(ret != NULL);
4130   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4131   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4132
4133   APR_TERM;
4134 #undef TEST_STRING
4135 #undef RESULT_STRING
4136 }
4137 void test_ixhtml10_li_tag_014()
4138 {
4139 #define  TEST_STRING "<li type=\"disc\">ハンカク</li>"
4140 #define  RESULT_STRING "<li style=\"list-style-type:disc;\">ハンカク</li>"
4141   char  *ret;
4142   char  *tmp;
4143   device_table spec;
4144   chxjconvrule_entry entry;
4145   cookie_t cookie;
4146   apr_size_t destlen;
4147   APR_INIT;
4148
4149   COOKIE_INIT(cookie);
4150
4151   SPEC_INIT(spec);
4152   destlen = sizeof(TEST_STRING)-1;
4153
4154   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4155   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4156   ret = chxj_rencoding(&r, ret, &destlen);
4157   fprintf(stderr, "actual:[%s]\n", ret);
4158   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4159   CU_ASSERT(ret != NULL);
4160   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4161   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4162
4163   APR_TERM;
4164 #undef TEST_STRING
4165 #undef RESULT_STRING
4166 }
4167 void test_ixhtml10_li_tag_015()
4168 {
4169 #define  TEST_STRING "<li type=\"circle\">ハンカク</li>"
4170 #define  RESULT_STRING "<li style=\"list-style-type:circle;\">ハンカク</li>"
4171   char  *ret;
4172   char  *tmp;
4173   device_table spec;
4174   chxjconvrule_entry entry;
4175   cookie_t cookie;
4176   apr_size_t destlen;
4177   APR_INIT;
4178
4179   COOKIE_INIT(cookie);
4180
4181   SPEC_INIT(spec);
4182   destlen = sizeof(TEST_STRING)-1;
4183
4184   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4185   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4186   ret = chxj_rencoding(&r, ret, &destlen);
4187   fprintf(stderr, "actual:[%s]\n", ret);
4188   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4189   CU_ASSERT(ret != NULL);
4190   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4191   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4192
4193   APR_TERM;
4194 #undef TEST_STRING
4195 #undef RESULT_STRING
4196 }
4197 void test_ixhtml10_li_tag_016()
4198 {
4199 #define  TEST_STRING "<li type=\"square\">ハンカク</li>"
4200 #define  RESULT_STRING "<li style=\"list-style-type:square;\">ハンカク</li>"
4201   char  *ret;
4202   char  *tmp;
4203   device_table spec;
4204   chxjconvrule_entry entry;
4205   cookie_t cookie;
4206   apr_size_t destlen;
4207   APR_INIT;
4208
4209   COOKIE_INIT(cookie);
4210
4211   SPEC_INIT(spec);
4212   destlen = sizeof(TEST_STRING)-1;
4213
4214   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4215   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4216   ret = chxj_rencoding(&r, ret, &destlen);
4217   fprintf(stderr, "actual:[%s]\n", ret);
4218   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4219   CU_ASSERT(ret != NULL);
4220   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4221   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4222
4223   APR_TERM;
4224 #undef TEST_STRING
4225 #undef RESULT_STRING
4226 }
4227 void test_ixhtml10_li_tag_017()
4228 {
4229 #define  TEST_STRING "<li type=\"\">ハンカク</li>"
4230 #define  RESULT_STRING "<li>ハンカク</li>"
4231   char  *ret;
4232   char  *tmp;
4233   device_table spec;
4234   chxjconvrule_entry entry;
4235   cookie_t cookie;
4236   apr_size_t destlen;
4237   APR_INIT;
4238
4239   COOKIE_INIT(cookie);
4240
4241   SPEC_INIT(spec);
4242   destlen = sizeof(TEST_STRING)-1;
4243
4244   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4245   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4246   ret = chxj_rencoding(&r, ret, &destlen);
4247   fprintf(stderr, "actual:[%s]\n", ret);
4248   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4249   CU_ASSERT(ret != NULL);
4250   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4251   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4252
4253   APR_TERM;
4254 #undef TEST_STRING
4255 #undef RESULT_STRING
4256 }
4257 void test_ixhtml10_li_tag_018()
4258 {
4259 #define  TEST_STRING "<li type>ハンカク</li>"
4260 #define  RESULT_STRING "<li>ハンカク</li>"
4261   char  *ret;
4262   char  *tmp;
4263   device_table spec;
4264   chxjconvrule_entry entry;
4265   cookie_t cookie;
4266   apr_size_t destlen;
4267   APR_INIT;
4268
4269   COOKIE_INIT(cookie);
4270
4271   SPEC_INIT(spec);
4272   destlen = sizeof(TEST_STRING)-1;
4273
4274   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4275   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4276   ret = chxj_rencoding(&r, ret, &destlen);
4277   fprintf(stderr, "actual:[%s]\n", ret);
4278   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4279   CU_ASSERT(ret != NULL);
4280   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4281   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4282
4283   APR_TERM;
4284 #undef TEST_STRING
4285 #undef RESULT_STRING
4286 }
4287 /*============================================================================*/
4288 /* <OL>                                                                       */
4289 /*============================================================================*/
4290 void test_ixhtml10_ol_tag_001()
4291 {
4292 #define  TEST_STRING "<ol></ol>"
4293 #define  RESULT_STRING "<ol></ol>"
4294   char  *ret;
4295   char  *tmp;
4296   device_table spec;
4297   chxjconvrule_entry entry;
4298   cookie_t cookie;
4299   apr_size_t destlen;
4300   APR_INIT;
4301
4302   COOKIE_INIT(cookie);
4303
4304   SPEC_INIT(spec);
4305   destlen = sizeof(TEST_STRING)-1;
4306
4307   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4308   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4309   ret = chxj_rencoding(&r, ret, &destlen);
4310   fprintf(stderr, "actual:[%s]\n", ret);
4311   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4312   CU_ASSERT(ret != NULL);
4313   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4314   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4315
4316   APR_TERM;
4317 #undef TEST_STRING
4318 #undef RESULT_STRING
4319 }
4320 void test_ixhtml10_ol_tag_002()
4321 {
4322 #define  TEST_STRING "<ol><li></li></ol>"
4323 #define  RESULT_STRING "<ol><li></li></ol>"
4324   char  *ret;
4325   char  *tmp;
4326   device_table spec;
4327   chxjconvrule_entry entry;
4328   cookie_t cookie;
4329   apr_size_t destlen;
4330   APR_INIT;
4331
4332   COOKIE_INIT(cookie);
4333
4334   SPEC_INIT(spec);
4335   destlen = sizeof(TEST_STRING)-1;
4336
4337   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4338   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4339   ret = chxj_rencoding(&r, ret, &destlen);
4340   fprintf(stderr, "actual:[%s]\n", ret);
4341   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4342   CU_ASSERT(ret != NULL);
4343   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4344   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4345
4346   APR_TERM;
4347 #undef TEST_STRING
4348 #undef RESULT_STRING
4349 }
4350 void test_ixhtml10_ol_tag_003()
4351 {
4352 #define  TEST_STRING "<ol><li>abc</li></ol>"
4353 #define  RESULT_STRING "<ol><li>abc</li></ol>"
4354   char  *ret;
4355   char  *tmp;
4356   device_table spec;
4357   chxjconvrule_entry entry;
4358   cookie_t cookie;
4359   apr_size_t destlen;
4360   APR_INIT;
4361
4362   COOKIE_INIT(cookie);
4363
4364   SPEC_INIT(spec);
4365   destlen = sizeof(TEST_STRING)-1;
4366
4367   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4368   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4369   ret = chxj_rencoding(&r, ret, &destlen);
4370   fprintf(stderr, "actual:[%s]\n", ret);
4371   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4372   CU_ASSERT(ret != NULL);
4373   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4374   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4375
4376   APR_TERM;
4377 #undef TEST_STRING
4378 #undef RESULT_STRING
4379 }
4380 void test_ixhtml10_ol_tag_004()
4381 {
4382 #define  TEST_STRING "<ol><li>abc</li><li>def</li></ol>"
4383 #define  RESULT_STRING "<ol><li>abc</li><li>def</li></ol>"
4384   char  *ret;
4385   char  *tmp;
4386   device_table spec;
4387   chxjconvrule_entry entry;
4388   cookie_t cookie;
4389   apr_size_t destlen;
4390   APR_INIT;
4391
4392   COOKIE_INIT(cookie);
4393
4394   SPEC_INIT(spec);
4395   destlen = sizeof(TEST_STRING)-1;
4396
4397   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4398   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4399   ret = chxj_rencoding(&r, ret, &destlen);
4400   fprintf(stderr, "actual:[%s]\n", ret);
4401   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4402   CU_ASSERT(ret != NULL);
4403   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4404   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4405
4406   APR_TERM;
4407 #undef TEST_STRING
4408 #undef RESULT_STRING
4409 }
4410 void test_ixhtml10_ol_tag_005()
4411 {
4412 #define  TEST_STRING "<ol><li>あ</li></ol>"
4413 #define  RESULT_STRING "<ol><li>あ</li></ol>"
4414   char  *ret;
4415   char  *tmp;
4416   device_table spec;
4417   chxjconvrule_entry entry;
4418   cookie_t cookie;
4419   apr_size_t destlen;
4420   APR_INIT;
4421
4422   COOKIE_INIT(cookie);
4423
4424   SPEC_INIT(spec);
4425   destlen = sizeof(TEST_STRING)-1;
4426
4427   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4428   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4429   ret = chxj_rencoding(&r, ret, &destlen);
4430   fprintf(stderr, "actual:[%s]\n", ret);
4431   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4432   CU_ASSERT(ret != NULL);
4433   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4434   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4435
4436   APR_TERM;
4437 #undef TEST_STRING
4438 #undef RESULT_STRING
4439 }
4440 void test_ixhtml10_ol_tag_006()
4441 {
4442 #define  TEST_STRING "<ol><li>あ</li><li>い</li></ol>"
4443 #define  RESULT_STRING "<ol><li>あ</li><li>い</li></ol>"
4444   char  *ret;
4445   char  *tmp;
4446   device_table spec;
4447   chxjconvrule_entry entry;
4448   cookie_t cookie;
4449   apr_size_t destlen;
4450   APR_INIT;
4451
4452   COOKIE_INIT(cookie);
4453
4454   SPEC_INIT(spec);
4455   destlen = sizeof(TEST_STRING)-1;
4456
4457   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4458   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4459   ret = chxj_rencoding(&r, ret, &destlen);
4460   fprintf(stderr, "actual:[%s]\n", ret);
4461   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4462   CU_ASSERT(ret != NULL);
4463   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4464   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4465
4466   APR_TERM;
4467 #undef TEST_STRING
4468 #undef RESULT_STRING
4469 }
4470 void test_ixhtml10_ol_tag_007()
4471 {
4472 #define  TEST_STRING "<ol><li>ハンカク</li></ol>"
4473 #define  RESULT_STRING "<ol><li>ハンカク</li></ol>"
4474   char  *ret;
4475   char  *tmp;
4476   device_table spec;
4477   chxjconvrule_entry entry;
4478   cookie_t cookie;
4479   apr_size_t destlen;
4480   APR_INIT;
4481
4482   COOKIE_INIT(cookie);
4483
4484   SPEC_INIT(spec);
4485   destlen = sizeof(TEST_STRING)-1;
4486
4487   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4488   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4489   ret = chxj_rencoding(&r, ret, &destlen);
4490   fprintf(stderr, "actual:[%s]\n", ret);
4491   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4492   CU_ASSERT(ret != NULL);
4493   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4494   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4495
4496   APR_TERM;
4497 #undef TEST_STRING
4498 #undef RESULT_STRING
4499 }
4500 void test_ixhtml10_ol_tag_008()
4501 {
4502 #define  TEST_STRING "<ol><li>ハンカク</li><li>カナダヨ</li></ol>"
4503 #define  RESULT_STRING "<ol><li>ハンカク</li><li>カナダヨ</li></ol>"
4504   char  *ret;
4505   char  *tmp;
4506   device_table spec;
4507   chxjconvrule_entry entry;
4508   cookie_t cookie;
4509   apr_size_t destlen;
4510   APR_INIT;
4511
4512   COOKIE_INIT(cookie);
4513
4514   SPEC_INIT(spec);
4515   destlen = sizeof(TEST_STRING)-1;
4516
4517   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4518   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4519   ret = chxj_rencoding(&r, ret, &destlen);
4520   fprintf(stderr, "actual:[%s]\n", ret);
4521   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4522   CU_ASSERT(ret != NULL);
4523   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4524   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4525
4526   APR_TERM;
4527 #undef TEST_STRING
4528 #undef RESULT_STRING
4529 }
4530 void test_ixhtml10_ol_tag_009()
4531 {
4532 #define  TEST_STRING "<ol type></ol>"
4533 #define  RESULT_STRING "<ol></ol>"
4534   char  *ret;
4535   char  *tmp;
4536   device_table spec;
4537   chxjconvrule_entry entry;
4538   cookie_t cookie;
4539   apr_size_t destlen;
4540   APR_INIT;
4541
4542   COOKIE_INIT(cookie);
4543
4544   SPEC_INIT(spec);
4545   destlen = sizeof(TEST_STRING)-1;
4546
4547   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4548   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4549   ret = chxj_rencoding(&r, ret, &destlen);
4550   fprintf(stderr, "actual:[%s]\n", ret);
4551   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4552   CU_ASSERT(ret != NULL);
4553   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4554   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4555
4556   APR_TERM;
4557 #undef TEST_STRING
4558 #undef RESULT_STRING
4559 }
4560 void test_ixhtml10_ol_tag_010()
4561 {
4562 #define  TEST_STRING "<ol type=\"\"></ol>"
4563 #define  RESULT_STRING "<ol></ol>"
4564   char  *ret;
4565   char  *tmp;
4566   device_table spec;
4567   chxjconvrule_entry entry;
4568   cookie_t cookie;
4569   apr_size_t destlen;
4570   APR_INIT;
4571
4572   COOKIE_INIT(cookie);
4573
4574   SPEC_INIT(spec);
4575   destlen = sizeof(TEST_STRING)-1;
4576
4577   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4578   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4579   ret = chxj_rencoding(&r, ret, &destlen);
4580   fprintf(stderr, "actual:[%s]\n", ret);
4581   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4582   CU_ASSERT(ret != NULL);
4583   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4584   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4585
4586   APR_TERM;
4587 #undef TEST_STRING
4588 #undef RESULT_STRING
4589 }
4590 void test_ixhtml10_ol_tag_011()
4591 {
4592 #define  TEST_STRING "<ol type=\"1\"></ol>"
4593 #define  RESULT_STRING "<ol style=\"list-style-type:decimal;\"></ol>"
4594   char  *ret;
4595   char  *tmp;
4596   device_table spec;
4597   chxjconvrule_entry entry;
4598   cookie_t cookie;
4599   apr_size_t destlen;
4600   APR_INIT;
4601
4602   COOKIE_INIT(cookie);
4603
4604   SPEC_INIT(spec);
4605   destlen = sizeof(TEST_STRING)-1;
4606
4607   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4608   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4609   ret = chxj_rencoding(&r, ret, &destlen);
4610   fprintf(stderr, "actual:[%s]\n", ret);
4611   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4612   CU_ASSERT(ret != NULL);
4613   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4614   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4615
4616   APR_TERM;
4617 #undef TEST_STRING
4618 #undef RESULT_STRING
4619 }
4620 void test_ixhtml10_ol_tag_012()
4621 {
4622 #define  TEST_STRING "<ol type=\"a\"></ol>"
4623 #define  RESULT_STRING "<ol style=\"list-style-type:lower-alpha;\"></ol>"
4624   char  *ret;
4625   char  *tmp;
4626   device_table spec;
4627   chxjconvrule_entry entry;
4628   cookie_t cookie;
4629   apr_size_t destlen;
4630   APR_INIT;
4631
4632   COOKIE_INIT(cookie);
4633
4634   SPEC_INIT(spec);
4635   destlen = sizeof(TEST_STRING)-1;
4636
4637   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4638   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4639   ret = chxj_rencoding(&r, ret, &destlen);
4640   fprintf(stderr, "actual:[%s]\n", ret);
4641   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4642   CU_ASSERT(ret != NULL);
4643   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4644   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4645
4646   APR_TERM;
4647 #undef TEST_STRING
4648 #undef RESULT_STRING
4649 }
4650 void test_ixhtml10_ol_tag_013()
4651 {
4652 #define  TEST_STRING "<ol type=\"A\"></ol>"
4653 #define  RESULT_STRING "<ol style=\"list-style-type:upper-alpha;\"></ol>"
4654   char  *ret;
4655   char  *tmp;
4656   device_table spec;
4657   chxjconvrule_entry entry;
4658   cookie_t cookie;
4659   apr_size_t destlen;
4660   APR_INIT;
4661
4662   COOKIE_INIT(cookie);
4663
4664   SPEC_INIT(spec);
4665   destlen = sizeof(TEST_STRING)-1;
4666
4667   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4668   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4669   ret = chxj_rencoding(&r, ret, &destlen);
4670   fprintf(stderr, "actual:[%s]\n", ret);
4671   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4672   CU_ASSERT(ret != NULL);
4673   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4674   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4675
4676   APR_TERM;
4677 #undef TEST_STRING
4678 #undef RESULT_STRING
4679 }
4680 void test_ixhtml10_ol_tag_014()
4681 {
4682 #define  TEST_STRING "<ol type=\"b\"></ol>"
4683 #define  RESULT_STRING "<ol></ol>"
4684   char  *ret;
4685   char  *tmp;
4686   device_table spec;
4687   chxjconvrule_entry entry;
4688   cookie_t cookie;
4689   apr_size_t destlen;
4690   APR_INIT;
4691
4692   COOKIE_INIT(cookie);
4693
4694   SPEC_INIT(spec);
4695   destlen = sizeof(TEST_STRING)-1;
4696
4697   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4698   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4699   ret = chxj_rencoding(&r, ret, &destlen);
4700   fprintf(stderr, "actual:[%s]\n", ret);
4701   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4702   CU_ASSERT(ret != NULL);
4703   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4704   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4705
4706   APR_TERM;
4707 #undef TEST_STRING
4708 #undef RESULT_STRING
4709 }
4710 void test_ixhtml10_ol_tag_015()
4711 {
4712 #define  TEST_STRING "<ol start></ol>"
4713 #define  RESULT_STRING "<ol></ol>"
4714   char  *ret;
4715   char  *tmp;
4716   device_table spec;
4717   chxjconvrule_entry entry;
4718   cookie_t cookie;
4719   apr_size_t destlen;
4720   APR_INIT;
4721
4722   COOKIE_INIT(cookie);
4723
4724   SPEC_INIT(spec);
4725   destlen = sizeof(TEST_STRING)-1;
4726
4727   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4728   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4729   ret = chxj_rencoding(&r, ret, &destlen);
4730   fprintf(stderr, "actual:[%s]\n", ret);
4731   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4732   CU_ASSERT(ret != NULL);
4733   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4734   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4735
4736   APR_TERM;
4737 #undef TEST_STRING
4738 #undef RESULT_STRING
4739 }
4740 void test_ixhtml10_ol_tag_016()
4741 {
4742 #define  TEST_STRING "<ol start=\"\"></ol>"
4743 #define  RESULT_STRING "<ol></ol>"
4744   char  *ret;
4745   char  *tmp;
4746   device_table spec;
4747   chxjconvrule_entry entry;
4748   cookie_t cookie;
4749   apr_size_t destlen;
4750   APR_INIT;
4751
4752   COOKIE_INIT(cookie);
4753
4754   SPEC_INIT(spec);
4755   destlen = sizeof(TEST_STRING)-1;
4756
4757   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4758   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4759   ret = chxj_rencoding(&r, ret, &destlen);
4760   fprintf(stderr, "actual:[%s]\n", ret);
4761   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4762   CU_ASSERT(ret != NULL);
4763   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4764   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4765
4766   APR_TERM;
4767 #undef TEST_STRING
4768 #undef RESULT_STRING
4769 }
4770 void test_ixhtml10_ol_tag_017()
4771 {
4772 #define  TEST_STRING "<ol start=\"1\"></ol>"
4773 #define  RESULT_STRING "<ol start=\"1\"></ol>"
4774   char  *ret;
4775   char  *tmp;
4776   device_table spec;
4777   chxjconvrule_entry entry;
4778   cookie_t cookie;
4779   apr_size_t destlen;
4780   APR_INIT;
4781
4782   COOKIE_INIT(cookie);
4783
4784   SPEC_INIT(spec);
4785   destlen = sizeof(TEST_STRING)-1;
4786
4787   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4788   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4789   ret = chxj_rencoding(&r, ret, &destlen);
4790   fprintf(stderr, "actual:[%s]\n", ret);
4791   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4792   CU_ASSERT(ret != NULL);
4793   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4794   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4795
4796   APR_TERM;
4797 #undef TEST_STRING
4798 #undef RESULT_STRING
4799 }
4800 void test_ixhtml10_ol_tag_018()
4801 {
4802 #define  TEST_STRING "<ol start=\"a\"></ol>"
4803 #define  RESULT_STRING "<ol start=\"a\"></ol>"
4804   char  *ret;
4805   char  *tmp;
4806   device_table spec;
4807   chxjconvrule_entry entry;
4808   cookie_t cookie;
4809   apr_size_t destlen;
4810   APR_INIT;
4811
4812   COOKIE_INIT(cookie);
4813
4814   SPEC_INIT(spec);
4815   destlen = sizeof(TEST_STRING)-1;
4816
4817   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4818   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4819   ret = chxj_rencoding(&r, ret, &destlen);
4820   fprintf(stderr, "actual:[%s]\n", ret);
4821   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4822   CU_ASSERT(ret != NULL);
4823   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4824   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4825
4826   APR_TERM;
4827 #undef TEST_STRING
4828 #undef RESULT_STRING
4829 }
4830 /*============================================================================*/
4831 /* <H>                                                                        */
4832 /*============================================================================*/
4833 void test_ixhtml10_h1_tag_001()
4834 {
4835 #define  TEST_STRING "<h1></h1>"
4836 #define  RESULT_STRING "<h1></h1>"
4837   char  *ret;
4838   char  *tmp;
4839   device_table spec;
4840   chxjconvrule_entry entry;
4841   cookie_t cookie;
4842   apr_size_t destlen;
4843   APR_INIT;
4844
4845   COOKIE_INIT(cookie);
4846
4847   SPEC_INIT(spec);
4848   destlen = sizeof(TEST_STRING)-1;
4849
4850   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4851   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4852   ret = chxj_rencoding(&r, ret, &destlen);
4853   fprintf(stderr, "actual:[%s]\n", ret);
4854   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4855   CU_ASSERT(ret != NULL);
4856   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4857   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4858
4859   APR_TERM;
4860 #undef TEST_STRING
4861 #undef RESULT_STRING
4862 }
4863 void test_ixhtml10_h1_tag_002()
4864 {
4865 #define  TEST_STRING "<h1>abc</h1>"
4866 #define  RESULT_STRING "<h1>abc</h1>"
4867   char  *ret;
4868   char  *tmp;
4869   device_table spec;
4870   chxjconvrule_entry entry;
4871   cookie_t cookie;
4872   apr_size_t destlen;
4873   APR_INIT;
4874
4875   COOKIE_INIT(cookie);
4876
4877   SPEC_INIT(spec);
4878   destlen = sizeof(TEST_STRING)-1;
4879
4880   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4881   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4882   ret = chxj_rencoding(&r, ret, &destlen);
4883   fprintf(stderr, "actual:[%s]\n", ret);
4884   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4885   CU_ASSERT(ret != NULL);
4886   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4887   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4888
4889   APR_TERM;
4890 #undef TEST_STRING
4891 #undef RESULT_STRING
4892 }
4893 void test_ixhtml10_h1_tag_003()
4894 {
4895 #define  TEST_STRING   "<h1>亀さん</h1>"
4896 #define  RESULT_STRING "<h1>亀さん</h1>"
4897   char  *ret;
4898   char  *tmp;
4899   device_table spec;
4900   chxjconvrule_entry entry;
4901   cookie_t cookie;
4902   apr_size_t destlen;
4903   APR_INIT;
4904
4905   COOKIE_INIT(cookie);
4906
4907   SPEC_INIT(spec);
4908   destlen = sizeof(TEST_STRING)-1;
4909
4910   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4911   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4912   ret = chxj_rencoding(&r, ret, &destlen);
4913   fprintf(stderr, "actual:[%s]\n", ret);
4914   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4915   CU_ASSERT(ret != NULL);
4916   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4917   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4918
4919   APR_TERM;
4920 #undef TEST_STRING
4921 #undef RESULT_STRING
4922 }
4923 void test_ixhtml10_h1_tag_004()
4924 {
4925 #define  TEST_STRING   "<h1>ハンカク</h1>"
4926 #define  RESULT_STRING "<h1>ハンカク</h1>"
4927   char  *ret;
4928   char  *tmp;
4929   device_table spec;
4930   chxjconvrule_entry entry;
4931   cookie_t cookie;
4932   apr_size_t destlen;
4933   APR_INIT;
4934
4935   COOKIE_INIT(cookie);
4936
4937   SPEC_INIT(spec);
4938   destlen = sizeof(TEST_STRING)-1;
4939
4940   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4941   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4942   ret = chxj_rencoding(&r, ret, &destlen);
4943   fprintf(stderr, "actual:[%s]\n", ret);
4944   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4945   CU_ASSERT(ret != NULL);
4946   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4947   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4948
4949   APR_TERM;
4950 #undef TEST_STRING
4951 #undef RESULT_STRING
4952 }
4953 void test_ixhtml10_h1_tag_005()
4954 {
4955 #define  TEST_STRING "<h1 align></h1>"
4956 #define  RESULT_STRING "<h1></h1>"
4957   char  *ret;
4958   char  *tmp;
4959   device_table spec;
4960   chxjconvrule_entry entry;
4961   cookie_t cookie;
4962   apr_size_t destlen;
4963   APR_INIT;
4964
4965   COOKIE_INIT(cookie);
4966
4967   SPEC_INIT(spec);
4968   destlen = sizeof(TEST_STRING)-1;
4969
4970   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
4971   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
4972   ret = chxj_rencoding(&r, ret, &destlen);
4973   fprintf(stderr, "actual:[%s]\n", ret);
4974   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
4975   CU_ASSERT(ret != NULL);
4976   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
4977   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
4978
4979   APR_TERM;
4980 #undef TEST_STRING
4981 #undef RESULT_STRING
4982 }
4983 void test_ixhtml10_h1_tag_006()
4984 {
4985 #define  TEST_STRING "<h1 align=\"\"></h1>"
4986 #define  RESULT_STRING "<h1></h1>"
4987   char  *ret;
4988   char  *tmp;
4989   device_table spec;
4990   chxjconvrule_entry entry;
4991   cookie_t cookie;
4992   apr_size_t destlen;
4993   APR_INIT;
4994
4995   COOKIE_INIT(cookie);
4996
4997   SPEC_INIT(spec);
4998   destlen = sizeof(TEST_STRING)-1;
4999
5000   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5001   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5002   ret = chxj_rencoding(&r, ret, &destlen);
5003   fprintf(stderr, "actual:[%s]\n", ret);
5004   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5005   CU_ASSERT(ret != NULL);
5006   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5007   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5008
5009   APR_TERM;
5010 #undef TEST_STRING
5011 #undef RESULT_STRING
5012 }
5013 void test_ixhtml10_h1_tag_007()
5014 {
5015 #define  TEST_STRING   "<h1 align=\"left\"></h1>"
5016 #define  RESULT_STRING "<h1 style=\"text-align:left;\"></h1>"
5017   char  *ret;
5018   char  *tmp;
5019   device_table spec;
5020   chxjconvrule_entry entry;
5021   cookie_t cookie;
5022   apr_size_t destlen;
5023   APR_INIT;
5024
5025   COOKIE_INIT(cookie);
5026
5027   SPEC_INIT(spec);
5028   destlen = sizeof(TEST_STRING)-1;
5029
5030   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5031   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5032   ret = chxj_rencoding(&r, ret, &destlen);
5033   fprintf(stderr, "actual:[%s]\n", ret);
5034   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5035   CU_ASSERT(ret != NULL);
5036   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5037   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5038
5039   APR_TERM;
5040 #undef TEST_STRING
5041 #undef RESULT_STRING
5042 }
5043 void test_ixhtml10_h1_tag_008()
5044 {
5045 #define  TEST_STRING "<h1 align=\"right\"></h1>"
5046 #define  RESULT_STRING "<h1 style=\"text-align:right;\"></h1>"
5047   char  *ret;
5048   char  *tmp;
5049   device_table spec;
5050   chxjconvrule_entry entry;
5051   cookie_t cookie;
5052   apr_size_t destlen;
5053   APR_INIT;
5054
5055   COOKIE_INIT(cookie);
5056
5057   SPEC_INIT(spec);
5058   destlen = sizeof(TEST_STRING)-1;
5059
5060   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5061   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5062   ret = chxj_rencoding(&r, ret, &destlen);
5063   fprintf(stderr, "actual:[%s]\n", ret);
5064   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5065   CU_ASSERT(ret != NULL);
5066   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5067   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5068
5069   APR_TERM;
5070 #undef TEST_STRING
5071 #undef RESULT_STRING
5072 }
5073 void test_ixhtml10_h1_tag_009()
5074 {
5075 #define  TEST_STRING "<h1 align=\"center\"></h1>"
5076 #define  RESULT_STRING "<h1 style=\"text-align:center;\"></h1>"
5077   char  *ret;
5078   char  *tmp;
5079   device_table spec;
5080   chxjconvrule_entry entry;
5081   cookie_t cookie;
5082   apr_size_t destlen;
5083   APR_INIT;
5084
5085   COOKIE_INIT(cookie);
5086
5087   SPEC_INIT(spec);
5088   destlen = sizeof(TEST_STRING)-1;
5089
5090   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5091   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5092   ret = chxj_rencoding(&r, ret, &destlen);
5093   fprintf(stderr, "actual:[%s]\n", ret);
5094   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5095   CU_ASSERT(ret != NULL);
5096   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5097   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5098
5099   APR_TERM;
5100 #undef TEST_STRING
5101 #undef RESULT_STRING
5102 }
5103 void test_ixhtml10_h1_tag_010()
5104 {
5105 #define  TEST_STRING   "<h1 align=\"unkown\"></h1>"
5106 #define  RESULT_STRING "<h1></h1>"
5107   char  *ret;
5108   char  *tmp;
5109   device_table spec;
5110   chxjconvrule_entry entry;
5111   cookie_t cookie;
5112   apr_size_t destlen;
5113   APR_INIT;
5114
5115   COOKIE_INIT(cookie);
5116
5117   SPEC_INIT(spec);
5118   destlen = sizeof(TEST_STRING)-1;
5119
5120   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5121   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5122   ret = chxj_rencoding(&r, ret, &destlen);
5123   fprintf(stderr, "actual:[%s]\n", ret);
5124   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5125   CU_ASSERT(ret != NULL);
5126   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5127   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5128
5129   APR_TERM;
5130 #undef TEST_STRING
5131 #undef RESULT_STRING
5132 }
5133 /*===========================================================================*/
5134 /* <h2>                                                                      */
5135 /*===========================================================================*/
5136 void test_ixhtml10_h2_tag_001()
5137 {
5138 #define  TEST_STRING "<h2></h2>"
5139 #define  RESULT_STRING "<h2></h2>"
5140   char  *ret;
5141   char  *tmp;
5142   device_table spec;
5143   chxjconvrule_entry entry;
5144   cookie_t cookie;
5145   apr_size_t destlen;
5146   APR_INIT;
5147
5148   COOKIE_INIT(cookie);
5149
5150   SPEC_INIT(spec);
5151   destlen = sizeof(TEST_STRING)-1;
5152
5153   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5154   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5155   ret = chxj_rencoding(&r, ret, &destlen);
5156   fprintf(stderr, "actual:[%s]\n", ret);
5157   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5158   CU_ASSERT(ret != NULL);
5159   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5160   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5161
5162   APR_TERM;
5163 #undef TEST_STRING
5164 #undef RESULT_STRING
5165 }
5166 void test_ixhtml10_h2_tag_002()
5167 {
5168 #define  TEST_STRING "<h2>abc</h2>"
5169 #define  RESULT_STRING "<h2>abc</h2>"
5170   char  *ret;
5171   char  *tmp;
5172   device_table spec;
5173   chxjconvrule_entry entry;
5174   cookie_t cookie;
5175   apr_size_t destlen;
5176   APR_INIT;
5177
5178   COOKIE_INIT(cookie);
5179
5180   SPEC_INIT(spec);
5181   destlen = sizeof(TEST_STRING)-1;
5182
5183   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5184   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5185   ret = chxj_rencoding(&r, ret, &destlen);
5186   fprintf(stderr, "actual:[%s]\n", ret);
5187   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5188   CU_ASSERT(ret != NULL);
5189   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5190   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5191
5192   APR_TERM;
5193 #undef TEST_STRING
5194 #undef RESULT_STRING
5195 }
5196 void test_ixhtml10_h2_tag_003()
5197 {
5198 #define  TEST_STRING "<h2>亀さん</h2>"
5199 #define  RESULT_STRING "<h2>亀さん</h2>"
5200   char  *ret;
5201   char  *tmp;
5202   device_table spec;
5203   chxjconvrule_entry entry;
5204   cookie_t cookie;
5205   apr_size_t destlen;
5206   APR_INIT;
5207
5208   COOKIE_INIT(cookie);
5209
5210   SPEC_INIT(spec);
5211   destlen = sizeof(TEST_STRING)-1;
5212
5213   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5214   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5215   ret = chxj_rencoding(&r, ret, &destlen);
5216   fprintf(stderr, "actual:[%s]\n", ret);
5217   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5218   CU_ASSERT(ret != NULL);
5219   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5220   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5221
5222   APR_TERM;
5223 #undef TEST_STRING
5224 #undef RESULT_STRING
5225 }
5226 void test_ixhtml10_h2_tag_004()
5227 {
5228 #define  TEST_STRING "<h2>ハンカク</h2>"
5229 #define  RESULT_STRING "<h2>ハンカク</h2>"
5230   char  *ret;
5231   char  *tmp;
5232   device_table spec;
5233   chxjconvrule_entry entry;
5234   cookie_t cookie;
5235   apr_size_t destlen;
5236   APR_INIT;
5237
5238   COOKIE_INIT(cookie);
5239
5240   SPEC_INIT(spec);
5241   destlen = sizeof(TEST_STRING)-1;
5242
5243   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5244   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5245   ret = chxj_rencoding(&r, ret, &destlen);
5246   fprintf(stderr, "actual:[%s]\n", ret);
5247   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5248   CU_ASSERT(ret != NULL);
5249   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5250   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5251
5252   APR_TERM;
5253 #undef TEST_STRING
5254 #undef RESULT_STRING
5255 }
5256 void test_ixhtml10_h2_tag_005()
5257 {
5258 #define  TEST_STRING "<h2 align></h2>"
5259 #define  RESULT_STRING "<h2></h2>"
5260   char  *ret;
5261   char  *tmp;
5262   device_table spec;
5263   chxjconvrule_entry entry;
5264   cookie_t cookie;
5265   apr_size_t destlen;
5266   APR_INIT;
5267
5268   COOKIE_INIT(cookie);
5269
5270   SPEC_INIT(spec);
5271   destlen = sizeof(TEST_STRING)-1;
5272
5273   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5274   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5275   ret = chxj_rencoding(&r, ret, &destlen);
5276   fprintf(stderr, "actual:[%s]\n", ret);
5277   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5278   CU_ASSERT(ret != NULL);
5279   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5280   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5281
5282   APR_TERM;
5283 #undef TEST_STRING
5284 #undef RESULT_STRING
5285 }
5286 void test_ixhtml10_h2_tag_006()
5287 {
5288 #define  TEST_STRING "<h2 align=\"\"></h2>"
5289 #define  RESULT_STRING "<h2></h2>"
5290   char  *ret;
5291   char  *tmp;
5292   device_table spec;
5293   chxjconvrule_entry entry;
5294   cookie_t cookie;
5295   apr_size_t destlen;
5296   APR_INIT;
5297
5298   COOKIE_INIT(cookie);
5299
5300   SPEC_INIT(spec);
5301   destlen = sizeof(TEST_STRING)-1;
5302
5303   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5304   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5305   ret = chxj_rencoding(&r, ret, &destlen);
5306   fprintf(stderr, "actual:[%s]\n", ret);
5307   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5308   CU_ASSERT(ret != NULL);
5309   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5310   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5311
5312   APR_TERM;
5313 #undef TEST_STRING
5314 #undef RESULT_STRING
5315 }
5316 void test_ixhtml10_h2_tag_007()
5317 {
5318 #define  TEST_STRING "<h2 align=\"left\"></h2>"
5319 #define  RESULT_STRING "<h2 style=\"text-align:left;\"></h2>"
5320   char  *ret;
5321   char  *tmp;
5322   device_table spec;
5323   chxjconvrule_entry entry;
5324   cookie_t cookie;
5325   apr_size_t destlen;
5326   APR_INIT;
5327
5328   COOKIE_INIT(cookie);
5329
5330   SPEC_INIT(spec);
5331   destlen = sizeof(TEST_STRING)-1;
5332
5333   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5334   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5335   ret = chxj_rencoding(&r, ret, &destlen);
5336   fprintf(stderr, "actual:[%s]\n", ret);
5337   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5338   CU_ASSERT(ret != NULL);
5339   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5340   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5341
5342   APR_TERM;
5343 #undef TEST_STRING
5344 #undef RESULT_STRING
5345 }
5346 void test_ixhtml10_h2_tag_008()
5347 {
5348 #define  TEST_STRING "<h2 align=\"right\"></h2>"
5349 #define  RESULT_STRING "<h2 style=\"text-align:right;\"></h2>"
5350   char  *ret;
5351   char  *tmp;
5352   device_table spec;
5353   chxjconvrule_entry entry;
5354   cookie_t cookie;
5355   apr_size_t destlen;
5356   APR_INIT;
5357
5358   COOKIE_INIT(cookie);
5359
5360   SPEC_INIT(spec);
5361   destlen = sizeof(TEST_STRING)-1;
5362
5363   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5364   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5365   ret = chxj_rencoding(&r, ret, &destlen);
5366   fprintf(stderr, "actual:[%s]\n", ret);
5367   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5368   CU_ASSERT(ret != NULL);
5369   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5370   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5371
5372   APR_TERM;
5373 #undef TEST_STRING
5374 #undef RESULT_STRING
5375 }
5376 void test_ixhtml10_h2_tag_009()
5377 {
5378 #define  TEST_STRING "<h2 align=\"center\"></h2>"
5379 #define  RESULT_STRING "<h2 style=\"text-align:center;\"></h2>"
5380   char  *ret;
5381   char  *tmp;
5382   device_table spec;
5383   chxjconvrule_entry entry;
5384   cookie_t cookie;
5385   apr_size_t destlen;
5386   APR_INIT;
5387
5388   COOKIE_INIT(cookie);
5389
5390   SPEC_INIT(spec);
5391   destlen = sizeof(TEST_STRING)-1;
5392
5393   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5394   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5395   ret = chxj_rencoding(&r, ret, &destlen);
5396   fprintf(stderr, "actual:[%s]\n", ret);
5397   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5398   CU_ASSERT(ret != NULL);
5399   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5400   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5401
5402   APR_TERM;
5403 #undef TEST_STRING
5404 #undef RESULT_STRING
5405 }
5406 void test_ixhtml10_h2_tag_010()
5407 {
5408 #define  TEST_STRING "<h2 align=\"unkown\"></h2>"
5409 #define  RESULT_STRING "<h2></h2>"
5410   char  *ret;
5411   char  *tmp;
5412   device_table spec;
5413   chxjconvrule_entry entry;
5414   cookie_t cookie;
5415   apr_size_t destlen;
5416   APR_INIT;
5417
5418   COOKIE_INIT(cookie);
5419
5420   SPEC_INIT(spec);
5421   destlen = sizeof(TEST_STRING)-1;
5422
5423   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5424   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5425   ret = chxj_rencoding(&r, ret, &destlen);
5426   fprintf(stderr, "actual:[%s]\n", ret);
5427   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5428   CU_ASSERT(ret != NULL);
5429   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5430   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5431
5432   APR_TERM;
5433 #undef TEST_STRING
5434 #undef RESULT_STRING
5435 }
5436 /*===========================================================================*/
5437 /* <h3>                                                                      */
5438 /*===========================================================================*/
5439 void test_ixhtml10_h3_tag_001()
5440 {
5441 #define  TEST_STRING "<h3></h3>"
5442 #define  RESULT_STRING "<h3></h3>"
5443   char  *ret;
5444   char  *tmp;
5445   device_table spec;
5446   chxjconvrule_entry entry;
5447   cookie_t cookie;
5448   apr_size_t destlen;
5449   APR_INIT;
5450
5451   COOKIE_INIT(cookie);
5452
5453   SPEC_INIT(spec);
5454   destlen = sizeof(TEST_STRING)-1;
5455
5456   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5457   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5458   ret = chxj_rencoding(&r, ret, &destlen);
5459   fprintf(stderr, "actual:[%s]\n", ret);
5460   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5461   CU_ASSERT(ret != NULL);
5462   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5463   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5464
5465   APR_TERM;
5466 #undef TEST_STRING
5467 #undef RESULT_STRING
5468 }
5469 void test_ixhtml10_h3_tag_002()
5470 {
5471 #define  TEST_STRING "<h3>abc</h3>"
5472 #define  RESULT_STRING "<h3>abc</h3>"
5473   char  *ret;
5474   char  *tmp;
5475   device_table spec;
5476   chxjconvrule_entry entry;
5477   cookie_t cookie;
5478   apr_size_t destlen;
5479   APR_INIT;
5480
5481   COOKIE_INIT(cookie);
5482
5483   SPEC_INIT(spec);
5484   destlen = sizeof(TEST_STRING)-1;
5485
5486   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5487   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5488   ret = chxj_rencoding(&r, ret, &destlen);
5489   fprintf(stderr, "actual:[%s]\n", ret);
5490   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5491   CU_ASSERT(ret != NULL);
5492   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5493   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5494
5495   APR_TERM;
5496 #undef TEST_STRING
5497 #undef RESULT_STRING
5498 }
5499 void test_ixhtml10_h3_tag_003()
5500 {
5501 #define  TEST_STRING "<h3>亀さん</h3>"
5502 #define  RESULT_STRING "<h3>亀さん</h3>"
5503   char  *ret;
5504   char  *tmp;
5505   device_table spec;
5506   chxjconvrule_entry entry;
5507   cookie_t cookie;
5508   apr_size_t destlen;
5509   APR_INIT;
5510
5511   COOKIE_INIT(cookie);
5512
5513   SPEC_INIT(spec);
5514   destlen = sizeof(TEST_STRING)-1;
5515
5516   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5517   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5518   ret = chxj_rencoding(&r, ret, &destlen);
5519   fprintf(stderr, "actual:[%s]\n", ret);
5520   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5521   CU_ASSERT(ret != NULL);
5522   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5523   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5524
5525   APR_TERM;
5526 #undef TEST_STRING
5527 #undef RESULT_STRING
5528 }
5529 void test_ixhtml10_h3_tag_004()
5530 {
5531 #define  TEST_STRING "<h3>ハンカク</h3>"
5532 #define  RESULT_STRING "<h3>ハンカク</h3>"
5533   char  *ret;
5534   char  *tmp;
5535   device_table spec;
5536   chxjconvrule_entry entry;
5537   cookie_t cookie;
5538   apr_size_t destlen;
5539   APR_INIT;
5540
5541   COOKIE_INIT(cookie);
5542
5543   SPEC_INIT(spec);
5544   destlen = sizeof(TEST_STRING)-1;
5545
5546   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5547   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5548   ret = chxj_rencoding(&r, ret, &destlen);
5549   fprintf(stderr, "actual:[%s]\n", ret);
5550   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5551   CU_ASSERT(ret != NULL);
5552   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5553   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5554
5555   APR_TERM;
5556 #undef TEST_STRING
5557 #undef RESULT_STRING
5558 }
5559 void test_ixhtml10_h3_tag_005()
5560 {
5561 #define  TEST_STRING "<h3 align></h3>"
5562 #define  RESULT_STRING "<h3></h3>"
5563   char  *ret;
5564   char  *tmp;
5565   device_table spec;
5566   chxjconvrule_entry entry;
5567   cookie_t cookie;
5568   apr_size_t destlen;
5569   APR_INIT;
5570
5571   COOKIE_INIT(cookie);
5572
5573   SPEC_INIT(spec);
5574   destlen = sizeof(TEST_STRING)-1;
5575
5576   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5577   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5578   ret = chxj_rencoding(&r, ret, &destlen);
5579   fprintf(stderr, "actual:[%s]\n", ret);
5580   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5581   CU_ASSERT(ret != NULL);
5582   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5583   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5584
5585   APR_TERM;
5586 #undef TEST_STRING
5587 #undef RESULT_STRING
5588 }
5589 void test_ixhtml10_h3_tag_006()
5590 {
5591 #define  TEST_STRING "<h3 align=\"\"></h3>"
5592 #define  RESULT_STRING "<h3></h3>"
5593   char  *ret;
5594   char  *tmp;
5595   device_table spec;
5596   chxjconvrule_entry entry;
5597   cookie_t cookie;
5598   apr_size_t destlen;
5599   APR_INIT;
5600
5601   COOKIE_INIT(cookie);
5602
5603   SPEC_INIT(spec);
5604   destlen = sizeof(TEST_STRING)-1;
5605
5606   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5607   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5608   ret = chxj_rencoding(&r, ret, &destlen);
5609   fprintf(stderr, "actual:[%s]\n", ret);
5610   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5611   CU_ASSERT(ret != NULL);
5612   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5613   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5614
5615   APR_TERM;
5616 #undef TEST_STRING
5617 #undef RESULT_STRING
5618 }
5619 void test_ixhtml10_h3_tag_007()
5620 {
5621 #define  TEST_STRING "<h3 align=\"left\"></h3>"
5622 #define  RESULT_STRING "<h3 style=\"text-align:left;\"></h3>"
5623   char  *ret;
5624   char  *tmp;
5625   device_table spec;
5626   chxjconvrule_entry entry;
5627   cookie_t cookie;
5628   apr_size_t destlen;
5629   APR_INIT;
5630
5631   COOKIE_INIT(cookie);
5632
5633   SPEC_INIT(spec);
5634   destlen = sizeof(TEST_STRING)-1;
5635
5636   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5637   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5638   ret = chxj_rencoding(&r, ret, &destlen);
5639   fprintf(stderr, "actual:[%s]\n", ret);
5640   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5641   CU_ASSERT(ret != NULL);
5642   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5643   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5644
5645   APR_TERM;
5646 #undef TEST_STRING
5647 #undef RESULT_STRING
5648 }
5649 void test_ixhtml10_h3_tag_008()
5650 {
5651 #define  TEST_STRING "<h3 align=\"right\"></h3>"
5652 #define  RESULT_STRING "<h3 style=\"text-align:right;\"></h3>"
5653   char  *ret;
5654   char  *tmp;
5655   device_table spec;
5656   chxjconvrule_entry entry;
5657   cookie_t cookie;
5658   apr_size_t destlen;
5659   APR_INIT;
5660
5661   COOKIE_INIT(cookie);
5662
5663   SPEC_INIT(spec);
5664   destlen = sizeof(TEST_STRING)-1;
5665
5666   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5667   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5668   ret = chxj_rencoding(&r, ret, &destlen);
5669   fprintf(stderr, "actual:[%s]\n", ret);
5670   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5671   CU_ASSERT(ret != NULL);
5672   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5673   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5674
5675   APR_TERM;
5676 #undef TEST_STRING
5677 #undef RESULT_STRING
5678 }
5679 void test_ixhtml10_h3_tag_009()
5680 {
5681 #define  TEST_STRING "<h3 align=\"center\"></h3>"
5682 #define  RESULT_STRING "<h3 style=\"text-align:center;\"></h3>"
5683   char  *ret;
5684   char  *tmp;
5685   device_table spec;
5686   chxjconvrule_entry entry;
5687   cookie_t cookie;
5688   apr_size_t destlen;
5689   APR_INIT;
5690
5691   COOKIE_INIT(cookie);
5692
5693   SPEC_INIT(spec);
5694   destlen = sizeof(TEST_STRING)-1;
5695
5696   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5697   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5698   ret = chxj_rencoding(&r, ret, &destlen);
5699   fprintf(stderr, "actual:[%s]\n", ret);
5700   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5701   CU_ASSERT(ret != NULL);
5702   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5703   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5704
5705   APR_TERM;
5706 #undef TEST_STRING
5707 #undef RESULT_STRING
5708 }
5709 void test_ixhtml10_h3_tag_010()
5710 {
5711 #define  TEST_STRING "<h3 align=\"unkown\"></h3>"
5712 #define  RESULT_STRING "<h3></h3>"
5713   char  *ret;
5714   char  *tmp;
5715   device_table spec;
5716   chxjconvrule_entry entry;
5717   cookie_t cookie;
5718   apr_size_t destlen;
5719   APR_INIT;
5720
5721   COOKIE_INIT(cookie);
5722
5723   SPEC_INIT(spec);
5724   destlen = sizeof(TEST_STRING)-1;
5725
5726   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5727   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5728   ret = chxj_rencoding(&r, ret, &destlen);
5729   fprintf(stderr, "actual:[%s]\n", ret);
5730   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5731   CU_ASSERT(ret != NULL);
5732   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5733   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5734
5735   APR_TERM;
5736 #undef TEST_STRING
5737 #undef RESULT_STRING
5738 }
5739 /*===========================================================================*/
5740 /* <h4>                                                                      */
5741 /*===========================================================================*/
5742 void test_ixhtml10_h4_tag_001()
5743 {
5744 #define  TEST_STRING "<h4></h4>"
5745 #define  RESULT_STRING "<h4></h4>"
5746   char  *ret;
5747   char  *tmp;
5748   device_table spec;
5749   chxjconvrule_entry entry;
5750   cookie_t cookie;
5751   apr_size_t destlen;
5752   APR_INIT;
5753
5754   COOKIE_INIT(cookie);
5755
5756   SPEC_INIT(spec);
5757   destlen = sizeof(TEST_STRING)-1;
5758
5759   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5760   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5761   ret = chxj_rencoding(&r, ret, &destlen);
5762   fprintf(stderr, "actual:[%s]\n", ret);
5763   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5764   CU_ASSERT(ret != NULL);
5765   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5766   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5767
5768   APR_TERM;
5769 #undef TEST_STRING
5770 #undef RESULT_STRING
5771 }
5772 void test_ixhtml10_h4_tag_002()
5773 {
5774 #define  TEST_STRING "<h4>abc</h4>"
5775 #define  RESULT_STRING "<h4>abc</h4>"
5776   char  *ret;
5777   char  *tmp;
5778   device_table spec;
5779   chxjconvrule_entry entry;
5780   cookie_t cookie;
5781   apr_size_t destlen;
5782   APR_INIT;
5783
5784   COOKIE_INIT(cookie);
5785
5786   SPEC_INIT(spec);
5787   destlen = sizeof(TEST_STRING)-1;
5788
5789   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5790   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5791   ret = chxj_rencoding(&r, ret, &destlen);
5792   fprintf(stderr, "actual:[%s]\n", ret);
5793   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5794   CU_ASSERT(ret != NULL);
5795   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5796   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5797
5798   APR_TERM;
5799 #undef TEST_STRING
5800 #undef RESULT_STRING
5801 }
5802 void test_ixhtml10_h4_tag_003()
5803 {
5804 #define  TEST_STRING "<h4>亀さん</h4>"
5805 #define  RESULT_STRING "<h4>亀さん</h4>"
5806   char  *ret;
5807   char  *tmp;
5808   device_table spec;
5809   chxjconvrule_entry entry;
5810   cookie_t cookie;
5811   apr_size_t destlen;
5812   APR_INIT;
5813
5814   COOKIE_INIT(cookie);
5815
5816   SPEC_INIT(spec);
5817   destlen = sizeof(TEST_STRING)-1;
5818
5819   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5820   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5821   ret = chxj_rencoding(&r, ret, &destlen);
5822   fprintf(stderr, "actual:[%s]\n", ret);
5823   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5824   CU_ASSERT(ret != NULL);
5825   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5826   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5827
5828   APR_TERM;
5829 #undef TEST_STRING
5830 #undef RESULT_STRING
5831 }
5832 void test_ixhtml10_h4_tag_004()
5833 {
5834 #define  TEST_STRING "<h4>ハンカク</h4>"
5835 #define  RESULT_STRING "<h4>ハンカク</h4>"
5836   char  *ret;
5837   char  *tmp;
5838   device_table spec;
5839   chxjconvrule_entry entry;
5840   cookie_t cookie;
5841   apr_size_t destlen;
5842   APR_INIT;
5843
5844   COOKIE_INIT(cookie);
5845
5846   SPEC_INIT(spec);
5847   destlen = sizeof(TEST_STRING)-1;
5848
5849   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5850   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5851   ret = chxj_rencoding(&r, ret, &destlen);
5852   fprintf(stderr, "actual:[%s]\n", ret);
5853   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5854   CU_ASSERT(ret != NULL);
5855   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5856   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5857
5858   APR_TERM;
5859 #undef TEST_STRING
5860 #undef RESULT_STRING
5861 }
5862 void test_ixhtml10_h4_tag_005()
5863 {
5864 #define  TEST_STRING "<h4 align></h4>"
5865 #define  RESULT_STRING "<h4></h4>"
5866   char  *ret;
5867   char  *tmp;
5868   device_table spec;
5869   chxjconvrule_entry entry;
5870   cookie_t cookie;
5871   apr_size_t destlen;
5872   APR_INIT;
5873
5874   COOKIE_INIT(cookie);
5875
5876   SPEC_INIT(spec);
5877   destlen = sizeof(TEST_STRING)-1;
5878
5879   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5880   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5881   ret = chxj_rencoding(&r, ret, &destlen);
5882   fprintf(stderr, "actual:[%s]\n", ret);
5883   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5884   CU_ASSERT(ret != NULL);
5885   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5886   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5887
5888   APR_TERM;
5889 #undef TEST_STRING
5890 #undef RESULT_STRING
5891 }
5892 void test_ixhtml10_h4_tag_006()
5893 {
5894 #define  TEST_STRING "<h4 align=\"\"></h4>"
5895 #define  RESULT_STRING "<h4></h4>"
5896   char  *ret;
5897   char  *tmp;
5898   device_table spec;
5899   chxjconvrule_entry entry;
5900   cookie_t cookie;
5901   apr_size_t destlen;
5902   APR_INIT;
5903
5904   COOKIE_INIT(cookie);
5905
5906   SPEC_INIT(spec);
5907   destlen = sizeof(TEST_STRING)-1;
5908
5909   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5910   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5911   ret = chxj_rencoding(&r, ret, &destlen);
5912   fprintf(stderr, "actual:[%s]\n", ret);
5913   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5914   CU_ASSERT(ret != NULL);
5915   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5916   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5917
5918   APR_TERM;
5919 #undef TEST_STRING
5920 #undef RESULT_STRING
5921 }
5922 void test_ixhtml10_h4_tag_007()
5923 {
5924 #define  TEST_STRING "<h4 align=\"left\"></h4>"
5925 #define  RESULT_STRING "<h4 style=\"text-align:left;\"></h4>"
5926   char  *ret;
5927   char  *tmp;
5928   device_table spec;
5929   chxjconvrule_entry entry;
5930   cookie_t cookie;
5931   apr_size_t destlen;
5932   APR_INIT;
5933
5934   COOKIE_INIT(cookie);
5935
5936   SPEC_INIT(spec);
5937   destlen = sizeof(TEST_STRING)-1;
5938
5939   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5940   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5941   ret = chxj_rencoding(&r, ret, &destlen);
5942   fprintf(stderr, "actual:[%s]\n", ret);
5943   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5944   CU_ASSERT(ret != NULL);
5945   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5946   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5947
5948   APR_TERM;
5949 #undef TEST_STRING
5950 #undef RESULT_STRING
5951 }
5952 void test_ixhtml10_h4_tag_008()
5953 {
5954 #define  TEST_STRING "<h4 align=\"right\"></h4>"
5955 #define  RESULT_STRING "<h4 style=\"text-align:right;\"></h4>"
5956   char  *ret;
5957   char  *tmp;
5958   device_table spec;
5959   chxjconvrule_entry entry;
5960   cookie_t cookie;
5961   apr_size_t destlen;
5962   APR_INIT;
5963
5964   COOKIE_INIT(cookie);
5965
5966   SPEC_INIT(spec);
5967   destlen = sizeof(TEST_STRING)-1;
5968
5969   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
5970   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
5971   ret = chxj_rencoding(&r, ret, &destlen);
5972   fprintf(stderr, "actual:[%s]\n", ret);
5973   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
5974   CU_ASSERT(ret != NULL);
5975   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
5976   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
5977
5978   APR_TERM;
5979 #undef TEST_STRING
5980 #undef RESULT_STRING
5981 }
5982 void test_ixhtml10_h4_tag_009()
5983 {
5984 #define  TEST_STRING "<h4 align=\"center\"></h4>"
5985 #define  RESULT_STRING "<h4 style=\"text-align:center;\"></h4>"
5986   char  *ret;
5987   char  *tmp;
5988   device_table spec;
5989   chxjconvrule_entry entry;
5990   cookie_t cookie;
5991   apr_size_t destlen;
5992   APR_INIT;
5993
5994   COOKIE_INIT(cookie);
5995
5996   SPEC_INIT(spec);
5997   destlen = sizeof(TEST_STRING)-1;
5998
5999   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6000   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6001   ret = chxj_rencoding(&r, ret, &destlen);
6002   fprintf(stderr, "actual:[%s]\n", ret);
6003   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6004   CU_ASSERT(ret != NULL);
6005   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6006   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6007
6008   APR_TERM;
6009 #undef TEST_STRING
6010 #undef RESULT_STRING
6011 }
6012 void test_ixhtml10_h4_tag_010()
6013 {
6014 #define  TEST_STRING "<h4 align=\"unkown\"></h4>"
6015 #define  RESULT_STRING "<h4></h4>"
6016   char  *ret;
6017   char  *tmp;
6018   device_table spec;
6019   chxjconvrule_entry entry;
6020   cookie_t cookie;
6021   apr_size_t destlen;
6022   APR_INIT;
6023
6024   COOKIE_INIT(cookie);
6025
6026   SPEC_INIT(spec);
6027   destlen = sizeof(TEST_STRING)-1;
6028
6029   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6030   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6031   ret = chxj_rencoding(&r, ret, &destlen);
6032   fprintf(stderr, "actual:[%s]\n", ret);
6033   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6034   CU_ASSERT(ret != NULL);
6035   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6036   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6037
6038   APR_TERM;
6039 #undef TEST_STRING
6040 #undef RESULT_STRING
6041 }
6042 /*===========================================================================*/
6043 /* <h5>                                                                      */
6044 /*===========================================================================*/
6045 void test_ixhtml10_h5_tag_001()
6046 {
6047 #define  TEST_STRING "<h5></h5>"
6048 #define  RESULT_STRING "<h5></h5>"
6049   char  *ret;
6050   char  *tmp;
6051   device_table spec;
6052   chxjconvrule_entry entry;
6053   cookie_t cookie;
6054   apr_size_t destlen;
6055   APR_INIT;
6056
6057   COOKIE_INIT(cookie);
6058
6059   SPEC_INIT(spec);
6060   destlen = sizeof(TEST_STRING)-1;
6061
6062   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6063   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6064   ret = chxj_rencoding(&r, ret, &destlen);
6065   fprintf(stderr, "actual:[%s]\n", ret);
6066   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6067   CU_ASSERT(ret != NULL);
6068   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6069   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6070
6071   APR_TERM;
6072 #undef TEST_STRING
6073 #undef RESULT_STRING
6074 }
6075 void test_ixhtml10_h5_tag_002()
6076 {
6077 #define  TEST_STRING "<h5>abc</h5>"
6078 #define  RESULT_STRING "<h5>abc</h5>"
6079   char  *ret;
6080   char  *tmp;
6081   device_table spec;
6082   chxjconvrule_entry entry;
6083   cookie_t cookie;
6084   apr_size_t destlen;
6085   APR_INIT;
6086
6087   COOKIE_INIT(cookie);
6088
6089   SPEC_INIT(spec);
6090   destlen = sizeof(TEST_STRING)-1;
6091
6092   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6093   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6094   ret = chxj_rencoding(&r, ret, &destlen);
6095   fprintf(stderr, "actual:[%s]\n", ret);
6096   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6097   CU_ASSERT(ret != NULL);
6098   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6099   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6100
6101   APR_TERM;
6102 #undef TEST_STRING
6103 #undef RESULT_STRING
6104 }
6105 void test_ixhtml10_h5_tag_003()
6106 {
6107 #define  TEST_STRING "<h5>亀さん</h5>"
6108 #define  RESULT_STRING "<h5>亀さん</h5>"
6109   char  *ret;
6110   char  *tmp;
6111   device_table spec;
6112   chxjconvrule_entry entry;
6113   cookie_t cookie;
6114   apr_size_t destlen;
6115   APR_INIT;
6116
6117   COOKIE_INIT(cookie);
6118
6119   SPEC_INIT(spec);
6120   destlen = sizeof(TEST_STRING)-1;
6121
6122   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6123   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6124   ret = chxj_rencoding(&r, ret, &destlen);
6125   fprintf(stderr, "actual:[%s]\n", ret);
6126   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6127   CU_ASSERT(ret != NULL);
6128   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6129   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6130
6131   APR_TERM;
6132 #undef TEST_STRING
6133 #undef RESULT_STRING
6134 }
6135 void test_ixhtml10_h5_tag_004()
6136 {
6137 #define  TEST_STRING "<h5>ハンカク</h5>"
6138 #define  RESULT_STRING "<h5>ハンカク</h5>"
6139   char  *ret;
6140   char  *tmp;
6141   device_table spec;
6142   chxjconvrule_entry entry;
6143   cookie_t cookie;
6144   apr_size_t destlen;
6145   APR_INIT;
6146
6147   COOKIE_INIT(cookie);
6148
6149   SPEC_INIT(spec);
6150   destlen = sizeof(TEST_STRING)-1;
6151
6152   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6153   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6154   ret = chxj_rencoding(&r, ret, &destlen);
6155   fprintf(stderr, "actual:[%s]\n", ret);
6156   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6157   CU_ASSERT(ret != NULL);
6158   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6159   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6160
6161   APR_TERM;
6162 #undef TEST_STRING
6163 #undef RESULT_STRING
6164 }
6165 void test_ixhtml10_h5_tag_005()
6166 {
6167 #define  TEST_STRING "<h5 align></h5>"
6168 #define  RESULT_STRING "<h5></h5>"
6169   char  *ret;
6170   char  *tmp;
6171   device_table spec;
6172   chxjconvrule_entry entry;
6173   cookie_t cookie;
6174   apr_size_t destlen;
6175   APR_INIT;
6176
6177   COOKIE_INIT(cookie);
6178
6179   SPEC_INIT(spec);
6180   destlen = sizeof(TEST_STRING)-1;
6181
6182   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6183   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6184   ret = chxj_rencoding(&r, ret, &destlen);
6185   fprintf(stderr, "actual:[%s]\n", ret);
6186   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6187   CU_ASSERT(ret != NULL);
6188   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6189   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6190
6191   APR_TERM;
6192 #undef TEST_STRING
6193 #undef RESULT_STRING
6194 }
6195 void test_ixhtml10_h5_tag_006()
6196 {
6197 #define  TEST_STRING "<h5 align=\"\"></h5>"
6198 #define  RESULT_STRING "<h5></h5>"
6199   char  *ret;
6200   char  *tmp;
6201   device_table spec;
6202   chxjconvrule_entry entry;
6203   cookie_t cookie;
6204   apr_size_t destlen;
6205   APR_INIT;
6206
6207   COOKIE_INIT(cookie);
6208
6209   SPEC_INIT(spec);
6210   destlen = sizeof(TEST_STRING)-1;
6211
6212   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6213   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6214   ret = chxj_rencoding(&r, ret, &destlen);
6215   fprintf(stderr, "actual:[%s]\n", ret);
6216   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6217   CU_ASSERT(ret != NULL);
6218   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6219   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6220
6221   APR_TERM;
6222 #undef TEST_STRING
6223 #undef RESULT_STRING
6224 }
6225 void test_ixhtml10_h5_tag_007()
6226 {
6227 #define  TEST_STRING "<h5 align=\"left\"></h5>"
6228 #define  RESULT_STRING "<h5 style=\"text-align:left;\"></h5>"
6229   char  *ret;
6230   char  *tmp;
6231   device_table spec;
6232   chxjconvrule_entry entry;
6233   cookie_t cookie;
6234   apr_size_t destlen;
6235   APR_INIT;
6236
6237   COOKIE_INIT(cookie);
6238
6239   SPEC_INIT(spec);
6240   destlen = sizeof(TEST_STRING)-1;
6241
6242   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6243   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6244   ret = chxj_rencoding(&r, ret, &destlen);
6245   fprintf(stderr, "actual:[%s]\n", ret);
6246   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6247   CU_ASSERT(ret != NULL);
6248   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6249   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6250
6251   APR_TERM;
6252 #undef TEST_STRING
6253 #undef RESULT_STRING
6254 }
6255 void test_ixhtml10_h5_tag_008()
6256 {
6257 #define  TEST_STRING "<h5 align=\"right\"></h5>"
6258 #define  RESULT_STRING "<h5 style=\"text-align:right;\"></h5>"
6259   char  *ret;
6260   char  *tmp;
6261   device_table spec;
6262   chxjconvrule_entry entry;
6263   cookie_t cookie;
6264   apr_size_t destlen;
6265   APR_INIT;
6266
6267   COOKIE_INIT(cookie);
6268
6269   SPEC_INIT(spec);
6270   destlen = sizeof(TEST_STRING)-1;
6271
6272   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6273   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6274   ret = chxj_rencoding(&r, ret, &destlen);
6275   fprintf(stderr, "actual:[%s]\n", ret);
6276   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6277   CU_ASSERT(ret != NULL);
6278   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6279   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6280
6281   APR_TERM;
6282 #undef TEST_STRING
6283 #undef RESULT_STRING
6284 }
6285 void test_ixhtml10_h5_tag_009()
6286 {
6287 #define  TEST_STRING "<h5 align=\"center\"></h5>"
6288 #define  RESULT_STRING "<h5 style=\"text-align:center;\"></h5>"
6289   char  *ret;
6290   char  *tmp;
6291   device_table spec;
6292   chxjconvrule_entry entry;
6293   cookie_t cookie;
6294   apr_size_t destlen;
6295   APR_INIT;
6296
6297   COOKIE_INIT(cookie);
6298
6299   SPEC_INIT(spec);
6300   destlen = sizeof(TEST_STRING)-1;
6301
6302   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6303   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6304   ret = chxj_rencoding(&r, ret, &destlen);
6305   fprintf(stderr, "actual:[%s]\n", ret);
6306   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6307   CU_ASSERT(ret != NULL);
6308   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6309   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6310
6311   APR_TERM;
6312 #undef TEST_STRING
6313 #undef RESULT_STRING
6314 }
6315 void test_ixhtml10_h5_tag_010()
6316 {
6317 #define  TEST_STRING "<h5 align=\"unkown\"></h5>"
6318 #define  RESULT_STRING "<h5></h5>"
6319   char  *ret;
6320   char  *tmp;
6321   device_table spec;
6322   chxjconvrule_entry entry;
6323   cookie_t cookie;
6324   apr_size_t destlen;
6325   APR_INIT;
6326
6327   COOKIE_INIT(cookie);
6328
6329   SPEC_INIT(spec);
6330   destlen = sizeof(TEST_STRING)-1;
6331
6332   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6333   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6334   ret = chxj_rencoding(&r, ret, &destlen);
6335   fprintf(stderr, "actual:[%s]\n", ret);
6336   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6337   CU_ASSERT(ret != NULL);
6338   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6339   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6340
6341   APR_TERM;
6342 #undef TEST_STRING
6343 #undef RESULT_STRING
6344 }
6345 /*===========================================================================*/
6346 /* <h6>                                                                      */
6347 /*===========================================================================*/
6348 void test_ixhtml10_h6_tag_001()
6349 {
6350 #define  TEST_STRING "<h6></h6>"
6351 #define  RESULT_STRING "<h6></h6>"
6352   char  *ret;
6353   char  *tmp;
6354   device_table spec;
6355   chxjconvrule_entry entry;
6356   cookie_t cookie;
6357   apr_size_t destlen;
6358   APR_INIT;
6359
6360   COOKIE_INIT(cookie);
6361
6362   SPEC_INIT(spec);
6363   destlen = sizeof(TEST_STRING)-1;
6364
6365   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6366   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6367   ret = chxj_rencoding(&r, ret, &destlen);
6368
6369   fprintf(stderr, "actual:[%s]\n", ret);
6370   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6371
6372   CU_ASSERT(ret != NULL);
6373   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6374   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6375
6376   APR_TERM;
6377 #undef TEST_STRING
6378 #undef RESULT_STRING
6379 }
6380 void test_ixhtml10_h6_tag_002()
6381 {
6382 #define  TEST_STRING "<h6>abc</h6>"
6383 #define  RESULT_STRING "<h6>abc</h6>"
6384   char  *ret;
6385   char  *tmp;
6386   device_table spec;
6387   chxjconvrule_entry entry;
6388   cookie_t cookie;
6389   apr_size_t destlen;
6390   APR_INIT;
6391
6392   COOKIE_INIT(cookie);
6393
6394   SPEC_INIT(spec);
6395   destlen = sizeof(TEST_STRING)-1;
6396
6397   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6398   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6399   ret = chxj_rencoding(&r, ret, &destlen);
6400   fprintf(stderr, "actual:[%s]\n", ret);
6401   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6402   CU_ASSERT(ret != NULL);
6403   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6404   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6405
6406   APR_TERM;
6407 #undef TEST_STRING
6408 #undef RESULT_STRING
6409 }
6410 void test_ixhtml10_h6_tag_003()
6411 {
6412 #define  TEST_STRING "<h6>亀さん</h6>"
6413 #define  RESULT_STRING "<h6>亀さん</h6>"
6414   char  *ret;
6415   char  *tmp;
6416   device_table spec;
6417   chxjconvrule_entry entry;
6418   cookie_t cookie;
6419   apr_size_t destlen;
6420   APR_INIT;
6421
6422   COOKIE_INIT(cookie);
6423
6424   SPEC_INIT(spec);
6425   destlen = sizeof(TEST_STRING)-1;
6426
6427   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6428   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6429   ret = chxj_rencoding(&r, ret, &destlen);
6430   fprintf(stderr, "actual:[%s]\n", ret);
6431   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6432   CU_ASSERT(ret != NULL);
6433   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6434   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6435
6436   APR_TERM;
6437 #undef TEST_STRING
6438 #undef RESULT_STRING
6439 }
6440 void test_ixhtml10_h6_tag_004()
6441 {
6442 #define  TEST_STRING   "<h6>ハンカク</h6>"
6443 #define  RESULT_STRING "<h6>ハンカク</h6>"
6444   char  *ret;
6445   char  *tmp;
6446   device_table spec;
6447   chxjconvrule_entry entry;
6448   cookie_t cookie;
6449   apr_size_t destlen;
6450   APR_INIT;
6451
6452   COOKIE_INIT(cookie);
6453
6454   SPEC_INIT(spec);
6455   destlen = sizeof(TEST_STRING)-1;
6456
6457   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6458   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6459   ret = chxj_rencoding(&r, ret, &destlen);
6460   fprintf(stderr, "actual:[%s]\n", ret);
6461   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6462   CU_ASSERT(ret != NULL);
6463   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6464   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6465
6466   APR_TERM;
6467 #undef TEST_STRING
6468 #undef RESULT_STRING
6469 }
6470 void test_ixhtml10_h6_tag_005()
6471 {
6472 #define  TEST_STRING   "<h6 align></h6>"
6473 #define  RESULT_STRING "<h6></h6>"
6474   char  *ret;
6475   char  *tmp;
6476   device_table spec;
6477   chxjconvrule_entry entry;
6478   cookie_t cookie;
6479   apr_size_t destlen;
6480   APR_INIT;
6481
6482   COOKIE_INIT(cookie);
6483
6484   SPEC_INIT(spec);
6485   destlen = sizeof(TEST_STRING)-1;
6486
6487   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6488   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6489   ret = chxj_rencoding(&r, ret, &destlen);
6490   fprintf(stderr, "actual:[%s]\n", ret);
6491   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6492   CU_ASSERT(ret != NULL);
6493   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6494   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6495
6496   APR_TERM;
6497 #undef TEST_STRING
6498 #undef RESULT_STRING
6499 }
6500 void test_ixhtml10_h6_tag_006()
6501 {
6502 #define  TEST_STRING   "<h6 align=\"\"></h6>"
6503 #define  RESULT_STRING "<h6></h6>"
6504   char  *ret;
6505   char  *tmp;
6506   device_table spec;
6507   chxjconvrule_entry entry;
6508   cookie_t cookie;
6509   apr_size_t destlen;
6510   APR_INIT;
6511
6512   COOKIE_INIT(cookie);
6513
6514   SPEC_INIT(spec);
6515   destlen = sizeof(TEST_STRING)-1;
6516
6517   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6518   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6519   ret = chxj_rencoding(&r, ret, &destlen);
6520   fprintf(stderr, "actual:[%s]\n", ret);
6521   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6522   CU_ASSERT(ret != NULL);
6523   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6524   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6525
6526   APR_TERM;
6527 #undef TEST_STRING
6528 #undef RESULT_STRING
6529 }
6530 void test_ixhtml10_h6_tag_007()
6531 {
6532 #define  TEST_STRING   "<h6 align=\"left\"></h6>"
6533 #define  RESULT_STRING "<h6 style=\"text-align:left;\"></h6>"
6534   char  *ret;
6535   char  *tmp;
6536   device_table spec;
6537   chxjconvrule_entry entry;
6538   cookie_t cookie;
6539   apr_size_t destlen;
6540   APR_INIT;
6541
6542   COOKIE_INIT(cookie);
6543
6544   SPEC_INIT(spec);
6545   destlen = sizeof(TEST_STRING)-1;
6546
6547   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6548   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6549   ret = chxj_rencoding(&r, ret, &destlen);
6550   fprintf(stderr, "actual:[%s]\n", ret);
6551   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6552   CU_ASSERT(ret != NULL);
6553   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6554   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6555
6556   APR_TERM;
6557 #undef TEST_STRING
6558 #undef RESULT_STRING
6559 }
6560 void test_ixhtml10_h6_tag_008()
6561 {
6562 #define  TEST_STRING   "<h6 align=\"right\"></h6>"
6563 #define  RESULT_STRING "<h6 style=\"text-align:right;\"></h6>"
6564   char  *ret;
6565   char  *tmp;
6566   device_table spec;
6567   chxjconvrule_entry entry;
6568   cookie_t cookie;
6569   apr_size_t destlen;
6570   APR_INIT;
6571
6572   COOKIE_INIT(cookie);
6573
6574   SPEC_INIT(spec);
6575   destlen = sizeof(TEST_STRING)-1;
6576
6577   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6578   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6579   ret = chxj_rencoding(&r, ret, &destlen);
6580   fprintf(stderr, "actual:[%s]\n", ret);
6581   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6582   CU_ASSERT(ret != NULL);
6583   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6584   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6585
6586   APR_TERM;
6587 #undef TEST_STRING
6588 #undef RESULT_STRING
6589 }
6590 void test_ixhtml10_h6_tag_009()
6591 {
6592 #define  TEST_STRING   "<h6 align=\"center\"></h6>"
6593 #define  RESULT_STRING "<h6 style=\"text-align:center;\"></h6>"
6594   char  *ret;
6595   char  *tmp;
6596   device_table spec;
6597   chxjconvrule_entry entry;
6598   cookie_t cookie;
6599   apr_size_t destlen;
6600   APR_INIT;
6601
6602   COOKIE_INIT(cookie);
6603
6604   SPEC_INIT(spec);
6605   destlen = sizeof(TEST_STRING)-1;
6606
6607   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6608   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6609   ret = chxj_rencoding(&r, ret, &destlen);
6610   fprintf(stderr, "actual:[%s]\n", ret);
6611   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6612   CU_ASSERT(ret != NULL);
6613   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6614   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6615
6616   APR_TERM;
6617 #undef TEST_STRING
6618 #undef RESULT_STRING
6619 }
6620 void test_ixhtml10_h6_tag_010()
6621 {
6622 #define  TEST_STRING   "<h6 align=\"unkown\"></h6>"
6623 #define  RESULT_STRING "<h6></h6>"
6624   char  *ret;
6625   char  *tmp;
6626   device_table spec;
6627   chxjconvrule_entry entry;
6628   cookie_t cookie;
6629   apr_size_t destlen;
6630   APR_INIT;
6631
6632   COOKIE_INIT(cookie);
6633
6634   SPEC_INIT(spec);
6635   destlen = sizeof(TEST_STRING)-1;
6636
6637   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6638   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6639   ret = chxj_rencoding(&r, ret, &destlen);
6640   fprintf(stderr, "actual:[%s]\n", ret);
6641   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6642   CU_ASSERT(ret != NULL);
6643   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6644   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6645
6646   APR_TERM;
6647 #undef TEST_STRING
6648 #undef RESULT_STRING
6649 }
6650
6651 /*============================================================================*/
6652 /* <HEAD>                                                                     */
6653 /*============================================================================*/
6654 void test_ixhtml10_head_tag_001()
6655 {
6656 #define  TEST_STRING   "<head></head>"
6657 #define  RESULT_STRING "<head></head>"
6658   char  *ret;
6659   char  *tmp;
6660   device_table spec;
6661   chxjconvrule_entry entry;
6662   cookie_t cookie;
6663   apr_size_t destlen;
6664   APR_INIT;
6665
6666   COOKIE_INIT(cookie);
6667
6668   SPEC_INIT(spec);
6669   destlen = sizeof(TEST_STRING)-1;
6670
6671   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6672   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6673   ret = chxj_rencoding(&r, ret, &destlen);
6674   fprintf(stderr, "actual:[%s]\n", ret);
6675   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6676   CU_ASSERT(ret != NULL);
6677   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6678   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6679
6680   APR_TERM;
6681 #undef TEST_STRING
6682 #undef RESULT_STRING
6683 }
6684 void test_ixhtml10_head_tag_002()
6685 {
6686 #define  TEST_STRING "<head><title>あああ</title></head>"
6687 #define  RESULT_STRING "<head><title>あああ</title></head>"
6688   char  *ret;
6689   char  *tmp;
6690   device_table spec;
6691   chxjconvrule_entry entry;
6692   cookie_t cookie;
6693   apr_size_t destlen;
6694   APR_INIT;
6695
6696   COOKIE_INIT(cookie);
6697
6698   SPEC_INIT(spec);
6699   destlen = sizeof(TEST_STRING)-1;
6700
6701   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6702   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6703   ret = chxj_rencoding(&r, ret, &destlen);
6704   fprintf(stderr, "actual:[%s]\n", ret);
6705   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6706   CU_ASSERT(ret != NULL);
6707   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6708   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6709
6710   APR_TERM;
6711 #undef TEST_STRING
6712 #undef RESULT_STRING
6713 }
6714
6715 /*============================================================================*/
6716 /* <TITLE>                                                                    */
6717 /*============================================================================*/
6718 void test_ixhtml10_title_tag_001()
6719 {
6720 #define  TEST_STRING "<title></title>"
6721 #define  RESULT_STRING "<title></title>"
6722   char  *ret;
6723   char  *tmp;
6724   device_table spec;
6725   chxjconvrule_entry entry;
6726   cookie_t cookie;
6727   apr_size_t destlen;
6728   APR_INIT;
6729
6730   COOKIE_INIT(cookie);
6731
6732   SPEC_INIT(spec);
6733   destlen = sizeof(TEST_STRING)-1;
6734
6735   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6736   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6737   ret = chxj_rencoding(&r, ret, &destlen);
6738   fprintf(stderr, "actual:[%s]\n", ret);
6739   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6740   CU_ASSERT(ret != NULL);
6741   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6742   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6743
6744   APR_TERM;
6745 #undef TEST_STRING
6746 #undef RESULT_STRING
6747 }
6748 void test_ixhtml10_title_tag_002()
6749 {
6750 #define  TEST_STRING "<title>あああ</title>"
6751 #define  RESULT_STRING "<title>あああ</title>"
6752   char  *ret;
6753   char  *tmp;
6754   device_table spec;
6755   chxjconvrule_entry entry;
6756   cookie_t cookie;
6757   apr_size_t destlen;
6758   APR_INIT;
6759
6760   COOKIE_INIT(cookie);
6761
6762   SPEC_INIT(spec);
6763   destlen = sizeof(TEST_STRING)-1;
6764
6765   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6766   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6767   ret = chxj_rencoding(&r, ret, &destlen);
6768   fprintf(stderr, "actual:[%s]\n", ret);
6769   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6770   CU_ASSERT(ret != NULL);
6771   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6772   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6773
6774   APR_TERM;
6775 #undef TEST_STRING
6776 #undef RESULT_STRING
6777 }
6778
6779 /*============================================================================*/
6780 /* <BASE>                                                                     */
6781 /*============================================================================*/
6782 void test_ixhtml10_base_tag_001()
6783 {
6784 #define  TEST_STRING "<base>"
6785 #define  RESULT_STRING "<base />"
6786   char  *ret;
6787   char  *tmp;
6788   device_table spec;
6789   chxjconvrule_entry entry;
6790   cookie_t cookie;
6791   apr_size_t destlen;
6792   APR_INIT;
6793
6794   COOKIE_INIT(cookie);
6795
6796   SPEC_INIT(spec);
6797   destlen = sizeof(TEST_STRING)-1;
6798
6799   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6800   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6801   ret = chxj_rencoding(&r, ret, &destlen);
6802   fprintf(stderr, "actual:[%s]\n", ret);
6803   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6804   CU_ASSERT(ret != NULL);
6805   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6806   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6807
6808   APR_TERM;
6809 #undef TEST_STRING
6810 #undef RESULT_STRING
6811 }
6812 void test_ixhtml10_base_tag_href_attribute_001()
6813 {
6814 #define  TEST_STRING "<base href>"
6815 #define  RESULT_STRING "<base href=\"\" />"
6816   char  *ret;
6817   char  *tmp;
6818   device_table spec;
6819   chxjconvrule_entry entry;
6820   cookie_t cookie;
6821   apr_size_t destlen;
6822   APR_INIT;
6823
6824   COOKIE_INIT(cookie);
6825
6826   SPEC_INIT(spec);
6827   destlen = sizeof(TEST_STRING)-1;
6828
6829   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6830   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6831   ret = chxj_rencoding(&r, ret, &destlen);
6832   CU_ASSERT(ret != NULL);
6833   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6834   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6835
6836   APR_TERM;
6837 #undef TEST_STRING
6838 #undef RESULT_STRING
6839 }
6840 void test_ixhtml10_base_tag_href_attribute_002()
6841 {
6842 #define  TEST_STRING "<base href=\"\">"
6843 #define  RESULT_STRING "<base href=\"\" />"
6844   char  *ret;
6845   char  *tmp;
6846   device_table spec;
6847   chxjconvrule_entry entry;
6848   cookie_t cookie;
6849   apr_size_t destlen;
6850   APR_INIT;
6851
6852   COOKIE_INIT(cookie);
6853
6854   SPEC_INIT(spec);
6855   destlen = sizeof(TEST_STRING)-1;
6856
6857   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6858   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6859   ret = chxj_rencoding(&r, ret, &destlen);
6860   CU_ASSERT(ret != NULL);
6861   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6862   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6863
6864   APR_TERM;
6865 #undef TEST_STRING
6866 #undef RESULT_STRING
6867 }
6868 void test_ixhtml10_base_tag_href_attribute_003()
6869 {
6870 #define  TEST_STRING "<base href=\"http://www.google.co.jp/\">"
6871 #define  RESULT_STRING "<base href=\"http://www.google.co.jp/\" />"
6872   char  *ret;
6873   char  *tmp;
6874   device_table spec;
6875   chxjconvrule_entry entry;
6876   cookie_t cookie;
6877   apr_size_t destlen;
6878   APR_INIT;
6879
6880   COOKIE_INIT(cookie);
6881
6882   SPEC_INIT(spec);
6883   destlen = sizeof(TEST_STRING)-1;
6884
6885   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6886   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6887   ret = chxj_rencoding(&r, ret, &destlen);
6888   CU_ASSERT(ret != NULL);
6889   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6890   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6891
6892   APR_TERM;
6893 #undef TEST_STRING
6894 #undef RESULT_STRING
6895 }
6896 void test_ixhtml10_base_tag_href_attribute_004()
6897 {
6898 #define  TEST_STRING "<base href=\".\">"
6899 #define  RESULT_STRING "<base href=\".\" />"
6900   char  *ret;
6901   char  *tmp;
6902   device_table spec;
6903   chxjconvrule_entry entry;
6904   cookie_t cookie;
6905   apr_size_t destlen;
6906   APR_INIT;
6907
6908   COOKIE_INIT(cookie);
6909
6910   SPEC_INIT(spec);
6911   destlen = sizeof(TEST_STRING)-1;
6912
6913   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6914   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6915   ret = chxj_rencoding(&r, ret, &destlen);
6916   CU_ASSERT(ret != NULL);
6917   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6918   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6919
6920   APR_TERM;
6921 #undef TEST_STRING
6922 #undef RESULT_STRING
6923 }
6924
6925 /*============================================================================*/
6926 /* <BODY>                                                                     */
6927 /*============================================================================*/
6928 void test_ixhtml10_body_tag_001()
6929 {
6930 #define  TEST_STRING "<body></body>"
6931 #define  RESULT_STRING "<body></body>"
6932   char  *ret;
6933   char  *tmp;
6934   device_table spec;
6935   chxjconvrule_entry entry;
6936   cookie_t cookie;
6937   apr_size_t destlen;
6938   APR_INIT;
6939
6940   COOKIE_INIT(cookie);
6941
6942   SPEC_INIT(spec);
6943   destlen = sizeof(TEST_STRING)-1;
6944
6945   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6946   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6947   ret = chxj_rencoding(&r, ret, &destlen);
6948   fprintf(stderr, "actual:[%s]\n", ret);
6949   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6950   CU_ASSERT(ret != NULL);
6951   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6952   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6953
6954   APR_TERM;
6955 #undef TEST_STRING
6956 #undef RESULT_STRING
6957 }
6958 void test_ixhtml10_body_tag_002()
6959 {
6960 #define  TEST_STRING   "<body bgcolor>"
6961 #define  RESULT_STRING "<body></body>"
6962   char  *ret;
6963   char  *tmp;
6964   device_table spec;
6965   chxjconvrule_entry entry;
6966   cookie_t cookie;
6967   apr_size_t destlen;
6968   APR_INIT;
6969
6970   COOKIE_INIT(cookie);
6971
6972   SPEC_INIT(spec);
6973   destlen = sizeof(TEST_STRING)-1;
6974
6975   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
6976   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
6977   ret = chxj_rencoding(&r, ret, &destlen);
6978   fprintf(stderr, "actual:[%s]\n", ret);
6979   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
6980   CU_ASSERT(ret != NULL);
6981   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
6982   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
6983
6984   APR_TERM;
6985 #undef TEST_STRING
6986 #undef RESULT_STRING
6987 }
6988 void test_ixhtml10_body_tag_003()
6989 {
6990 #define  TEST_STRING "<body bgcolor=\"\"></body>"
6991 #define  RESULT_STRING "<body></body>"
6992   char  *ret;
6993   char  *tmp;
6994   device_table spec;
6995   chxjconvrule_entry entry;
6996   cookie_t cookie;
6997   apr_size_t destlen;
6998   APR_INIT;
6999
7000   COOKIE_INIT(cookie);
7001
7002   SPEC_INIT(spec);
7003   destlen = sizeof(TEST_STRING)-1;
7004
7005   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7006   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7007   ret = chxj_rencoding(&r, ret, &destlen);
7008   fprintf(stderr, "actual:[%s]\n", ret);
7009   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7010   CU_ASSERT(ret != NULL);
7011   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7012   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7013
7014   APR_TERM;
7015 #undef TEST_STRING
7016 #undef RESULT_STRING
7017 }
7018 void test_ixhtml10_body_tag_004()
7019 {
7020 #define  TEST_STRING "<body bgcolor=\"#ff0000\"></body>"
7021 #define  RESULT_STRING "<body style=\"background-color:#ff0000;\"></body>"
7022   char  *ret;
7023   char  *tmp;
7024   device_table spec;
7025   chxjconvrule_entry entry;
7026   cookie_t cookie;
7027   apr_size_t destlen;
7028   APR_INIT;
7029
7030   COOKIE_INIT(cookie);
7031
7032   SPEC_INIT(spec);
7033   destlen = sizeof(TEST_STRING)-1;
7034
7035   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7036   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7037   ret = chxj_rencoding(&r, ret, &destlen);
7038   fprintf(stderr, "actual:[%s]\n", ret);
7039   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7040   CU_ASSERT(ret != NULL);
7041   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7042   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7043
7044   APR_TERM;
7045 #undef TEST_STRING
7046 #undef RESULT_STRING
7047 }
7048 void test_ixhtml10_body_tag_005()
7049 {
7050 #define  TEST_STRING "<body text></body>"
7051 #define  RESULT_STRING "<body></body>"
7052   char  *ret;
7053   char  *tmp;
7054   device_table spec;
7055   chxjconvrule_entry entry;
7056   cookie_t cookie;
7057   apr_size_t destlen;
7058   APR_INIT;
7059
7060   COOKIE_INIT(cookie);
7061
7062   SPEC_INIT(spec);
7063   destlen = sizeof(TEST_STRING)-1;
7064
7065   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7066   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7067   ret = chxj_rencoding(&r, ret, &destlen);
7068   fprintf(stderr, "actual:[%s]\n", ret);
7069   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7070   CU_ASSERT(ret != NULL);
7071   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7072   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7073
7074   APR_TERM;
7075 #undef TEST_STRING
7076 #undef RESULT_STRING
7077 }
7078 void test_ixhtml10_body_tag_006()
7079 {
7080 #define  TEST_STRING "<body text=\"\"></body>"
7081 #define  RESULT_STRING "<body></body>"
7082   char  *ret;
7083   char  *tmp;
7084   device_table spec;
7085   chxjconvrule_entry entry;
7086   cookie_t cookie;
7087   apr_size_t destlen;
7088   APR_INIT;
7089
7090   COOKIE_INIT(cookie);
7091
7092   SPEC_INIT(spec);
7093   destlen = sizeof(TEST_STRING)-1;
7094
7095   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7096   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7097   ret = chxj_rencoding(&r, ret, &destlen);
7098   fprintf(stderr, "actual:[%s]\n", ret);
7099   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7100   CU_ASSERT(ret != NULL);
7101   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7102   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7103
7104   APR_TERM;
7105 #undef TEST_STRING
7106 #undef RESULT_STRING
7107 }
7108 void test_ixhtml10_body_tag_007()
7109 {
7110 #define  TEST_STRING "<body text=\"#ff0000\"></body>"
7111 #define  RESULT_STRING "<body style=\"color:#ff0000;\"></body>"
7112   char  *ret;
7113   char  *tmp;
7114   device_table spec;
7115   chxjconvrule_entry entry;
7116   cookie_t cookie;
7117   apr_size_t destlen;
7118   APR_INIT;
7119
7120   COOKIE_INIT(cookie);
7121
7122   SPEC_INIT(spec);
7123   destlen = sizeof(TEST_STRING)-1;
7124
7125   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7126   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7127   ret = chxj_rencoding(&r, ret, &destlen);
7128   fprintf(stderr, "actual:[%s]\n", ret);
7129   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7130   CU_ASSERT(ret != NULL);
7131   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7132   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7133
7134   APR_TERM;
7135 #undef TEST_STRING
7136 #undef RESULT_STRING
7137 }
7138 void test_ixhtml10_body_tag_008()
7139 {
7140 #define  TEST_STRING "<body link></body>"
7141 #define  RESULT_STRING "<body></body>"
7142   char  *ret;
7143   char  *tmp;
7144   device_table spec;
7145   chxjconvrule_entry entry;
7146   cookie_t cookie;
7147   apr_size_t destlen;
7148   APR_INIT;
7149
7150   COOKIE_INIT(cookie);
7151
7152   SPEC_INIT(spec);
7153   destlen = sizeof(TEST_STRING)-1;
7154
7155   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7156   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7157   ret = chxj_rencoding(&r, ret, &destlen);
7158   fprintf(stderr, "actual:[%s]\n", ret);
7159   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7160   CU_ASSERT(ret != NULL);
7161   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7162   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7163
7164   APR_TERM;
7165 #undef TEST_STRING
7166 #undef RESULT_STRING
7167 }
7168 void test_ixhtml10_body_tag_009()
7169 {
7170 #define  TEST_STRING "<body link=\"\"></body>"
7171 #define  RESULT_STRING "<body></body>"
7172   char  *ret;
7173   char  *tmp;
7174   device_table spec;
7175   chxjconvrule_entry entry;
7176   cookie_t cookie;
7177   apr_size_t destlen;
7178   APR_INIT;
7179
7180   COOKIE_INIT(cookie);
7181
7182   SPEC_INIT(spec);
7183   destlen = sizeof(TEST_STRING)-1;
7184
7185   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7186   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7187   ret = chxj_rencoding(&r, ret, &destlen);
7188   fprintf(stderr, "actual:[%s]\n", ret);
7189   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7190   CU_ASSERT(ret != NULL);
7191   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7192   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7193
7194   APR_TERM;
7195 #undef TEST_STRING
7196 #undef RESULT_STRING
7197 }
7198 void test_ixhtml10_body_tag_010()
7199 {
7200 #define  TEST_STRING   "<html><head></head><body link=\"#ff0000\"></body></html>"
7201 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
7202                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
7203                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
7204                        "<head><style type=\"text/css\">" \
7205                        "<![CDATA[" \
7206                        "a:link { color:#ff0000; }" \
7207                        "]]>" \
7208                        "</style></head>" \
7209                        "<body></body></html>"
7210   char  *ret;
7211   char  *tmp;
7212   device_table spec;
7213   chxjconvrule_entry entry;
7214   cookie_t cookie;
7215   apr_size_t destlen;
7216   APR_INIT;
7217
7218   COOKIE_INIT(cookie);
7219
7220   SPEC_INIT(spec);
7221   destlen = sizeof(TEST_STRING)-1;
7222
7223   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7224   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7225   ret = chxj_rencoding(&r, ret, &destlen);
7226   fprintf(stderr, "actual:[%s]\n", ret);
7227   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7228   CU_ASSERT(ret != NULL);
7229   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7230   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7231
7232   APR_TERM;
7233 #undef TEST_STRING
7234 #undef RESULT_STRING
7235 }
7236 void test_ixhtml10_body_tag_011()
7237 {
7238 #define  TEST_STRING   "<body vlink></body>"
7239 #define  RESULT_STRING "<body></body>"
7240   char  *ret;
7241   char  *tmp;
7242   device_table spec;
7243   chxjconvrule_entry entry;
7244   cookie_t cookie;
7245   apr_size_t destlen;
7246   APR_INIT;
7247
7248   COOKIE_INIT(cookie);
7249
7250   SPEC_INIT(spec);
7251   destlen = sizeof(TEST_STRING)-1;
7252
7253   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7254   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7255   ret = chxj_rencoding(&r, ret, &destlen);
7256   fprintf(stderr, "actual:[%s]\n", ret);
7257   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7258   CU_ASSERT(ret != NULL);
7259   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7260   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7261
7262   APR_TERM;
7263 #undef TEST_STRING
7264 #undef RESULT_STRING
7265 }
7266 void test_ixhtml10_body_tag_012()
7267 {
7268 #define  TEST_STRING   "<body vlink=\"\"></body>"
7269 #define  RESULT_STRING "<body></body>"
7270   char  *ret;
7271   char  *tmp;
7272   device_table spec;
7273   chxjconvrule_entry entry;
7274   cookie_t cookie;
7275   apr_size_t destlen;
7276   APR_INIT;
7277
7278   COOKIE_INIT(cookie);
7279
7280   SPEC_INIT(spec);
7281   destlen = sizeof(TEST_STRING)-1;
7282
7283   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7284   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7285   ret = chxj_rencoding(&r, ret, &destlen);
7286   fprintf(stderr, "actual:[%s]\n", ret);
7287   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7288   CU_ASSERT(ret != NULL);
7289   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7290   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7291
7292   APR_TERM;
7293 #undef TEST_STRING
7294 #undef RESULT_STRING
7295 }
7296 void test_ixhtml10_body_tag_013()
7297 {
7298 #define  TEST_STRING   "<html><head></head><body vlink=\"#ff0000\"></body></html>"
7299 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
7300                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
7301                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
7302                        "<head><style type=\"text/css\">" \
7303                        "<![CDATA[" \
7304                        "a:visited { color:#ff0000; }" \
7305                        "]]>" \
7306                        "</style></head>" \
7307                        "<body></body></html>"
7308   char  *ret;
7309   char  *tmp;
7310   device_table spec;
7311   chxjconvrule_entry entry;
7312   cookie_t cookie;
7313   apr_size_t destlen;
7314   APR_INIT;
7315
7316   COOKIE_INIT(cookie);
7317
7318   SPEC_INIT(spec);
7319   destlen = sizeof(TEST_STRING)-1;
7320
7321   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7322   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7323   ret = chxj_rencoding(&r, ret, &destlen);
7324   fprintf(stderr, "actual:[%s]\n", ret);
7325   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7326
7327   CU_ASSERT(ret != NULL);
7328   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7329   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7330
7331   APR_TERM;
7332 #undef TEST_STRING
7333 #undef RESULT_STRING
7334 }
7335 void test_ixhtml10_body_tag_014()
7336 {
7337 #define  TEST_STRING   "<html><head></head><body alink=\"#ff0000\"></body></html>"
7338 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
7339                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
7340                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
7341                        "<head><style type=\"text/css\">" \
7342                        "<![CDATA[" \
7343                        "a:focus { color:#ff0000; }" \
7344                        "]]>" \
7345                        "</style></head>" \
7346                        "<body></body></html>"
7347   char  *ret;
7348   char  *tmp;
7349   device_table spec;
7350   chxjconvrule_entry entry;
7351   cookie_t cookie;
7352   apr_size_t destlen;
7353   APR_INIT;
7354
7355   COOKIE_INIT(cookie);
7356
7357   SPEC_INIT(spec);
7358   destlen = sizeof(TEST_STRING)-1;
7359
7360   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7361   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7362   ret = chxj_rencoding(&r, ret, &destlen);
7363   fprintf(stderr, "actual:[%s]\n", ret);
7364   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7365   CU_ASSERT(ret != NULL);
7366   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7367   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7368
7369   APR_TERM;
7370 #undef TEST_STRING
7371 #undef RESULT_STRING
7372 }
7373 void test_ixhtml10_body_tag_015()
7374 {
7375 #define  TEST_STRING "<body boyoyon=\"#FF0000\"></body>"
7376 #define  RESULT_STRING "<body></body>"
7377   char  *ret;
7378   char  *tmp;
7379   device_table spec;
7380   chxjconvrule_entry entry;
7381   cookie_t cookie;
7382   apr_size_t destlen;
7383   APR_INIT;
7384
7385   COOKIE_INIT(cookie);
7386
7387   SPEC_INIT(spec);
7388   destlen = sizeof(TEST_STRING)-1;
7389
7390   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7391   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7392   ret = chxj_rencoding(&r, ret, &destlen);
7393   fprintf(stderr, "actual:[%s]\n", ret);
7394   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7395   CU_ASSERT(ret != NULL);
7396   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7397   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7398
7399   APR_TERM;
7400 #undef TEST_STRING
7401 #undef RESULT_STRING
7402 }
7403
7404 /*===========================================================================*/
7405 /* style tag                                                                 */
7406 /*===========================================================================*/
7407 void test_ixhtml10_style_tag_001()
7408 {
7409 #define  TEST_STRING "<html><head>" \
7410                      "<style type=\"text/css\">span { color: #ff0000; }</style>" \
7411                      "</head><body><span>あいう</span></body></html>"
7412 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
7413                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
7414                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
7415                        "<head></head><body><span style=\"color:#ff0000;\">あいう</span></body></html>"
7416   char  *ret;
7417   char  *tmp;
7418   device_table spec;
7419   chxjconvrule_entry entry;
7420   cookie_t cookie;
7421   apr_size_t destlen;
7422   APR_INIT;
7423
7424   COOKIE_INIT(cookie);
7425
7426   SPEC_INIT(spec);
7427   destlen = sizeof(TEST_STRING)-1;
7428   entry.action |= CONVRULE_CSS_ON_BIT;
7429
7430   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7431   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7432   ret = chxj_rencoding(&r, ret, &destlen);
7433   CU_ASSERT(ret != NULL);
7434   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7435   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7436
7437   APR_TERM;
7438 #undef TEST_STRING
7439 #undef RESULT_STRING
7440 }
7441 void test_ixhtml10_style_tag_002()
7442 {
7443 #define  TEST_STRING "<html><head>" \
7444                      "<style type=\"text/css\"></style>" \
7445                      "</head><body><span>あいう</span></body></html>"
7446 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
7447                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
7448                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
7449                        "<head></head><body><span>あいう</span></body></html>"
7450   char  *ret;
7451   char  *tmp;
7452   device_table spec;
7453   chxjconvrule_entry entry;
7454   cookie_t cookie;
7455   apr_size_t destlen;
7456   APR_INIT;
7457
7458   COOKIE_INIT(cookie);
7459
7460   SPEC_INIT(spec);
7461   destlen = sizeof(TEST_STRING)-1;
7462   entry.action |= CONVRULE_CSS_ON_BIT;
7463
7464   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7465   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7466   ret = chxj_rencoding(&r, ret, &destlen);
7467   CU_ASSERT(ret != NULL);
7468   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7469   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7470
7471   APR_TERM;
7472 #undef TEST_STRING
7473 #undef RESULT_STRING
7474 }
7475 void test_ixhtml10_style_tag_003()
7476 {
7477 #define  TEST_STRING "<html><head>" \
7478                      "<style></style>" \
7479                      "</head><body><span>あいう</span></body></html>"
7480 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
7481                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
7482                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
7483                        "<head></head><body><span>あいう</span></body></html>"
7484   char  *ret;
7485   char  *tmp;
7486   device_table spec;
7487   chxjconvrule_entry entry;
7488   cookie_t cookie;
7489   apr_size_t destlen;
7490   APR_INIT;
7491
7492   COOKIE_INIT(cookie);
7493
7494   SPEC_INIT(spec);
7495   destlen = sizeof(TEST_STRING)-1;
7496   entry.action |= CONVRULE_CSS_ON_BIT;
7497
7498   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7499   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7500   ret = chxj_rencoding(&r, ret, &destlen);
7501   CU_ASSERT(ret != NULL);
7502   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7503   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7504
7505   APR_TERM;
7506 #undef TEST_STRING
7507 #undef RESULT_STRING
7508 }
7509 /*============================================================================*/
7510 /* <BR>                                                                       */
7511 /*============================================================================*/
7512 void test_ixhtml10_br_tag_001()
7513 {
7514 #define  TEST_STRING "<br>"
7515 #define  RESULT_STRING "<br />"
7516   char  *ret;
7517   char  *tmp;
7518   device_table spec;
7519   chxjconvrule_entry entry;
7520   cookie_t cookie;
7521   apr_size_t destlen;
7522   APR_INIT;
7523
7524   COOKIE_INIT(cookie);
7525
7526   SPEC_INIT(spec);
7527   destlen = sizeof(TEST_STRING)-1;
7528
7529   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7530   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7531   ret = chxj_rencoding(&r, ret, &destlen);
7532   fprintf(stderr, "actual:[%s]\n", ret);
7533   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7534   CU_ASSERT(ret != NULL);
7535   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7536   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7537
7538   APR_TERM;
7539 #undef TEST_STRING
7540 #undef RESULT_STRING
7541 }
7542 void test_ixhtml10_br_tag_002()
7543 {
7544 #define  TEST_STRING "<br clear=\"left\">"
7545 #define  RESULT_STRING "<br style=\"clear:left;\" />"
7546   char  *ret;
7547   char  *tmp;
7548   device_table spec;
7549   chxjconvrule_entry entry;
7550   cookie_t cookie;
7551   apr_size_t destlen;
7552   APR_INIT;
7553
7554   COOKIE_INIT(cookie);
7555
7556   SPEC_INIT(spec);
7557   destlen = sizeof(TEST_STRING)-1;
7558
7559   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7560   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7561   ret = chxj_rencoding(&r, ret, &destlen);
7562   fprintf(stderr, "actual:[%s]\n", ret);
7563   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7564   CU_ASSERT(ret != NULL);
7565   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7566   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7567
7568   APR_TERM;
7569 #undef TEST_STRING
7570 #undef RESULT_STRING
7571 }
7572 void test_ixhtml10_br_tag_003()
7573 {
7574 #define  TEST_STRING   "<br clear=\"right\">"
7575 #define  RESULT_STRING "<br style=\"clear:right;\" />"
7576   char  *ret;
7577   char  *tmp;
7578   device_table spec;
7579   chxjconvrule_entry entry;
7580   cookie_t cookie;
7581   apr_size_t destlen;
7582   APR_INIT;
7583
7584   COOKIE_INIT(cookie);
7585
7586   SPEC_INIT(spec);
7587   destlen = sizeof(TEST_STRING)-1;
7588
7589   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7590   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7591   ret = chxj_rencoding(&r, ret, &destlen);
7592   fprintf(stderr, "actual:[%s]\n", ret);
7593   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7594   CU_ASSERT(ret != NULL);
7595   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7596   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7597
7598   APR_TERM;
7599 #undef TEST_STRING
7600 #undef RESULT_STRING
7601 }
7602 void test_ixhtml10_br_tag_004()
7603 {
7604 #define  TEST_STRING "<br clear=\"all\">"
7605 #define  RESULT_STRING "<br style=\"clear:both;\" />"
7606   char  *ret;
7607   char  *tmp;
7608   device_table spec;
7609   chxjconvrule_entry entry;
7610   cookie_t cookie;
7611   apr_size_t destlen;
7612   APR_INIT;
7613
7614   COOKIE_INIT(cookie);
7615
7616   SPEC_INIT(spec);
7617   destlen = sizeof(TEST_STRING)-1;
7618
7619   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7620   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7621   ret = chxj_rencoding(&r, ret, &destlen);
7622   fprintf(stderr, "actual:[%s]\n", ret);
7623   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7624   CU_ASSERT(ret != NULL);
7625   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7626   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7627
7628   APR_TERM;
7629 #undef TEST_STRING
7630 #undef RESULT_STRING
7631 }
7632 void test_ixhtml10_br_tag_005()
7633 {
7634 #define  TEST_STRING   "<br clear=\"\">"
7635 #define  RESULT_STRING "<br />"
7636   char  *ret;
7637   char  *tmp;
7638   device_table spec;
7639   chxjconvrule_entry entry;
7640   cookie_t cookie;
7641   apr_size_t destlen;
7642   APR_INIT;
7643
7644   COOKIE_INIT(cookie);
7645
7646   SPEC_INIT(spec);
7647   destlen = sizeof(TEST_STRING)-1;
7648
7649   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7650   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7651   ret = chxj_rencoding(&r, ret, &destlen);
7652   fprintf(stderr, "actual:[%s]\n", ret);
7653   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7654   CU_ASSERT(ret != NULL);
7655   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7656   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7657
7658   APR_TERM;
7659 #undef TEST_STRING
7660 #undef RESULT_STRING
7661 }
7662 void test_ixhtml10_br_tag_006()
7663 {
7664 #define  TEST_STRING   "<br clear>"
7665 #define  RESULT_STRING "<br />"
7666   char  *ret;
7667   char  *tmp;
7668   device_table spec;
7669   chxjconvrule_entry entry;
7670   cookie_t cookie;
7671   apr_size_t destlen;
7672   APR_INIT;
7673
7674   COOKIE_INIT(cookie);
7675
7676   SPEC_INIT(spec);
7677   destlen = sizeof(TEST_STRING)-1;
7678
7679   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7680   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7681   ret = chxj_rencoding(&r, ret, &destlen);
7682   fprintf(stderr, "actual:[%s]\n", ret);
7683   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7684   CU_ASSERT(ret != NULL);
7685   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7686   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7687
7688   APR_TERM;
7689 #undef TEST_STRING
7690 #undef RESULT_STRING
7691 }
7692 void test_ixhtml10_br_tag_007()
7693 {
7694 #define  TEST_STRING   "<br clear=\"abc\">"
7695 #define  RESULT_STRING "<br />"
7696   char  *ret;
7697   char  *tmp;
7698   device_table spec;
7699   chxjconvrule_entry entry;
7700   cookie_t cookie;
7701   apr_size_t destlen;
7702   APR_INIT;
7703
7704   COOKIE_INIT(cookie);
7705
7706   SPEC_INIT(spec);
7707   destlen = sizeof(TEST_STRING)-1;
7708
7709   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7710   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7711   ret = chxj_rencoding(&r, ret, &destlen);
7712   fprintf(stderr, "actual:[%s]\n", ret);
7713   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7714   CU_ASSERT(ret != NULL);
7715   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7716   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7717
7718   APR_TERM;
7719 #undef TEST_STRING
7720 #undef RESULT_STRING
7721 }
7722 /*============================================================================*/
7723 /* <BLOCKQUOTE>                                                               */
7724 /*============================================================================*/
7725 void test_ixhtml10_blockquote_tag_001()
7726 {
7727 #define  TEST_STRING "<blockquote></blockquote>"
7728 #define  RESULT_STRING "<blockquote></blockquote>"
7729   char  *ret;
7730   char  *tmp;
7731   device_table spec;
7732   chxjconvrule_entry entry;
7733   cookie_t cookie;
7734   apr_size_t destlen;
7735   APR_INIT;
7736
7737   COOKIE_INIT(cookie);
7738
7739   SPEC_INIT(spec);
7740   destlen = sizeof(TEST_STRING)-1;
7741
7742   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7743   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7744   ret = chxj_rencoding(&r, ret, &destlen);
7745   fprintf(stderr, "actual:[%s]\n", ret);
7746   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7747   CU_ASSERT(ret != NULL);
7748   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7749   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7750
7751   APR_TERM;
7752 #undef TEST_STRING
7753 #undef RESULT_STRING
7754 }
7755 void test_ixhtml10_blockquote_tag_002()
7756 {
7757 #define  TEST_STRING "<blockquote>abc</blockquote>"
7758 #define  RESULT_STRING "<blockquote>abc</blockquote>"
7759   char  *ret;
7760   char  *tmp;
7761   device_table spec;
7762   chxjconvrule_entry entry;
7763   cookie_t cookie;
7764   apr_size_t destlen;
7765   APR_INIT;
7766
7767   COOKIE_INIT(cookie);
7768
7769   SPEC_INIT(spec);
7770   destlen = sizeof(TEST_STRING)-1;
7771
7772   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7773   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7774   ret = chxj_rencoding(&r, ret, &destlen);
7775   fprintf(stderr, "actual:[%s]\n", ret);
7776   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7777   CU_ASSERT(ret != NULL);
7778   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7779   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7780
7781   APR_TERM;
7782 #undef TEST_STRING
7783 #undef RESULT_STRING
7784 }
7785 void test_ixhtml10_blockquote_tag_003()
7786 {
7787 #define  TEST_STRING "<blockquote>亀さん</blockquote>"
7788 #define  RESULT_STRING "<blockquote>亀さん</blockquote>"
7789   char  *ret;
7790   char  *tmp;
7791   device_table spec;
7792   chxjconvrule_entry entry;
7793   cookie_t cookie;
7794   apr_size_t destlen;
7795   APR_INIT;
7796
7797   COOKIE_INIT(cookie);
7798
7799   SPEC_INIT(spec);
7800   destlen = sizeof(TEST_STRING)-1;
7801
7802   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7803   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7804   ret = chxj_rencoding(&r, ret, &destlen);
7805   fprintf(stderr, "actual:[%s]\n", ret);
7806   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7807   CU_ASSERT(ret != NULL);
7808   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7809   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7810
7811   APR_TERM;
7812 #undef TEST_STRING
7813 #undef RESULT_STRING
7814 }
7815 void test_ixhtml10_blockquote_tag_004()
7816 {
7817 #define  TEST_STRING "<blockquote>ハンカク</blockquote>"
7818 #define  RESULT_STRING "<blockquote>ハンカク</blockquote>"
7819   char  *ret;
7820   char  *tmp;
7821   device_table spec;
7822   chxjconvrule_entry entry;
7823   cookie_t cookie;
7824   apr_size_t destlen;
7825   APR_INIT;
7826
7827   COOKIE_INIT(cookie);
7828
7829   SPEC_INIT(spec);
7830   destlen = sizeof(TEST_STRING)-1;
7831
7832   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7833   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7834   ret = chxj_rencoding(&r, ret, &destlen);
7835   fprintf(stderr, "actual:[%s]\n", ret);
7836   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7837   CU_ASSERT(ret != NULL);
7838   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7839   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7840
7841   APR_TERM;
7842 #undef TEST_STRING
7843 #undef RESULT_STRING
7844 }
7845 /*============================================================================*/
7846 /* <CENTER>                                                                   */
7847 /*============================================================================*/
7848 void test_ixhtml10_center_tag_001()
7849 {
7850 #define  TEST_STRING "<center>あいうえお</center>"
7851 #define  RESULT_STRING "<div style=\"text-align:center;\">あいうえお</div>"
7852   char  *ret;
7853   char  *tmp;
7854   device_table spec;
7855   chxjconvrule_entry entry;
7856   cookie_t cookie;
7857   apr_size_t destlen;
7858   APR_INIT;
7859
7860   COOKIE_INIT(cookie);
7861
7862   SPEC_INIT(spec);
7863   destlen = sizeof(TEST_STRING)-1;
7864
7865   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7866   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7867   ret = chxj_rencoding(&r, ret, &destlen);
7868   fprintf(stderr, "actual:[%s]\n", ret);
7869   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7870   CU_ASSERT(ret != NULL);
7871   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7872   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7873
7874   APR_TERM;
7875 #undef TEST_STRING
7876 #undef RESULT_STRING
7877 }
7878 /*============================================================================*/
7879 /* <DIR>                                                                      */
7880 /*============================================================================*/
7881 void test_ixhtml10_dir_tag_001()
7882 {
7883 #define  TEST_STRING "<dir><li>あああ</li><li>いいい</li></dir>"
7884 #define  RESULT_STRING "<ul><li>あああ</li><li>いいい</li></ul>"
7885   char  *ret;
7886   char  *tmp;
7887   device_table spec;
7888   chxjconvrule_entry entry;
7889   cookie_t cookie;
7890   apr_size_t destlen;
7891   APR_INIT;
7892
7893   COOKIE_INIT(cookie);
7894
7895   SPEC_INIT(spec);
7896   destlen = sizeof(TEST_STRING)-1;
7897
7898   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7899   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7900   ret = chxj_rencoding(&r, ret, &destlen);
7901   fprintf(stderr, "actual:[%s]\n", ret);
7902   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7903   CU_ASSERT(ret != NULL);
7904   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7905   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7906
7907   APR_TERM;
7908 #undef TEST_STRING
7909 #undef RESULT_STRING
7910 }
7911 void test_ixhtml10_dir_tag_002()
7912 {
7913 #define  TEST_STRING "<dir></dir>"
7914 #define  RESULT_STRING "<ul></ul>"
7915   char  *ret;
7916   char  *tmp;
7917   device_table spec;
7918   chxjconvrule_entry entry;
7919   cookie_t cookie;
7920   apr_size_t destlen;
7921   APR_INIT;
7922
7923   COOKIE_INIT(cookie);
7924
7925   SPEC_INIT(spec);
7926   destlen = sizeof(TEST_STRING)-1;
7927
7928   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7929   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7930   ret = chxj_rencoding(&r, ret, &destlen);
7931   fprintf(stderr, "actual:[%s]\n", ret);
7932   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7933   CU_ASSERT(ret != NULL);
7934   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7935   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7936
7937   APR_TERM;
7938 #undef TEST_STRING
7939 #undef RESULT_STRING
7940 }
7941 void test_ixhtml10_dir_tag_003()
7942 {
7943 #define  TEST_STRING "<dir type=\"disc\"></dir>"
7944 #define  RESULT_STRING "<ul style=\"list-style-type:disc;\"></ul>"
7945   char  *ret;
7946   char  *tmp;
7947   device_table spec;
7948   chxjconvrule_entry entry;
7949   cookie_t cookie;
7950   apr_size_t destlen;
7951   APR_INIT;
7952
7953   COOKIE_INIT(cookie);
7954
7955   SPEC_INIT(spec);
7956   destlen = sizeof(TEST_STRING)-1;
7957
7958   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7959   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7960   ret = chxj_rencoding(&r, ret, &destlen);
7961   fprintf(stderr, "actual:[%s]\n", ret);
7962   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7963   CU_ASSERT(ret != NULL);
7964   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7965   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7966
7967   APR_TERM;
7968 #undef TEST_STRING
7969 #undef RESULT_STRING
7970 }
7971 void test_ixhtml10_dir_tag_004()
7972 {
7973 #define  TEST_STRING "<dir type=\"circle\"></dir>"
7974 #define  RESULT_STRING "<ul style=\"list-style-type:circle;\"></ul>"
7975   char  *ret;
7976   char  *tmp;
7977   device_table spec;
7978   chxjconvrule_entry entry;
7979   cookie_t cookie;
7980   apr_size_t destlen;
7981   APR_INIT;
7982
7983   COOKIE_INIT(cookie);
7984
7985   SPEC_INIT(spec);
7986   destlen = sizeof(TEST_STRING)-1;
7987
7988   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
7989   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
7990   ret = chxj_rencoding(&r, ret, &destlen);
7991   fprintf(stderr, "actual:[%s]\n", ret);
7992   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
7993   CU_ASSERT(ret != NULL);
7994   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
7995   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
7996
7997   APR_TERM;
7998 #undef TEST_STRING
7999 #undef RESULT_STRING
8000 }
8001 void test_ixhtml10_dir_tag_005()
8002 {
8003 #define  TEST_STRING "<dir type=\"square\"></dir>"
8004 #define  RESULT_STRING "<ul style=\"list-style-type:square;\"></ul>"
8005   char  *ret;
8006   char  *tmp;
8007   device_table spec;
8008   chxjconvrule_entry entry;
8009   cookie_t cookie;
8010   apr_size_t destlen;
8011   APR_INIT;
8012
8013   COOKIE_INIT(cookie);
8014
8015   SPEC_INIT(spec);
8016   destlen = sizeof(TEST_STRING)-1;
8017
8018   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8019   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8020   ret = chxj_rencoding(&r, ret, &destlen);
8021   fprintf(stderr, "actual:[%s]\n", ret);
8022   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8023   CU_ASSERT(ret != NULL);
8024   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8025   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8026
8027   APR_TERM;
8028 #undef TEST_STRING
8029 #undef RESULT_STRING
8030 }
8031 void test_ixhtml10_dir_tag_006()
8032 {
8033 #define  TEST_STRING "<dir type=\"\"></dir>"
8034 #define  RESULT_STRING "<ul></ul>"
8035   char  *ret;
8036   char  *tmp;
8037   device_table spec;
8038   chxjconvrule_entry entry;
8039   cookie_t cookie;
8040   apr_size_t destlen;
8041   APR_INIT;
8042
8043   COOKIE_INIT(cookie);
8044
8045   SPEC_INIT(spec);
8046   destlen = sizeof(TEST_STRING)-1;
8047
8048   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8049   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8050   ret = chxj_rencoding(&r, ret, &destlen);
8051   fprintf(stderr, "actual:[%s]\n", ret);
8052   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8053   CU_ASSERT(ret != NULL);
8054   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8055   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8056
8057   APR_TERM;
8058 #undef TEST_STRING
8059 #undef RESULT_STRING
8060 }
8061 void test_ixhtml10_dir_tag_007()
8062 {
8063 #define  TEST_STRING "<dir type></dir>"
8064 #define  RESULT_STRING "<ul></ul>"
8065   char  *ret;
8066   char  *tmp;
8067   device_table spec;
8068   chxjconvrule_entry entry;
8069   cookie_t cookie;
8070   apr_size_t destlen;
8071   APR_INIT;
8072
8073   COOKIE_INIT(cookie);
8074
8075   SPEC_INIT(spec);
8076   destlen = sizeof(TEST_STRING)-1;
8077
8078   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8079   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8080   ret = chxj_rencoding(&r, ret, &destlen);
8081   fprintf(stderr, "actual:[%s]\n", ret);
8082   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8083   CU_ASSERT(ret != NULL);
8084   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8085   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8086
8087   APR_TERM;
8088 #undef TEST_STRING
8089 #undef RESULT_STRING
8090 }
8091 /*============================================================================*/
8092 /* <DL>                                                                       */
8093 /*============================================================================*/
8094 void test_ixhtml10_dl_tag_001()
8095 {
8096 #define  TEST_STRING "<dl></dl>"
8097 #define  RESULT_STRING "<dl></dl>"
8098   char  *ret;
8099   char  *tmp;
8100   device_table spec;
8101   chxjconvrule_entry entry;
8102   cookie_t cookie;
8103   apr_size_t destlen;
8104   APR_INIT;
8105
8106   COOKIE_INIT(cookie);
8107
8108   SPEC_INIT(spec);
8109   destlen = sizeof(TEST_STRING)-1;
8110
8111   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8112   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8113   ret = chxj_rencoding(&r, ret, &destlen);
8114   fprintf(stderr, "actual:[%s]\n", ret);
8115   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8116   CU_ASSERT(ret != NULL);
8117   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8118   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8119
8120   APR_TERM;
8121 #undef TEST_STRING
8122 #undef RESULT_STRING
8123 }
8124 /*============================================================================*/
8125 /* <DT>                                                                       */
8126 /*============================================================================*/
8127 void test_ixhtml10_dt_tag_001()
8128 {
8129 #define  TEST_STRING   "<dl><dt>あああ</dt><dt>いいい</dt></dl>"
8130 #define  RESULT_STRING "<dl><dt>あああ</dt><dt>いいい</dt></dl>"
8131   char  *ret;
8132   char  *tmp;
8133   device_table spec;
8134   chxjconvrule_entry entry;
8135   cookie_t cookie;
8136   apr_size_t destlen;
8137   APR_INIT;
8138
8139   COOKIE_INIT(cookie);
8140
8141   SPEC_INIT(spec);
8142   destlen = sizeof(TEST_STRING)-1;
8143
8144   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8145   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8146   ret = chxj_rencoding(&r, ret, &destlen);
8147   fprintf(stderr, "actual:[%s]\n", ret);
8148   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8149   CU_ASSERT(ret != NULL);
8150   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8151   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8152
8153   APR_TERM;
8154 #undef TEST_STRING
8155 #undef RESULT_STRING
8156 }
8157 void test_ixhtml10_dt_tag_002()
8158 {
8159 #define  TEST_STRING   "<dl><dt></dt><dt></dt></dl>"
8160 #define  RESULT_STRING "<dl><dt></dt><dt></dt></dl>"
8161   char  *ret;
8162   char  *tmp;
8163   device_table spec;
8164   chxjconvrule_entry entry;
8165   cookie_t cookie;
8166   apr_size_t destlen;
8167   APR_INIT;
8168
8169   COOKIE_INIT(cookie);
8170
8171   SPEC_INIT(spec);
8172   destlen = sizeof(TEST_STRING)-1;
8173
8174   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8175   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8176   ret = chxj_rencoding(&r, ret, &destlen);
8177   fprintf(stderr, "actual:[%s]\n", ret);
8178   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8179   CU_ASSERT(ret != NULL);
8180   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8181   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8182
8183   APR_TERM;
8184 #undef TEST_STRING
8185 #undef RESULT_STRING
8186 }
8187 /*============================================================================*/
8188 /* <DD>                                                                       */
8189 /*============================================================================*/
8190 void test_ixhtml10_dd_tag_001()
8191 {
8192 #define  TEST_STRING "<dl><dt>あああ</dt><dd>いいい</dd><dt>ああああ</dt><dd>いいいい</dd></dl>"
8193 #define  RESULT_STRING "<dl><dt>あああ</dt><dd>いいい</dd><dt>ああああ</dt><dd>いいいい</dd></dl>"
8194   char  *ret;
8195   char  *tmp;
8196   device_table spec;
8197   chxjconvrule_entry entry;
8198   cookie_t cookie;
8199   apr_size_t destlen;
8200   APR_INIT;
8201
8202   COOKIE_INIT(cookie);
8203
8204   SPEC_INIT(spec);
8205   destlen = sizeof(TEST_STRING)-1;
8206
8207   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8208   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8209   ret = chxj_rencoding(&r, ret, &destlen);
8210   fprintf(stderr, "actual:[%s]\n", ret);
8211   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8212   CU_ASSERT(ret != NULL);
8213   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8214   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8215
8216   APR_TERM;
8217 #undef TEST_STRING
8218 #undef RESULT_STRING
8219 }
8220 void test_ixhtml10_dd_tag_002()
8221 {
8222 #define  TEST_STRING "<dl><dd></dd><dd></dd></dl>"
8223 #define  RESULT_STRING "<dl><dd></dd><dd></dd></dl>"
8224   char  *ret;
8225   char  *tmp;
8226   device_table spec;
8227   chxjconvrule_entry entry;
8228   cookie_t cookie;
8229   apr_size_t destlen;
8230   APR_INIT;
8231
8232   COOKIE_INIT(cookie);
8233
8234   SPEC_INIT(spec);
8235   destlen = sizeof(TEST_STRING)-1;
8236
8237   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8238   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8239   ret = chxj_rencoding(&r, ret, &destlen);
8240   fprintf(stderr, "actual:[%s]\n", ret);
8241   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8242   CU_ASSERT(ret != NULL);
8243   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8244   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8245
8246   APR_TERM;
8247 #undef TEST_STRING
8248 #undef RESULT_STRING
8249 }
8250 /*============================================================================*/
8251 /* <DIV>                                                                      */
8252 /*============================================================================*/
8253 void test_ixhtml10_div_tag_001()
8254 {
8255 #define  TEST_STRING "<div></div>"
8256 #define  RESULT_STRING "<div></div>"
8257   char  *ret;
8258   char  *tmp;
8259   device_table spec;
8260   chxjconvrule_entry entry;
8261   cookie_t cookie;
8262   apr_size_t destlen;
8263   APR_INIT;
8264
8265   COOKIE_INIT(cookie);
8266
8267   SPEC_INIT(spec);
8268   destlen = sizeof(TEST_STRING)-1;
8269
8270   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8271   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8272   ret = chxj_rencoding(&r, ret, &destlen);
8273   fprintf(stderr, "actual:[%s]\n", ret);
8274   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8275   CU_ASSERT(ret != NULL);
8276   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8277   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8278
8279   APR_TERM;
8280 #undef TEST_STRING
8281 #undef RESULT_STRING
8282 }
8283 void test_ixhtml10_div_tag_002()
8284 {
8285 #define  TEST_STRING "<div align=\"left\"></div>"
8286 #define  RESULT_STRING "<div style=\"text-align:left;\"></div>"
8287   char  *ret;
8288   char  *tmp;
8289   device_table spec;
8290   chxjconvrule_entry entry;
8291   cookie_t cookie;
8292   apr_size_t destlen;
8293   APR_INIT;
8294
8295   COOKIE_INIT(cookie);
8296
8297   SPEC_INIT(spec);
8298   destlen = sizeof(TEST_STRING)-1;
8299
8300   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8301   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8302   ret = chxj_rencoding(&r, ret, &destlen);
8303   fprintf(stderr, "actual:[%s]\n", ret);
8304   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8305   CU_ASSERT(ret != NULL);
8306   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8307   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8308
8309   APR_TERM;
8310 #undef TEST_STRING
8311 #undef RESULT_STRING
8312 }
8313 void test_ixhtml10_div_tag_003()
8314 {
8315 #define  TEST_STRING   "<div align=\"right\"></div>"
8316 #define  RESULT_STRING "<div style=\"text-align:right;\"></div>"
8317   char  *ret;
8318   char  *tmp;
8319   device_table spec;
8320   chxjconvrule_entry entry;
8321   cookie_t cookie;
8322   apr_size_t destlen;
8323   APR_INIT;
8324
8325   COOKIE_INIT(cookie);
8326
8327   SPEC_INIT(spec);
8328   destlen = sizeof(TEST_STRING)-1;
8329
8330   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8331   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8332   ret = chxj_rencoding(&r, ret, &destlen);
8333   fprintf(stderr, "actual:[%s]\n", ret);
8334   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8335   CU_ASSERT(ret != NULL);
8336   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8337   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8338
8339   APR_TERM;
8340 #undef TEST_STRING
8341 #undef RESULT_STRING
8342 }
8343 void test_ixhtml10_div_tag_004()
8344 {
8345 #define  TEST_STRING   "<div align=\"center\"></div>"
8346 #define  RESULT_STRING "<div style=\"text-align:center;\"></div>"
8347   char  *ret;
8348   char  *tmp;
8349   device_table spec;
8350   chxjconvrule_entry entry;
8351   cookie_t cookie;
8352   apr_size_t destlen;
8353   APR_INIT;
8354
8355   COOKIE_INIT(cookie);
8356
8357   SPEC_INIT(spec);
8358   destlen = sizeof(TEST_STRING)-1;
8359
8360   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8361   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8362   ret = chxj_rencoding(&r, ret, &destlen);
8363   fprintf(stderr, "actual:[%s]\n", ret);
8364   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8365   CU_ASSERT(ret != NULL);
8366   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8367   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8368
8369   APR_TERM;
8370 #undef TEST_STRING
8371 #undef RESULT_STRING
8372 }
8373 void test_ixhtml10_div_tag_005()
8374 {
8375 #define  TEST_STRING   "<div align=\"\"></div>"
8376 #define  RESULT_STRING "<div></div>"
8377   char  *ret;
8378   char  *tmp;
8379   device_table spec;
8380   chxjconvrule_entry entry;
8381   cookie_t cookie;
8382   apr_size_t destlen;
8383   APR_INIT;
8384
8385   COOKIE_INIT(cookie);
8386
8387   SPEC_INIT(spec);
8388   destlen = sizeof(TEST_STRING)-1;
8389
8390   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8391   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8392   ret = chxj_rencoding(&r, ret, &destlen);
8393   fprintf(stderr, "actual:[%s]\n", ret);
8394   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8395   CU_ASSERT(ret != NULL);
8396   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8397   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8398
8399   APR_TERM;
8400 #undef TEST_STRING
8401 #undef RESULT_STRING
8402 }
8403 void test_ixhtml10_div_tag_006()
8404 {
8405 #define  TEST_STRING   "<div align=\"abc\"></div>"
8406 #define  RESULT_STRING "<div></div>"
8407   char  *ret;
8408   char  *tmp;
8409   device_table spec;
8410   chxjconvrule_entry entry;
8411   cookie_t cookie;
8412   apr_size_t destlen;
8413   APR_INIT;
8414
8415   COOKIE_INIT(cookie);
8416
8417   SPEC_INIT(spec);
8418   destlen = sizeof(TEST_STRING)-1;
8419
8420   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8421   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8422   ret = chxj_rencoding(&r, ret, &destlen);
8423   fprintf(stderr, "actual:[%s]\n", ret);
8424   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8425   CU_ASSERT(ret != NULL);
8426   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8427   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8428
8429   APR_TERM;
8430 #undef TEST_STRING
8431 #undef RESULT_STRING
8432 }
8433 void test_ixhtml10_div_tag_007()
8434 {
8435 #define  TEST_STRING   "<div style=\"aaa\"></div>"
8436 #define  RESULT_STRING "<div></div>"
8437   char  *ret;
8438   char  *tmp;
8439   device_table spec;
8440   chxjconvrule_entry entry;
8441   cookie_t cookie;
8442   apr_size_t destlen;
8443   APR_INIT;
8444
8445   COOKIE_INIT(cookie);
8446
8447   SPEC_INIT(spec);
8448   destlen = sizeof(TEST_STRING)-1;
8449
8450   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8451   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8452   ret = chxj_rencoding(&r, ret, &destlen);
8453   fprintf(stderr, "actual:[%s]\n", ret);
8454   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8455   CU_ASSERT(ret != NULL);
8456   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8457   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8458
8459   APR_TERM;
8460 #undef TEST_STRING
8461 #undef RESULT_STRING
8462 }
8463 /*============================================================================*/
8464 /* FORM                                                                       */
8465 /*============================================================================*/
8466 void test_ixhtml10_form_tag_001()
8467 {
8468 #define  TEST_STRING "<form></form>"
8469 #define  RESULT_STRING "<form></form>"
8470   char  *ret;
8471   char  *tmp;
8472   device_table spec;
8473   chxjconvrule_entry entry;
8474   cookie_t cookie;
8475   apr_size_t destlen;
8476   APR_INIT;
8477
8478   COOKIE_INIT(cookie);
8479
8480   SPEC_INIT(spec);
8481   destlen = sizeof(TEST_STRING)-1;
8482
8483   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8484   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8485   ret = chxj_rencoding(&r, ret, &destlen);
8486   fprintf(stderr, "actual:[%s]\n", ret);
8487   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8488   CU_ASSERT(ret != NULL);
8489   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8490   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8491
8492   APR_TERM;
8493 #undef TEST_STRING
8494 #undef RESULT_STRING
8495 }
8496 void test_ixhtml10_form_tag_002()
8497 {
8498 #define  TEST_STRING   "<form method></form>"
8499 #define  RESULT_STRING "<form method=\"\"></form>"
8500   char  *ret;
8501   char  *tmp;
8502   device_table spec;
8503   chxjconvrule_entry entry;
8504   cookie_t cookie;
8505   apr_size_t destlen;
8506   APR_INIT;
8507
8508   COOKIE_INIT(cookie);
8509
8510   SPEC_INIT(spec);
8511   destlen = sizeof(TEST_STRING)-1;
8512
8513   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8514   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8515   ret = chxj_rencoding(&r, ret, &destlen);
8516   fprintf(stderr, "actual:[%s]\n", ret);
8517   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8518   CU_ASSERT(ret != NULL);
8519   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8520   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8521
8522   APR_TERM;
8523 #undef TEST_STRING
8524 #undef RESULT_STRING
8525 }
8526 void test_ixhtml10_form_tag_003()
8527 {
8528 #define  TEST_STRING "<form method=\"post\"></form>"
8529 #define  RESULT_STRING "<form method=\"post\"></form>"
8530   char  *ret;
8531   char  *tmp;
8532   device_table spec;
8533   chxjconvrule_entry entry;
8534   cookie_t cookie;
8535   apr_size_t destlen;
8536   APR_INIT;
8537
8538   COOKIE_INIT(cookie);
8539
8540   SPEC_INIT(spec);
8541   destlen = sizeof(TEST_STRING)-1;
8542
8543   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8544   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8545   ret = chxj_rencoding(&r, ret, &destlen);
8546   fprintf(stderr, "actual:[%s]\n", ret);
8547   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8548   CU_ASSERT(ret != NULL);
8549   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8550   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8551
8552   APR_TERM;
8553 #undef TEST_STRING
8554 #undef RESULT_STRING
8555 }
8556 void test_ixhtml10_form_tag_004()
8557 {
8558 #define  TEST_STRING   "<form method=\"get\"></form>"
8559 #define  RESULT_STRING "<form method=\"get\"></form>"
8560   char  *ret;
8561   char  *tmp;
8562   device_table spec;
8563   chxjconvrule_entry entry;
8564   cookie_t cookie;
8565   apr_size_t destlen;
8566   APR_INIT;
8567
8568   COOKIE_INIT(cookie);
8569
8570   SPEC_INIT(spec);
8571   destlen = sizeof(TEST_STRING)-1;
8572
8573   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8574   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8575   ret = chxj_rencoding(&r, ret, &destlen);
8576   fprintf(stderr, "actual:[%s]\n", ret);
8577   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8578   CU_ASSERT(ret != NULL);
8579   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8580   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8581
8582   APR_TERM;
8583 #undef TEST_STRING
8584 #undef RESULT_STRING
8585 }
8586 void test_ixhtml10_form_tag_005()
8587 {
8588 #define  TEST_STRING   "<form method=\"abc\"></form>"
8589 #define  RESULT_STRING "<form method=\"abc\"></form>"
8590   char  *ret;
8591   char  *tmp;
8592   device_table spec;
8593   chxjconvrule_entry entry;
8594   cookie_t cookie;
8595   apr_size_t destlen;
8596   APR_INIT;
8597
8598   COOKIE_INIT(cookie);
8599
8600   SPEC_INIT(spec);
8601   destlen = sizeof(TEST_STRING)-1;
8602
8603   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8604   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8605   ret = chxj_rencoding(&r, ret, &destlen);
8606   CU_ASSERT(ret != NULL);
8607   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8608   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8609
8610   APR_TERM;
8611 #undef TEST_STRING
8612 #undef RESULT_STRING
8613 }
8614 void test_ixhtml10_form_tag_006()
8615 {
8616 #define  TEST_STRING   "<form action></form>"
8617 #define  RESULT_STRING "<form action=\"\"><input type=\"hidden\" name=\"_chxj_cc\" value=\"test_cookie_id\" /></form>"
8618   char  *ret;
8619   char  *tmp;
8620   device_table spec;
8621   chxjconvrule_entry entry;
8622   cookie_t cookie;
8623   apr_size_t destlen;
8624   APR_INIT;
8625
8626   COOKIE_INIT(cookie);
8627
8628   SPEC_INIT(spec);
8629   destlen = sizeof(TEST_STRING)-1;
8630
8631   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8632   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8633   ret = chxj_rencoding(&r, ret, &destlen);
8634   fprintf(stderr, "actual:[%s]\n", ret);
8635   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8636   CU_ASSERT(ret != NULL);
8637   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8638   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8639
8640   APR_TERM;
8641 #undef TEST_STRING
8642 #undef RESULT_STRING
8643 }
8644 void test_ixhtml10_form_tag_007()
8645 {
8646 #define  TEST_STRING   "<form action></form>"
8647 #define  RESULT_STRING "<form action=\"\"></form>"
8648   char  *ret;
8649   char  *tmp;
8650   device_table spec;
8651   chxjconvrule_entry entry;
8652   cookie_t cookie;
8653   apr_size_t destlen;
8654   APR_INIT;
8655
8656   COOKIE_INIT(cookie);
8657
8658   SPEC_INIT(spec);
8659   destlen = sizeof(TEST_STRING)-1;
8660
8661   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8662   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, NULL);
8663   ret = chxj_rencoding(&r, ret, &destlen);
8664   fprintf(stderr, "actual:[%s]\n", ret);
8665   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8666   CU_ASSERT(ret != NULL);
8667   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8668   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8669
8670   APR_TERM;
8671 #undef TEST_STRING
8672 #undef RESULT_STRING
8673 }
8674 void test_ixhtml10_form_tag_008()
8675 {
8676 #define  TEST_STRING   "<form action=\"http://www.google.co.jp/\"></form>"
8677 #define  RESULT_STRING "<form action=\"http://www.google.co.jp/\"></form>"
8678   char  *ret;
8679   char  *tmp;
8680   device_table spec;
8681   chxjconvrule_entry entry;
8682   cookie_t cookie;
8683   apr_size_t destlen;
8684   APR_INIT;
8685
8686   COOKIE_INIT(cookie);
8687
8688   SPEC_INIT(spec);
8689   destlen = sizeof(TEST_STRING)-1;
8690
8691   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8692   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8693   ret = chxj_rencoding(&r, ret, &destlen);
8694   fprintf(stderr, "actual:[%s]\n", ret);
8695   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8696   CU_ASSERT(ret != NULL);
8697   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8698   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8699
8700   APR_TERM;
8701 #undef TEST_STRING
8702 #undef RESULT_STRING
8703 }
8704 void test_ixhtml10_form_tag_009()
8705 {
8706 #define  TEST_STRING   "<form method=\"post\" action=\"hogehoge\"></form>"
8707 #define  RESULT_STRING "<form action=\"hogehoge\" method=\"post\"><input type=\"hidden\" name=\"_chxj_cc\" value=\"test_cookie_id\" /></form>"
8708   char  *ret;
8709   char  *tmp;
8710   device_table spec;
8711   chxjconvrule_entry entry;
8712   cookie_t cookie;
8713   apr_size_t destlen;
8714   APR_INIT;
8715
8716   COOKIE_INIT(cookie);
8717
8718   SPEC_INIT(spec);
8719   destlen = sizeof(TEST_STRING)-1;
8720
8721   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8722   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8723   ret = chxj_rencoding(&r, ret, &destlen);
8724   fprintf(stderr, "actual:[%s]\n", ret);
8725   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8726   CU_ASSERT(ret != NULL);
8727   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8728   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8729
8730   APR_TERM;
8731 #undef TEST_STRING
8732 #undef RESULT_STRING
8733 }
8734 /*============================================================================*/
8735 /* <HR>                                                                       */
8736 /*============================================================================*/
8737 void test_ixhtml10_hr_tag_001()
8738 {
8739 #define  TEST_STRING   "<hr>"
8740 #define  RESULT_STRING "<hr />"
8741   char  *ret;
8742   char  *tmp;
8743   device_table spec;
8744   chxjconvrule_entry entry;
8745   cookie_t cookie;
8746   apr_size_t destlen;
8747   APR_INIT;
8748
8749   COOKIE_INIT(cookie);
8750
8751   SPEC_INIT(spec);
8752   destlen = sizeof(TEST_STRING)-1;
8753
8754   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8755   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8756   ret = chxj_rencoding(&r, ret, &destlen);
8757   fprintf(stderr, "actual:[%s]\n", ret);
8758   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8759   CU_ASSERT(ret != NULL);
8760   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8761   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8762
8763   APR_TERM;
8764 #undef TEST_STRING
8765 #undef RESULT_STRING
8766 }
8767 void test_ixhtml10_hr_tag_002()
8768 {
8769 #define  TEST_STRING   "<hr />"
8770 #define  RESULT_STRING "<hr />"
8771   char  *ret;
8772   char  *tmp;
8773   device_table spec;
8774   chxjconvrule_entry entry;
8775   cookie_t cookie;
8776   apr_size_t destlen;
8777   APR_INIT;
8778
8779   COOKIE_INIT(cookie);
8780
8781   SPEC_INIT(spec);
8782   destlen = sizeof(TEST_STRING)-1;
8783
8784   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8785   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8786   ret = chxj_rencoding(&r, ret, &destlen);
8787   fprintf(stderr, "actual:[%s]\n", ret);
8788   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8789   CU_ASSERT(ret != NULL);
8790   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8791   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8792
8793   APR_TERM;
8794 #undef TEST_STRING
8795 #undef RESULT_STRING
8796 }
8797 void test_ixhtml10_hr_tag_003()
8798 {
8799 #define  TEST_STRING   "<hr align>"
8800 #define  RESULT_STRING "<hr />"
8801   char  *ret;
8802   char  *tmp;
8803   device_table spec;
8804   chxjconvrule_entry entry;
8805   cookie_t cookie;
8806   apr_size_t destlen;
8807   APR_INIT;
8808
8809   COOKIE_INIT(cookie);
8810
8811   SPEC_INIT(spec);
8812   destlen = sizeof(TEST_STRING)-1;
8813
8814   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8815   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8816   ret = chxj_rencoding(&r, ret, &destlen);
8817   fprintf(stderr, "actual:[%s]\n", ret);
8818   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8819   CU_ASSERT(ret != NULL);
8820   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8821   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8822
8823   APR_TERM;
8824 #undef TEST_STRING
8825 #undef RESULT_STRING
8826 }
8827 void test_ixhtml10_hr_tag_004()
8828 {
8829 #define  TEST_STRING   "<hr align=\"\">"
8830 #define  RESULT_STRING "<hr />"
8831   char  *ret;
8832   char  *tmp;
8833   device_table spec;
8834   chxjconvrule_entry entry;
8835   cookie_t cookie;
8836   apr_size_t destlen;
8837   APR_INIT;
8838
8839   COOKIE_INIT(cookie);
8840
8841   SPEC_INIT(spec);
8842   destlen = sizeof(TEST_STRING)-1;
8843
8844   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8845   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8846   ret = chxj_rencoding(&r, ret, &destlen);
8847   fprintf(stderr, "actual:[%s]\n", ret);
8848   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8849   CU_ASSERT(ret != NULL);
8850   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8851   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8852
8853   APR_TERM;
8854 #undef TEST_STRING
8855 #undef RESULT_STRING
8856 }
8857 void test_ixhtml10_hr_tag_005()
8858 {
8859 #define  TEST_STRING   "<hr align=\"left\">"
8860 #define  RESULT_STRING "<hr style=\"float:left;\" />"
8861   char  *ret;
8862   char  *tmp;
8863   device_table spec;
8864   chxjconvrule_entry entry;
8865   cookie_t cookie;
8866   apr_size_t destlen;
8867   APR_INIT;
8868
8869   COOKIE_INIT(cookie);
8870
8871   SPEC_INIT(spec);
8872   destlen = sizeof(TEST_STRING)-1;
8873
8874   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8875   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8876   ret = chxj_rencoding(&r, ret, &destlen);
8877   fprintf(stderr, "actual:[%s]\n", ret);
8878   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8879   CU_ASSERT(ret != NULL);
8880   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8881   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8882
8883   APR_TERM;
8884 #undef TEST_STRING
8885 #undef RESULT_STRING
8886 }
8887 void test_ixhtml10_hr_tag_006()
8888 {
8889 #define  TEST_STRING   "<hr align=\"right\">"
8890 #define  RESULT_STRING "<hr style=\"float:right;\" />"
8891   char  *ret;
8892   char  *tmp;
8893   device_table spec;
8894   chxjconvrule_entry entry;
8895   cookie_t cookie;
8896   apr_size_t destlen;
8897   APR_INIT;
8898
8899   COOKIE_INIT(cookie);
8900
8901   SPEC_INIT(spec);
8902   destlen = sizeof(TEST_STRING)-1;
8903
8904   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8905   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8906   ret = chxj_rencoding(&r, ret, &destlen);
8907   fprintf(stderr, "actual:[%s]\n", ret);
8908   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8909   CU_ASSERT(ret != NULL);
8910   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8911   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8912
8913   APR_TERM;
8914 #undef TEST_STRING
8915 #undef RESULT_STRING
8916 }
8917 void test_ixhtml10_hr_tag_007()
8918 {
8919 #define  TEST_STRING   "<hr align=\"center\">"
8920 #define  RESULT_STRING "<hr style=\"float:none;\" />"
8921   char  *ret;
8922   char  *tmp;
8923   device_table spec;
8924   chxjconvrule_entry entry;
8925   cookie_t cookie;
8926   apr_size_t destlen;
8927   APR_INIT;
8928
8929   COOKIE_INIT(cookie);
8930
8931   SPEC_INIT(spec);
8932   destlen = sizeof(TEST_STRING)-1;
8933
8934   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8935   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8936   ret = chxj_rencoding(&r, ret, &destlen);
8937   fprintf(stderr, "actual:[%s]\n", ret);
8938   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8939   CU_ASSERT(ret != NULL);
8940   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8941   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8942
8943   APR_TERM;
8944 #undef TEST_STRING
8945 #undef RESULT_STRING
8946 }
8947 void test_ixhtml10_hr_tag_008()
8948 {
8949 #define  TEST_STRING   "<hr align=\"unknown\">"
8950 #define  RESULT_STRING "<hr />"
8951   char  *ret;
8952   char  *tmp;
8953   device_table spec;
8954   chxjconvrule_entry entry;
8955   cookie_t cookie;
8956   apr_size_t destlen;
8957   APR_INIT;
8958
8959   COOKIE_INIT(cookie);
8960
8961   SPEC_INIT(spec);
8962   destlen = sizeof(TEST_STRING)-1;
8963
8964   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8965   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8966   ret = chxj_rencoding(&r, ret, &destlen);
8967   fprintf(stderr, "actual:[%s]\n", ret);
8968   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8969   CU_ASSERT(ret != NULL);
8970   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
8971   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
8972
8973   APR_TERM;
8974 #undef TEST_STRING
8975 #undef RESULT_STRING
8976 }
8977 void test_ixhtml10_hr_tag_009()
8978 {
8979 #define  TEST_STRING   "<hr size>"
8980 #define  RESULT_STRING "<hr />"
8981   char  *ret;
8982   char  *tmp;
8983   device_table spec;
8984   chxjconvrule_entry entry;
8985   cookie_t cookie;
8986   apr_size_t destlen;
8987   APR_INIT;
8988
8989   COOKIE_INIT(cookie);
8990
8991   SPEC_INIT(spec);
8992   destlen = sizeof(TEST_STRING)-1;
8993
8994   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
8995   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
8996   ret = chxj_rencoding(&r, ret, &destlen);
8997   fprintf(stderr, "actual:[%s]\n", ret);
8998   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
8999   CU_ASSERT(ret != NULL);
9000   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9001   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9002
9003   APR_TERM;
9004 #undef TEST_STRING
9005 #undef RESULT_STRING
9006 }
9007 void test_ixhtml10_hr_tag_010()
9008 {
9009 #define  TEST_STRING   "<hr size=\"\">"
9010 #define  RESULT_STRING "<hr />"
9011   char  *ret;
9012   char  *tmp;
9013   device_table spec;
9014   chxjconvrule_entry entry;
9015   cookie_t cookie;
9016   apr_size_t destlen;
9017   APR_INIT;
9018
9019   COOKIE_INIT(cookie);
9020
9021   SPEC_INIT(spec);
9022   destlen = sizeof(TEST_STRING)-1;
9023
9024   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9025   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9026   ret = chxj_rencoding(&r, ret, &destlen);
9027   fprintf(stderr, "actual:[%s]\n", ret);
9028   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9029   CU_ASSERT(ret != NULL);
9030   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9031   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9032
9033   APR_TERM;
9034 #undef TEST_STRING
9035 #undef RESULT_STRING
9036 }
9037 void test_ixhtml10_hr_tag_011()
9038 {
9039 #define  TEST_STRING   "<hr size=\"abc\">"
9040 #define  RESULT_STRING "<hr style=\"height:abcpx;\" />"
9041   char  *ret;
9042   char  *tmp;
9043   device_table spec;
9044   chxjconvrule_entry entry;
9045   cookie_t cookie;
9046   apr_size_t destlen;
9047   APR_INIT;
9048
9049   COOKIE_INIT(cookie);
9050
9051   SPEC_INIT(spec);
9052   destlen = sizeof(TEST_STRING)-1;
9053
9054   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9055   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9056   ret = chxj_rencoding(&r, ret, &destlen);
9057   fprintf(stderr, "actual:[%s]\n", ret);
9058   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9059   CU_ASSERT(ret != NULL);
9060   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9061   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9062
9063   APR_TERM;
9064 #undef TEST_STRING
9065 #undef RESULT_STRING
9066 }
9067 void test_ixhtml10_hr_tag_012()
9068 {
9069 #define  TEST_STRING   "<hr size=\"10\">"
9070 #define  RESULT_STRING "<hr style=\"height:10px;\" />"
9071   char  *ret;
9072   char  *tmp;
9073   device_table spec;
9074   chxjconvrule_entry entry;
9075   cookie_t cookie;
9076   apr_size_t destlen;
9077   APR_INIT;
9078
9079   COOKIE_INIT(cookie);
9080
9081   SPEC_INIT(spec);
9082   destlen = sizeof(TEST_STRING)-1;
9083
9084   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9085   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9086   ret = chxj_rencoding(&r, ret, &destlen);
9087   fprintf(stderr, "actual:[%s]\n", ret);
9088   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9089   CU_ASSERT(ret != NULL);
9090   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9091   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9092
9093   APR_TERM;
9094 #undef TEST_STRING
9095 #undef RESULT_STRING
9096 }
9097 void test_ixhtml10_hr_tag_013()
9098 {
9099 #define  TEST_STRING   "<hr width>"
9100 #define  RESULT_STRING "<hr />"
9101   char  *ret;
9102   char  *tmp;
9103   device_table spec;
9104   chxjconvrule_entry entry;
9105   cookie_t cookie;
9106   apr_size_t destlen;
9107   APR_INIT;
9108
9109   COOKIE_INIT(cookie);
9110
9111   SPEC_INIT(spec);
9112   destlen = sizeof(TEST_STRING)-1;
9113
9114   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9115   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9116   ret = chxj_rencoding(&r, ret, &destlen);
9117   fprintf(stderr, "actual:[%s]\n", ret);
9118   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9119   CU_ASSERT(ret != NULL);
9120   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9121   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9122
9123   APR_TERM;
9124 #undef TEST_STRING
9125 #undef RESULT_STRING
9126 }
9127 void test_ixhtml10_hr_tag_014()
9128 {
9129 #define  TEST_STRING   "<hr width=\"\">"
9130 #define  RESULT_STRING "<hr />"
9131   char  *ret;
9132   char  *tmp;
9133   device_table spec;
9134   chxjconvrule_entry entry;
9135   cookie_t cookie;
9136   apr_size_t destlen;
9137   APR_INIT;
9138
9139   COOKIE_INIT(cookie);
9140
9141   SPEC_INIT(spec);
9142   destlen = sizeof(TEST_STRING)-1;
9143
9144   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9145   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9146   ret = chxj_rencoding(&r, ret, &destlen);
9147   fprintf(stderr, "actual:[%s]\n", ret);
9148   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9149   CU_ASSERT(ret != NULL);
9150   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9151   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9152
9153   APR_TERM;
9154 #undef TEST_STRING
9155 #undef RESULT_STRING
9156 }
9157 void test_ixhtml10_hr_tag_015()
9158 {
9159 #define  TEST_STRING   "<hr width=\"abc\">"
9160 #define  RESULT_STRING "<hr style=\"width:abcpx;\" />"
9161   char  *ret;
9162   char  *tmp;
9163   device_table spec;
9164   chxjconvrule_entry entry;
9165   cookie_t cookie;
9166   apr_size_t destlen;
9167   APR_INIT;
9168
9169   COOKIE_INIT(cookie);
9170
9171   SPEC_INIT(spec);
9172   destlen = sizeof(TEST_STRING)-1;
9173
9174   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9175   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9176   ret = chxj_rencoding(&r, ret, &destlen);
9177   fprintf(stderr, "actual:[%s]\n", ret);
9178   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9179   CU_ASSERT(ret != NULL);
9180   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9181   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9182
9183   APR_TERM;
9184 #undef TEST_STRING
9185 #undef RESULT_STRING
9186 }
9187 void test_ixhtml10_hr_tag_016()
9188 {
9189 #define  TEST_STRING   "<hr width=\"10\">"
9190 #define  RESULT_STRING "<hr style=\"width:10px;\" />"
9191   char  *ret;
9192   char  *tmp;
9193   device_table spec;
9194   chxjconvrule_entry entry;
9195   cookie_t cookie;
9196   apr_size_t destlen;
9197   APR_INIT;
9198
9199   COOKIE_INIT(cookie);
9200
9201   SPEC_INIT(spec);
9202   destlen = sizeof(TEST_STRING)-1;
9203
9204   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9205   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9206   ret = chxj_rencoding(&r, ret, &destlen);
9207   fprintf(stderr, "actual:[%s]\n", ret);
9208   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9209   CU_ASSERT(ret != NULL);
9210   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9211   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9212
9213   APR_TERM;
9214 #undef TEST_STRING
9215 #undef RESULT_STRING
9216 }
9217 void test_ixhtml10_hr_tag_017()
9218 {
9219 #define  TEST_STRING   "<hr width=\"10\" noshade>"
9220 #define  RESULT_STRING "<hr style=\"width:10px;border-style:solid;\" />"
9221   char  *ret;
9222   char  *tmp;
9223   device_table spec;
9224   chxjconvrule_entry entry;
9225   cookie_t cookie;
9226   apr_size_t destlen;
9227   APR_INIT;
9228
9229   COOKIE_INIT(cookie);
9230
9231   SPEC_INIT(spec);
9232   destlen = sizeof(TEST_STRING)-1;
9233
9234   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9235   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9236   ret = chxj_rencoding(&r, ret, &destlen);
9237   fprintf(stderr, "actual:[%s]\n", ret);
9238   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9239   CU_ASSERT(ret != NULL);
9240   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9241   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9242
9243   APR_TERM;
9244 #undef TEST_STRING
9245 #undef RESULT_STRING
9246 }
9247 void test_ixhtml10_hr_tag_018()
9248 {
9249 #define  TEST_STRING   "<hr width=\"10\" color=\"#ff0000\">"
9250 #define  RESULT_STRING "<hr style=\"width:10px;border-color:#ff0000;background-color:#ff0000;\" />"
9251   char  *ret;
9252   char  *tmp;
9253   device_table spec;
9254   chxjconvrule_entry entry;
9255   cookie_t cookie;
9256   apr_size_t destlen;
9257   APR_INIT;
9258
9259   COOKIE_INIT(cookie);
9260
9261   SPEC_INIT(spec);
9262   destlen = sizeof(TEST_STRING)-1;
9263
9264   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9265   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9266   ret = chxj_rencoding(&r, ret, &destlen);
9267   fprintf(stderr, "actual:[%s]\n", ret);
9268   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9269   CU_ASSERT(ret != NULL);
9270   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9271   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9272
9273   APR_TERM;
9274 #undef TEST_STRING
9275 #undef RESULT_STRING
9276 }
9277 void test_ixhtml10_hr_tag_018_1()
9278 {
9279 #define  TEST_STRING   "<hr width=\"10\" color=\"\">"
9280 #define  RESULT_STRING "<hr style=\"width:10px;\" />"
9281   char  *ret;
9282   char  *tmp;
9283   device_table spec;
9284   chxjconvrule_entry entry;
9285   cookie_t cookie;
9286   apr_size_t destlen;
9287   APR_INIT;
9288
9289   COOKIE_INIT(cookie);
9290
9291   SPEC_INIT(spec);
9292   destlen = sizeof(TEST_STRING)-1;
9293
9294   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9295   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9296   ret = chxj_rencoding(&r, ret, &destlen);
9297   fprintf(stderr, "actual:[%s]\n", ret);
9298   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9299   CU_ASSERT(ret != NULL);
9300   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9301   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9302
9303   APR_TERM;
9304 #undef TEST_STRING
9305 #undef RESULT_STRING
9306 }
9307 void test_ixhtml10_hr_tag_018_2()
9308 {
9309 #define  TEST_STRING   "<hr width=\"10\" color>"
9310 #define  RESULT_STRING "<hr style=\"width:10px;\" />"
9311   char  *ret;
9312   char  *tmp;
9313   device_table spec;
9314   chxjconvrule_entry entry;
9315   cookie_t cookie;
9316   apr_size_t destlen;
9317   APR_INIT;
9318
9319   COOKIE_INIT(cookie);
9320
9321   SPEC_INIT(spec);
9322   destlen = sizeof(TEST_STRING)-1;
9323
9324   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9325   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9326   ret = chxj_rencoding(&r, ret, &destlen);
9327   fprintf(stderr, "actual:[%s]\n", ret);
9328   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9329   CU_ASSERT(ret != NULL);
9330   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9331   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9332
9333   APR_TERM;
9334 #undef TEST_STRING
9335 #undef RESULT_STRING
9336 }
9337 /*============================================================================*/
9338 /* <HTML>                                                                     */
9339 /*============================================================================*/
9340 void test_ixhtml10_html_tag_001()
9341 {
9342 #define  TEST_STRING "<html><head></head><body></body></html>"
9343 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
9344                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
9345                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
9346                        "<head></head><body></body></html>"
9347   char  *ret;
9348   char  *tmp;
9349   device_table spec;
9350   chxjconvrule_entry entry;
9351   cookie_t cookie;
9352   apr_size_t destlen;
9353   APR_INIT;
9354
9355   COOKIE_INIT(cookie);
9356
9357   SPEC_INIT(spec);
9358   destlen = sizeof(TEST_STRING)-1;
9359
9360   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9361   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9362   ret = chxj_rencoding(&r, ret, &destlen);
9363   fprintf(stderr, "actual:[%s]\n", ret);
9364   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9365   CU_ASSERT(ret != NULL);
9366   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9367   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9368
9369   APR_TERM;
9370 #undef TEST_STRING
9371 #undef RESULT_STRING
9372 }
9373 /*============================================================================*/
9374 /* <IMG>                                                                      */
9375 /*============================================================================*/
9376 void test_ixhtml10_img_tag_001()
9377 {
9378 #define  TEST_STRING "<img>"
9379 #define  RESULT_STRING "<img alt=\"\" />"
9380   char  *ret;
9381   char  *tmp;
9382   device_table spec;
9383   chxjconvrule_entry entry;
9384   cookie_t cookie;
9385   apr_size_t destlen;
9386   APR_INIT;
9387
9388   COOKIE_INIT(cookie);
9389
9390   SPEC_INIT(spec);
9391   destlen = sizeof(TEST_STRING)-1;
9392
9393   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9394   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9395   ret = chxj_rencoding(&r, ret, &destlen);
9396   fprintf(stderr, "actual:[%s]\n", ret);
9397   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9398   CU_ASSERT(ret != NULL);
9399   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9400   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9401
9402   APR_TERM;
9403 #undef TEST_STRING
9404 #undef RESULT_STRING
9405 }
9406 void test_ixhtml10_img_tag_002()
9407 {
9408 #define  TEST_STRING "<img src>"
9409 #define  RESULT_STRING "<img src=\"\" alt=\"\" />"
9410   char  *ret;
9411   char  *tmp;
9412   device_table spec;
9413   chxjconvrule_entry entry;
9414   cookie_t cookie;
9415   apr_size_t destlen;
9416   APR_INIT;
9417
9418   COOKIE_INIT(cookie);
9419
9420   SPEC_INIT(spec);
9421   destlen = sizeof(TEST_STRING)-1;
9422
9423   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9424   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9425   ret = chxj_rencoding(&r, ret, &destlen);
9426   fprintf(stderr, "actual:[%s]\n", ret);
9427   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9428   CU_ASSERT(ret != NULL);
9429   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9430   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9431
9432   APR_TERM;
9433 #undef TEST_STRING
9434 #undef RESULT_STRING
9435 }
9436 void test_ixhtml10_img_tag_003()
9437 {
9438 #define  TEST_STRING "<img src=\"\">"
9439 #define  RESULT_STRING "<img src=\"\" alt=\"\" />"
9440   char  *ret;
9441   char  *tmp;
9442   device_table spec;
9443   chxjconvrule_entry entry;
9444   cookie_t cookie;
9445   apr_size_t destlen;
9446   APR_INIT;
9447
9448   COOKIE_INIT(cookie);
9449
9450   SPEC_INIT(spec);
9451   destlen = sizeof(TEST_STRING)-1;
9452
9453   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9454   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9455   ret = chxj_rencoding(&r, ret, &destlen);
9456   fprintf(stderr, "actual:[%s]\n", ret);
9457   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9458   CU_ASSERT(ret != NULL);
9459   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9460   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9461
9462   APR_TERM;
9463 #undef TEST_STRING
9464 #undef RESULT_STRING
9465 }
9466 void test_ixhtml10_img_tag_004()
9467 {
9468 #define  TEST_STRING "<img src=\"aaa\">"
9469 #define  RESULT_STRING "<img src=\"aaa\" alt=\"\" />"
9470   char  *ret;
9471   char  *tmp;
9472   device_table spec;
9473   chxjconvrule_entry entry;
9474   cookie_t cookie;
9475   apr_size_t destlen;
9476   APR_INIT;
9477
9478   COOKIE_INIT(cookie);
9479
9480   SPEC_INIT(spec);
9481   destlen = sizeof(TEST_STRING)-1;
9482
9483   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9484   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9485   ret = chxj_rencoding(&r, ret, &destlen);
9486   fprintf(stderr, "actual:[%s]\n", ret);
9487   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9488   CU_ASSERT(ret != NULL);
9489   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9490   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9491
9492   APR_TERM;
9493 #undef TEST_STRING
9494 #undef RESULT_STRING
9495 }
9496 void test_ixhtml10_img_tag_005()
9497 {
9498 #define  TEST_STRING "<img src=\"亀さん\">"
9499 #define  RESULT_STRING "<img src=\"亀さん\" alt=\"\" />"
9500   char  *ret;
9501   char  *tmp;
9502   device_table spec;
9503   chxjconvrule_entry entry;
9504   cookie_t cookie;
9505   apr_size_t destlen;
9506   APR_INIT;
9507
9508   COOKIE_INIT(cookie);
9509
9510   SPEC_INIT(spec);
9511   destlen = sizeof(TEST_STRING)-1;
9512
9513   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9514   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9515   ret = chxj_rencoding(&r, ret, &destlen);
9516   fprintf(stderr, "actual:[%s]\n", ret);
9517   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9518   CU_ASSERT(ret != NULL);
9519   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9520   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9521
9522   APR_TERM;
9523 #undef TEST_STRING
9524 #undef RESULT_STRING
9525 }
9526 void test_ixhtml10_img_tag_006()
9527 {
9528 #define  TEST_STRING "<img src=\"ハンカク\">"
9529 #define  RESULT_STRING "<img src=\"ハンカク\" alt=\"\" />"
9530   char  *ret;
9531   char  *tmp;
9532   device_table spec;
9533   chxjconvrule_entry entry;
9534   cookie_t cookie;
9535   apr_size_t destlen;
9536   APR_INIT;
9537
9538   COOKIE_INIT(cookie);
9539
9540   SPEC_INIT(spec);
9541   destlen = sizeof(TEST_STRING)-1;
9542
9543   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9544   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9545   ret = chxj_rencoding(&r, ret, &destlen);
9546   fprintf(stderr, "actual:[%s]\n", ret);
9547   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9548   CU_ASSERT(ret != NULL);
9549   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9550   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9551
9552   APR_TERM;
9553 #undef TEST_STRING
9554 #undef RESULT_STRING
9555 }
9556 void test_ixhtml10_img_tag_007()
9557 {
9558 #define  TEST_STRING "<img align>"
9559 #define  RESULT_STRING "<img alt=\"\" />"
9560   char  *ret;
9561   char  *tmp;
9562   device_table spec;
9563   chxjconvrule_entry entry;
9564   cookie_t cookie;
9565   apr_size_t destlen;
9566   APR_INIT;
9567
9568   COOKIE_INIT(cookie);
9569
9570   SPEC_INIT(spec);
9571   destlen = sizeof(TEST_STRING)-1;
9572
9573   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9574   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9575   ret = chxj_rencoding(&r, ret, &destlen);
9576   fprintf(stderr, "actual:[%s]\n", ret);
9577   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9578   CU_ASSERT(ret != NULL);
9579   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9580   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9581
9582   APR_TERM;
9583 #undef TEST_STRING
9584 #undef RESULT_STRING
9585 }
9586 void test_ixhtml10_img_tag_008()
9587 {
9588 #define  TEST_STRING "<img align=\"\">"
9589 #define  RESULT_STRING "<img alt=\"\" />"
9590   char  *ret;
9591   char  *tmp;
9592   device_table spec;
9593   chxjconvrule_entry entry;
9594   cookie_t cookie;
9595   apr_size_t destlen;
9596   APR_INIT;
9597
9598   COOKIE_INIT(cookie);
9599
9600   SPEC_INIT(spec);
9601   destlen = sizeof(TEST_STRING)-1;
9602
9603   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9604   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9605   ret = chxj_rencoding(&r, ret, &destlen);
9606   fprintf(stderr, "actual:[%s]\n", ret);
9607   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9608   CU_ASSERT(ret != NULL);
9609   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9610   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9611
9612   APR_TERM;
9613 #undef TEST_STRING
9614 #undef RESULT_STRING
9615 }
9616 void test_ixhtml10_img_tag_009()
9617 {
9618 #define  TEST_STRING "<img align=\"top\">"
9619 #define  RESULT_STRING "<img style=\"vertical-align:top;\" alt=\"\" />"
9620   char  *ret;
9621   char  *tmp;
9622   device_table spec;
9623   chxjconvrule_entry entry;
9624   cookie_t cookie;
9625   apr_size_t destlen;
9626   APR_INIT;
9627
9628   COOKIE_INIT(cookie);
9629
9630   SPEC_INIT(spec);
9631   destlen = sizeof(TEST_STRING)-1;
9632
9633   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9634   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9635   ret = chxj_rencoding(&r, ret, &destlen);
9636   fprintf(stderr, "actual:[%s]\n", ret);
9637   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9638   CU_ASSERT(ret != NULL);
9639   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9640   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9641
9642   APR_TERM;
9643 #undef TEST_STRING
9644 #undef RESULT_STRING
9645 }
9646 void test_ixhtml10_img_tag_010()
9647 {
9648 #define  TEST_STRING "<img align=\"middle\">"
9649 #define  RESULT_STRING "<img style=\"vertical-align:middle;\" alt=\"\" />"
9650   char  *ret;
9651   char  *tmp;
9652   device_table spec;
9653   chxjconvrule_entry entry;
9654   cookie_t cookie;
9655   apr_size_t destlen;
9656   APR_INIT;
9657
9658   COOKIE_INIT(cookie);
9659
9660   SPEC_INIT(spec);
9661   destlen = sizeof(TEST_STRING)-1;
9662
9663   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9664   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9665   ret = chxj_rencoding(&r, ret, &destlen);
9666   fprintf(stderr, "actual:[%s]\n", ret);
9667   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9668   CU_ASSERT(ret != NULL);
9669   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9670   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9671
9672   APR_TERM;
9673 #undef TEST_STRING
9674 #undef RESULT_STRING
9675 }
9676 void test_ixhtml10_img_tag_011()
9677 {
9678 #define  TEST_STRING "<img align=\"bottom\">"
9679 #define  RESULT_STRING "<img style=\"vertical-align:bottom;\" alt=\"\" />"
9680   char  *ret;
9681   char  *tmp;
9682   device_table spec;
9683   chxjconvrule_entry entry;
9684   cookie_t cookie;
9685   apr_size_t destlen;
9686   APR_INIT;
9687
9688   COOKIE_INIT(cookie);
9689
9690   SPEC_INIT(spec);
9691   destlen = sizeof(TEST_STRING)-1;
9692
9693   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9694   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9695   ret = chxj_rencoding(&r, ret, &destlen);
9696   fprintf(stderr, "actual:[%s]\n", ret);
9697   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9698   CU_ASSERT(ret != NULL);
9699   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9700   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9701
9702   APR_TERM;
9703 #undef TEST_STRING
9704 #undef RESULT_STRING
9705 }
9706 void test_ixhtml10_img_tag_012()
9707 {
9708 #define  TEST_STRING "<img align=\"left\">"
9709 #define  RESULT_STRING "<img style=\"float:left;\" alt=\"\" />"
9710   char  *ret;
9711   char  *tmp;
9712   device_table spec;
9713   chxjconvrule_entry entry;
9714   cookie_t cookie;
9715   apr_size_t destlen;
9716   APR_INIT;
9717
9718   COOKIE_INIT(cookie);
9719
9720   SPEC_INIT(spec);
9721   destlen = sizeof(TEST_STRING)-1;
9722
9723   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9724   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9725   ret = chxj_rencoding(&r, ret, &destlen);
9726   fprintf(stderr, "actual:[%s]\n", ret);
9727   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9728   CU_ASSERT(ret != NULL);
9729   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9730   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9731
9732   APR_TERM;
9733 #undef TEST_STRING
9734 #undef RESULT_STRING
9735 }
9736 void test_ixhtml10_img_tag_013()
9737 {
9738 #define  TEST_STRING "<img align=\"right\">"
9739 #define  RESULT_STRING "<img style=\"float:right;\" alt=\"\" />"
9740   char  *ret;
9741   char  *tmp;
9742   device_table spec;
9743   chxjconvrule_entry entry;
9744   cookie_t cookie;
9745   apr_size_t destlen;
9746   APR_INIT;
9747
9748   COOKIE_INIT(cookie);
9749
9750   SPEC_INIT(spec);
9751   destlen = sizeof(TEST_STRING)-1;
9752
9753   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9754   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9755   ret = chxj_rencoding(&r, ret, &destlen);
9756   fprintf(stderr, "actual:[%s]\n", ret);
9757   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9758   CU_ASSERT(ret != NULL);
9759   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9760   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9761
9762   APR_TERM;
9763 #undef TEST_STRING
9764 #undef RESULT_STRING
9765 }
9766 void test_ixhtml10_img_tag_013_1()
9767 {
9768 #define  TEST_STRING "<img align=\"center\">"
9769 #define  RESULT_STRING "<img style=\"vertical-align:middle;\" alt=\"\" />"
9770   char  *ret;
9771   char  *tmp;
9772   device_table spec;
9773   chxjconvrule_entry entry;
9774   cookie_t cookie;
9775   apr_size_t destlen;
9776   APR_INIT;
9777
9778   COOKIE_INIT(cookie);
9779
9780   SPEC_INIT(spec);
9781   destlen = sizeof(TEST_STRING)-1;
9782
9783   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9784   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9785   ret = chxj_rencoding(&r, ret, &destlen);
9786   fprintf(stderr, "actual:[%s]\n", ret);
9787   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9788   CU_ASSERT(ret != NULL);
9789   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9790   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9791
9792   APR_TERM;
9793 #undef TEST_STRING
9794 #undef RESULT_STRING
9795 }
9796 void test_ixhtml10_img_tag_014()
9797 {
9798 #define  TEST_STRING "<img align=\"unkown\">"
9799 #define  RESULT_STRING "<img alt=\"\" />"
9800   char  *ret;
9801   char  *tmp;
9802   device_table spec;
9803   chxjconvrule_entry entry;
9804   cookie_t cookie;
9805   apr_size_t destlen;
9806   APR_INIT;
9807
9808   COOKIE_INIT(cookie);
9809
9810   SPEC_INIT(spec);
9811   destlen = sizeof(TEST_STRING)-1;
9812
9813   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9814   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9815   ret = chxj_rencoding(&r, ret, &destlen);
9816   fprintf(stderr, "actual:[%s]\n", ret);
9817   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9818   CU_ASSERT(ret != NULL);
9819   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9820   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9821
9822   APR_TERM;
9823 #undef TEST_STRING
9824 #undef RESULT_STRING
9825 }
9826 void test_ixhtml10_img_tag_015()
9827 {
9828 #define  TEST_STRING "<img width>"
9829 #define  RESULT_STRING "<img alt=\"\" />"
9830   char  *ret;
9831   char  *tmp;
9832   device_table spec;
9833   chxjconvrule_entry entry;
9834   cookie_t cookie;
9835   apr_size_t destlen;
9836   APR_INIT;
9837
9838   COOKIE_INIT(cookie);
9839
9840   SPEC_INIT(spec);
9841   destlen = sizeof(TEST_STRING)-1;
9842
9843   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9844   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9845   ret = chxj_rencoding(&r, ret, &destlen);
9846   fprintf(stderr, "actual:[%s]\n", ret);
9847   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9848   CU_ASSERT(ret != NULL);
9849   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9850   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9851
9852   APR_TERM;
9853 #undef TEST_STRING
9854 #undef RESULT_STRING
9855 }
9856 void test_ixhtml10_img_tag_016()
9857 {
9858 #define  TEST_STRING "<img width=\"\">"
9859 #define  RESULT_STRING "<img alt=\"\" />"
9860   char  *ret;
9861   char  *tmp;
9862   device_table spec;
9863   chxjconvrule_entry entry;
9864   cookie_t cookie;
9865   apr_size_t destlen;
9866   APR_INIT;
9867
9868   COOKIE_INIT(cookie);
9869
9870   SPEC_INIT(spec);
9871   destlen = sizeof(TEST_STRING)-1;
9872
9873   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9874   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9875   ret = chxj_rencoding(&r, ret, &destlen);
9876   fprintf(stderr, "actual:[%s]\n", ret);
9877   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9878   CU_ASSERT(ret != NULL);
9879   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9880   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9881
9882   APR_TERM;
9883 #undef TEST_STRING
9884 #undef RESULT_STRING
9885 }
9886 void test_ixhtml10_img_tag_017()
9887 {
9888 #define  TEST_STRING "<img width=\"abc\">"
9889 #define  RESULT_STRING "<img width=\"abc\" alt=\"\" />"
9890   char  *ret;
9891   char  *tmp;
9892   device_table spec;
9893   chxjconvrule_entry entry;
9894   cookie_t cookie;
9895   apr_size_t destlen;
9896   APR_INIT;
9897
9898   COOKIE_INIT(cookie);
9899
9900   SPEC_INIT(spec);
9901   destlen = sizeof(TEST_STRING)-1;
9902
9903   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9904   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9905   ret = chxj_rencoding(&r, ret, &destlen);
9906   fprintf(stderr, "actual:[%s]\n", ret);
9907   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9908   CU_ASSERT(ret != NULL);
9909   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9910   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9911
9912   APR_TERM;
9913 #undef TEST_STRING
9914 #undef RESULT_STRING
9915 }
9916 void test_ixhtml10_img_tag_018()
9917 {
9918 #define  TEST_STRING "<img width=\"10\">"
9919 #define  RESULT_STRING "<img width=\"10\" alt=\"\" />"
9920   char  *ret;
9921   char  *tmp;
9922   device_table spec;
9923   chxjconvrule_entry entry;
9924   cookie_t cookie;
9925   apr_size_t destlen;
9926   APR_INIT;
9927
9928   COOKIE_INIT(cookie);
9929
9930   SPEC_INIT(spec);
9931   destlen = sizeof(TEST_STRING)-1;
9932
9933   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9934   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9935   ret = chxj_rencoding(&r, ret, &destlen);
9936   fprintf(stderr, "actual:[%s]\n", ret);
9937   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9938   CU_ASSERT(ret != NULL);
9939   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9940   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9941
9942   APR_TERM;
9943 #undef TEST_STRING
9944 #undef RESULT_STRING
9945 }
9946 void test_ixhtml10_img_tag_019()
9947 {
9948 #define  TEST_STRING "<img width=\"10%\">"
9949 #define  RESULT_STRING "<img width=\"10%\" alt=\"\" />"
9950   char  *ret;
9951   char  *tmp;
9952   device_table spec;
9953   chxjconvrule_entry entry;
9954   cookie_t cookie;
9955   apr_size_t destlen;
9956   APR_INIT;
9957
9958   COOKIE_INIT(cookie);
9959
9960   SPEC_INIT(spec);
9961   destlen = sizeof(TEST_STRING)-1;
9962
9963   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9964   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9965   ret = chxj_rencoding(&r, ret, &destlen);
9966   fprintf(stderr, "actual:[%s]\n", ret);
9967   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9968   CU_ASSERT(ret != NULL);
9969   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
9970   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
9971
9972   APR_TERM;
9973 #undef TEST_STRING
9974 #undef RESULT_STRING
9975 }
9976 void test_ixhtml10_img_tag_020()
9977 {
9978 #define  TEST_STRING "<img height>"
9979 #define  RESULT_STRING "<img alt=\"\" />"
9980   char  *ret;
9981   char  *tmp;
9982   device_table spec;
9983   chxjconvrule_entry entry;
9984   cookie_t cookie;
9985   apr_size_t destlen;
9986   APR_INIT;
9987
9988   COOKIE_INIT(cookie);
9989
9990   SPEC_INIT(spec);
9991   destlen = sizeof(TEST_STRING)-1;
9992
9993   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
9994   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
9995   ret = chxj_rencoding(&r, ret, &destlen);
9996   fprintf(stderr, "actual:[%s]\n", ret);
9997   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
9998   CU_ASSERT(ret != NULL);
9999   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10000   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10001
10002   APR_TERM;
10003 #undef TEST_STRING
10004 #undef RESULT_STRING
10005 }
10006 void test_ixhtml10_img_tag_021()
10007 {
10008 #define  TEST_STRING "<img height=\"\">"
10009 #define  RESULT_STRING "<img alt=\"\" />"
10010   char  *ret;
10011   char  *tmp;
10012   device_table spec;
10013   chxjconvrule_entry entry;
10014   cookie_t cookie;
10015   apr_size_t destlen;
10016   APR_INIT;
10017
10018   COOKIE_INIT(cookie);
10019
10020   SPEC_INIT(spec);
10021   destlen = sizeof(TEST_STRING)-1;
10022
10023   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10024   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10025   ret = chxj_rencoding(&r, ret, &destlen);
10026   fprintf(stderr, "actual:[%s]\n", ret);
10027   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10028   CU_ASSERT(ret != NULL);
10029   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10030   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10031
10032   APR_TERM;
10033 #undef TEST_STRING
10034 #undef RESULT_STRING
10035 }
10036 void test_ixhtml10_img_tag_022()
10037 {
10038 #define  TEST_STRING "<img height=\"abc\">"
10039 #define  RESULT_STRING "<img height=\"abc\" alt=\"\" />"
10040   char  *ret;
10041   char  *tmp;
10042   device_table spec;
10043   chxjconvrule_entry entry;
10044   cookie_t cookie;
10045   apr_size_t destlen;
10046   APR_INIT;
10047
10048   COOKIE_INIT(cookie);
10049
10050   SPEC_INIT(spec);
10051   destlen = sizeof(TEST_STRING)-1;
10052
10053   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10054   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10055   ret = chxj_rencoding(&r, ret, &destlen);
10056   fprintf(stderr, "actual:[%s]\n", ret);
10057   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10058   CU_ASSERT(ret != NULL);
10059   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10060   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10061
10062   APR_TERM;
10063 #undef TEST_STRING
10064 #undef RESULT_STRING
10065 }
10066 void test_ixhtml10_img_tag_023()
10067 {
10068 #define  TEST_STRING "<img height=\"10\">"
10069 #define  RESULT_STRING "<img height=\"10\" alt=\"\" />"
10070   char  *ret;
10071   char  *tmp;
10072   device_table spec;
10073   chxjconvrule_entry entry;
10074   cookie_t cookie;
10075   apr_size_t destlen;
10076   APR_INIT;
10077
10078   COOKIE_INIT(cookie);
10079
10080   SPEC_INIT(spec);
10081   destlen = sizeof(TEST_STRING)-1;
10082
10083   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10084   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10085   ret = chxj_rencoding(&r, ret, &destlen);
10086   fprintf(stderr, "actual:[%s]\n", ret);
10087   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10088   CU_ASSERT(ret != NULL);
10089   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10090   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10091
10092   APR_TERM;
10093 #undef TEST_STRING
10094 #undef RESULT_STRING
10095 }
10096 void test_ixhtml10_img_tag_024()
10097 {
10098 #define  TEST_STRING "<img height=\"10%\">"
10099 #define  RESULT_STRING "<img height=\"10%\" alt=\"\" />"
10100   char  *ret;
10101   char  *tmp;
10102   device_table spec;
10103   chxjconvrule_entry entry;
10104   cookie_t cookie;
10105   apr_size_t destlen;
10106   APR_INIT;
10107
10108   COOKIE_INIT(cookie);
10109
10110   SPEC_INIT(spec);
10111   destlen = sizeof(TEST_STRING)-1;
10112
10113   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10114   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10115   ret = chxj_rencoding(&r, ret, &destlen);
10116   fprintf(stderr, "actual:[%s]\n", ret);
10117   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10118   CU_ASSERT(ret != NULL);
10119   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10120   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10121
10122   APR_TERM;
10123 #undef TEST_STRING
10124 #undef RESULT_STRING
10125 }
10126 void test_ixhtml10_img_tag_025()
10127 {
10128 #define  TEST_STRING "<img hspace>"
10129 #define  RESULT_STRING "<img alt=\"\" />"
10130   char  *ret;
10131   char  *tmp;
10132   device_table spec;
10133   chxjconvrule_entry entry;
10134   cookie_t cookie;
10135   apr_size_t destlen;
10136   APR_INIT;
10137
10138   COOKIE_INIT(cookie);
10139
10140   SPEC_INIT(spec);
10141   destlen = sizeof(TEST_STRING)-1;
10142
10143   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10144   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10145   ret = chxj_rencoding(&r, ret, &destlen);
10146   fprintf(stderr, "actual:[%s]\n", ret);
10147   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10148   CU_ASSERT(ret != NULL);
10149   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10150   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10151
10152   APR_TERM;
10153 #undef TEST_STRING
10154 #undef RESULT_STRING
10155 }
10156 void test_ixhtml10_img_tag_026()
10157 {
10158 #define  TEST_STRING "<img hspace=\"\">"
10159 #define  RESULT_STRING "<img alt=\"\" />"
10160   char  *ret;
10161   char  *tmp;
10162   device_table spec;
10163   chxjconvrule_entry entry;
10164   cookie_t cookie;
10165   apr_size_t destlen;
10166   APR_INIT;
10167
10168   COOKIE_INIT(cookie);
10169
10170   SPEC_INIT(spec);
10171   destlen = sizeof(TEST_STRING)-1;
10172
10173   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10174   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10175   ret = chxj_rencoding(&r, ret, &destlen);
10176   fprintf(stderr, "actual:[%s]\n", ret);
10177   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10178   CU_ASSERT(ret != NULL);
10179   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10180   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10181
10182   APR_TERM;
10183 #undef TEST_STRING
10184 #undef RESULT_STRING
10185 }
10186 void test_ixhtml10_img_tag_027()
10187 {
10188 #define  TEST_STRING "<img hspace=\"abc\">"
10189 #define  RESULT_STRING "<img style=\"margin-left:abc;margin-right:abc;\" alt=\"\" />"
10190   char  *ret;
10191   char  *tmp;
10192   device_table spec;
10193   chxjconvrule_entry entry;
10194   cookie_t cookie;
10195   apr_size_t destlen;
10196   APR_INIT;
10197
10198   COOKIE_INIT(cookie);
10199
10200   SPEC_INIT(spec);
10201   destlen = sizeof(TEST_STRING)-1;
10202
10203   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10204   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10205   ret = chxj_rencoding(&r, ret, &destlen);
10206   fprintf(stderr, "actual:[%s]\n", ret);
10207   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10208   CU_ASSERT(ret != NULL);
10209   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10210   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10211
10212   APR_TERM;
10213 #undef TEST_STRING
10214 #undef RESULT_STRING
10215 }
10216 void test_ixhtml10_img_tag_028()
10217 {
10218 #define  TEST_STRING "<img hspace=\"10\">"
10219 #define  RESULT_STRING "<img style=\"margin-left:10;margin-right:10;\" alt=\"\" />"
10220   char  *ret;
10221   char  *tmp;
10222   device_table spec;
10223   chxjconvrule_entry entry;
10224   cookie_t cookie;
10225   apr_size_t destlen;
10226   APR_INIT;
10227
10228   COOKIE_INIT(cookie);
10229
10230   SPEC_INIT(spec);
10231   destlen = sizeof(TEST_STRING)-1;
10232
10233   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10234   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10235   ret = chxj_rencoding(&r, ret, &destlen);
10236   fprintf(stderr, "actual:[%s]\n", ret);
10237   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10238   CU_ASSERT(ret != NULL);
10239   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10240   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10241
10242   APR_TERM;
10243 #undef TEST_STRING
10244 #undef RESULT_STRING
10245 }
10246 void test_ixhtml10_img_tag_029()
10247 {
10248 #define  TEST_STRING "<img vspace>"
10249 #define  RESULT_STRING "<img alt=\"\" />"
10250   char  *ret;
10251   char  *tmp;
10252   device_table spec;
10253   chxjconvrule_entry entry;
10254   cookie_t cookie;
10255   apr_size_t destlen;
10256   APR_INIT;
10257
10258   COOKIE_INIT(cookie);
10259
10260   SPEC_INIT(spec);
10261   destlen = sizeof(TEST_STRING)-1;
10262
10263   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10264   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10265   ret = chxj_rencoding(&r, ret, &destlen);
10266   fprintf(stderr, "actual:[%s]\n", ret);
10267   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10268   CU_ASSERT(ret != NULL);
10269   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10270   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10271
10272   APR_TERM;
10273 #undef TEST_STRING
10274 #undef RESULT_STRING
10275 }
10276 void test_ixhtml10_img_tag_030()
10277 {
10278 #define  TEST_STRING "<img vspace=\"\">"
10279 #define  RESULT_STRING "<img alt=\"\" />"
10280   char  *ret;
10281   char  *tmp;
10282   device_table spec;
10283   chxjconvrule_entry entry;
10284   cookie_t cookie;
10285   apr_size_t destlen;
10286   APR_INIT;
10287
10288   COOKIE_INIT(cookie);
10289
10290   SPEC_INIT(spec);
10291   destlen = sizeof(TEST_STRING)-1;
10292
10293   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10294   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10295   ret = chxj_rencoding(&r, ret, &destlen);
10296   fprintf(stderr, "actual:[%s]\n", ret);
10297   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10298   CU_ASSERT(ret != NULL);
10299   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10300   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10301
10302   APR_TERM;
10303 #undef TEST_STRING
10304 #undef RESULT_STRING
10305 }
10306 void test_ixhtml10_img_tag_031()
10307 {
10308 #define  TEST_STRING "<img vspace=\"abc\">"
10309 #define  RESULT_STRING "<img style=\"margin-top:abc;margin-bottom:abc;\" alt=\"\" />"
10310   char  *ret;
10311   char  *tmp;
10312   device_table spec;
10313   chxjconvrule_entry entry;
10314   cookie_t cookie;
10315   apr_size_t destlen;
10316   APR_INIT;
10317
10318   COOKIE_INIT(cookie);
10319
10320   SPEC_INIT(spec);
10321   destlen = sizeof(TEST_STRING)-1;
10322
10323   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10324   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10325   ret = chxj_rencoding(&r, ret, &destlen);
10326   fprintf(stderr, "actual:[%s]\n", ret);
10327   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10328   CU_ASSERT(ret != NULL);
10329   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10330   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10331
10332   APR_TERM;
10333 #undef TEST_STRING
10334 #undef RESULT_STRING
10335 }
10336 void test_ixhtml10_img_tag_032()
10337 {
10338 #define  TEST_STRING "<img vspace=\"10\">"
10339 #define  RESULT_STRING "<img style=\"margin-top:10;margin-bottom:10;\" alt=\"\" />"
10340   char  *ret;
10341   char  *tmp;
10342   device_table spec;
10343   chxjconvrule_entry entry;
10344   cookie_t cookie;
10345   apr_size_t destlen;
10346   APR_INIT;
10347
10348   COOKIE_INIT(cookie);
10349
10350   SPEC_INIT(spec);
10351   destlen = sizeof(TEST_STRING)-1;
10352
10353   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10354   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10355   ret = chxj_rencoding(&r, ret, &destlen);
10356   fprintf(stderr, "actual:[%s]\n", ret);
10357   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10358   CU_ASSERT(ret != NULL);
10359   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10360   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10361
10362   APR_TERM;
10363 #undef TEST_STRING
10364 #undef RESULT_STRING
10365 }
10366 void test_ixhtml10_img_tag_033()
10367 {
10368 #define  TEST_STRING "<img alt>"
10369 #define  RESULT_STRING "<img alt=\"\" />"
10370   char  *ret;
10371   char  *tmp;
10372   device_table spec;
10373   chxjconvrule_entry entry;
10374   cookie_t cookie;
10375   apr_size_t destlen;
10376   APR_INIT;
10377
10378   COOKIE_INIT(cookie);
10379
10380   SPEC_INIT(spec);
10381   destlen = sizeof(TEST_STRING)-1;
10382
10383   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10384   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10385   ret = chxj_rencoding(&r, ret, &destlen);
10386   fprintf(stderr, "actual:[%s]\n", ret);
10387   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10388   CU_ASSERT(ret != NULL);
10389   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10390   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10391
10392   APR_TERM;
10393 #undef TEST_STRING
10394 #undef RESULT_STRING
10395 }
10396 void test_ixhtml10_img_tag_034()
10397 {
10398 #define  TEST_STRING "<img alt=\"\">"
10399 #define  RESULT_STRING "<img alt=\"\" />"
10400   char  *ret;
10401   char  *tmp;
10402   device_table spec;
10403   chxjconvrule_entry entry;
10404   cookie_t cookie;
10405   apr_size_t destlen;
10406   APR_INIT;
10407
10408   COOKIE_INIT(cookie);
10409
10410   SPEC_INIT(spec);
10411   destlen = sizeof(TEST_STRING)-1;
10412
10413   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10414   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10415   ret = chxj_rencoding(&r, ret, &destlen);
10416   fprintf(stderr, "actual:[%s]\n", ret);
10417   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10418   CU_ASSERT(ret != NULL);
10419   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10420   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10421
10422   APR_TERM;
10423 #undef TEST_STRING
10424 #undef RESULT_STRING
10425 }
10426 void test_ixhtml10_img_tag_035()
10427 {
10428 #define  TEST_STRING "<img alt=\"abc\">"
10429 #define  RESULT_STRING "<img alt=\"abc\" />"
10430   char  *ret;
10431   char  *tmp;
10432   device_table spec;
10433   chxjconvrule_entry entry;
10434   cookie_t cookie;
10435   apr_size_t destlen;
10436   APR_INIT;
10437
10438   COOKIE_INIT(cookie);
10439
10440   SPEC_INIT(spec);
10441   destlen = sizeof(TEST_STRING)-1;
10442
10443   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10444   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10445   ret = chxj_rencoding(&r, ret, &destlen);
10446   fprintf(stderr, "actual:[%s]\n", ret);
10447   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10448   CU_ASSERT(ret != NULL);
10449   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10450   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10451
10452   APR_TERM;
10453 #undef TEST_STRING
10454 #undef RESULT_STRING
10455 }
10456 void test_ixhtml10_img_tag_036()
10457 {
10458 #define  TEST_STRING "<img alt=\"亀さん\">"
10459 #define  RESULT_STRING "<img alt=\"亀さん\" />"
10460   char  *ret;
10461   char  *tmp;
10462   device_table spec;
10463   chxjconvrule_entry entry;
10464   cookie_t cookie;
10465   apr_size_t destlen;
10466   APR_INIT;
10467
10468   COOKIE_INIT(cookie);
10469
10470   SPEC_INIT(spec);
10471   destlen = sizeof(TEST_STRING)-1;
10472
10473   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10474   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10475   ret = chxj_rencoding(&r, ret, &destlen);
10476   fprintf(stderr, "actual:[%s]\n", ret);
10477   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10478   CU_ASSERT(ret != NULL);
10479   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10480   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10481
10482   APR_TERM;
10483 #undef TEST_STRING
10484 #undef RESULT_STRING
10485 }
10486 void test_ixhtml10_img_tag_037()
10487 {
10488 #define  TEST_STRING "<img alt=\"ハンカク\">"
10489 #define  RESULT_STRING "<img alt=\"ハンカク\" />"
10490   char  *ret;
10491   char  *tmp;
10492   device_table spec;
10493   chxjconvrule_entry entry;
10494   cookie_t cookie;
10495   apr_size_t destlen;
10496   APR_INIT;
10497
10498   COOKIE_INIT(cookie);
10499
10500   SPEC_INIT(spec);
10501   destlen = sizeof(TEST_STRING)-1;
10502
10503   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10504   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10505   ret = chxj_rencoding(&r, ret, &destlen);
10506   fprintf(stderr, "actual:[%s]\n", ret);
10507   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10508   CU_ASSERT(ret != NULL);
10509   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10510   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10511
10512   APR_TERM;
10513 #undef TEST_STRING
10514 #undef RESULT_STRING
10515 }
10516 /*============================================================================*/
10517 /* <INPUT>                                                                    */
10518 /*============================================================================*/
10519 void test_ixhtml10_input_tag_001()
10520 {
10521 #define  TEST_STRING "<input>"
10522 #define  RESULT_STRING "<input />"
10523   char  *ret;
10524   char  *tmp;
10525   device_table spec;
10526   chxjconvrule_entry entry;
10527   cookie_t cookie;
10528   apr_size_t destlen;
10529   APR_INIT;
10530
10531   COOKIE_INIT(cookie);
10532
10533   SPEC_INIT(spec);
10534   destlen = sizeof(TEST_STRING)-1;
10535
10536   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10537   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10538   ret = chxj_rencoding(&r, ret, &destlen);
10539   fprintf(stderr, "actual:[%s]\n", ret);
10540   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10541   CU_ASSERT(ret != NULL);
10542   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10543   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10544
10545   APR_TERM;
10546 #undef TEST_STRING
10547 #undef RESULT_STRING
10548 }
10549 void test_ixhtml10_input_tag_002()
10550 {
10551 #define  TEST_STRING "<input type>"
10552 #define  RESULT_STRING "<input />"
10553   char  *ret;
10554   char  *tmp;
10555   device_table spec;
10556   chxjconvrule_entry entry;
10557   cookie_t cookie;
10558   apr_size_t destlen;
10559   APR_INIT;
10560
10561   COOKIE_INIT(cookie);
10562
10563   SPEC_INIT(spec);
10564   destlen = sizeof(TEST_STRING)-1;
10565
10566   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10567   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10568   ret = chxj_rencoding(&r, ret, &destlen);
10569   fprintf(stderr, "actual:[%s]\n", ret);
10570   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10571   CU_ASSERT(ret != NULL);
10572   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10573   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10574
10575   APR_TERM;
10576 #undef TEST_STRING
10577 #undef RESULT_STRING
10578 }
10579 void test_ixhtml10_input_tag_003()
10580 {
10581 #define  TEST_STRING "<input type=\"\">"
10582 #define  RESULT_STRING "<input />"
10583   char  *ret;
10584   char  *tmp;
10585   device_table spec;
10586   chxjconvrule_entry entry;
10587   cookie_t cookie;
10588   apr_size_t destlen;
10589   APR_INIT;
10590
10591   COOKIE_INIT(cookie);
10592
10593   SPEC_INIT(spec);
10594   destlen = sizeof(TEST_STRING)-1;
10595
10596   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10597   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10598   ret = chxj_rencoding(&r, ret, &destlen);
10599   fprintf(stderr, "actual:[%s]\n", ret);
10600   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10601   CU_ASSERT(ret != NULL);
10602   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10603   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10604
10605   APR_TERM;
10606 #undef TEST_STRING
10607 #undef RESULT_STRING
10608 }
10609 void test_ixhtml10_input_tag_004()
10610 {
10611 #define  TEST_STRING "<input type=\"text\">"
10612 #define  RESULT_STRING "<input type=\"text\" />"
10613   char  *ret;
10614   char  *tmp;
10615   device_table spec;
10616   chxjconvrule_entry entry;
10617   cookie_t cookie;
10618   apr_size_t destlen;
10619   APR_INIT;
10620
10621   COOKIE_INIT(cookie);
10622
10623   SPEC_INIT(spec);
10624   destlen = sizeof(TEST_STRING)-1;
10625
10626   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10627   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10628   ret = chxj_rencoding(&r, ret, &destlen);
10629   fprintf(stderr, "actual:[%s]\n", ret);
10630   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10631   CU_ASSERT(ret != NULL);
10632   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10633   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10634
10635   APR_TERM;
10636 #undef TEST_STRING
10637 #undef RESULT_STRING
10638 }
10639 void test_ixhtml10_input_tag_005()
10640 {
10641 #define  TEST_STRING "<input type=\"password\">"
10642 #define  RESULT_STRING "<input type=\"password\" style=\"-wap-input-format:&quot;*&lt;ja:n&gt;&quot;;\" />"
10643   char  *ret;
10644   char  *tmp;
10645   device_table spec;
10646   chxjconvrule_entry entry;
10647   cookie_t cookie;
10648   apr_size_t destlen;
10649   APR_INIT;
10650
10651   COOKIE_INIT(cookie);
10652
10653   SPEC_INIT(spec);
10654   destlen = sizeof(TEST_STRING)-1;
10655
10656   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10657   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10658   ret = chxj_rencoding(&r, ret, &destlen);
10659   fprintf(stderr, "actual:[%s]\n", ret);
10660   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10661   CU_ASSERT(ret != NULL);
10662   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10663   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10664
10665   APR_TERM;
10666 #undef TEST_STRING
10667 #undef RESULT_STRING
10668 }
10669 void test_ixhtml10_input_tag_006()
10670 {
10671 #define  TEST_STRING "<input type=\"checkbox\">"
10672 #define  RESULT_STRING "<input type=\"checkbox\" />"
10673   char  *ret;
10674   char  *tmp;
10675   device_table spec;
10676   chxjconvrule_entry entry;
10677   cookie_t cookie;
10678   apr_size_t destlen;
10679   APR_INIT;
10680
10681   COOKIE_INIT(cookie);
10682
10683   SPEC_INIT(spec);
10684   destlen = sizeof(TEST_STRING)-1;
10685
10686   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10687   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10688   ret = chxj_rencoding(&r, ret, &destlen);
10689   fprintf(stderr, "actual:[%s]\n", ret);
10690   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10691   CU_ASSERT(ret != NULL);
10692   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10693   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10694
10695   APR_TERM;
10696 #undef TEST_STRING
10697 #undef RESULT_STRING
10698 }
10699 void test_ixhtml10_input_tag_007()
10700 {
10701 #define  TEST_STRING "<input type=\"radio\">"
10702 #define  RESULT_STRING "<input type=\"radio\" />"
10703   char  *ret;
10704   char  *tmp;
10705   device_table spec;
10706   chxjconvrule_entry entry;
10707   cookie_t cookie;
10708   apr_size_t destlen;
10709   APR_INIT;
10710
10711   COOKIE_INIT(cookie);
10712
10713   SPEC_INIT(spec);
10714   destlen = sizeof(TEST_STRING)-1;
10715
10716   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10717   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10718   ret = chxj_rencoding(&r, ret, &destlen);
10719   fprintf(stderr, "actual:[%s]\n", ret);
10720   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10721   CU_ASSERT(ret != NULL);
10722   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10723   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10724
10725   APR_TERM;
10726 #undef TEST_STRING
10727 #undef RESULT_STRING
10728 }
10729 void test_ixhtml10_input_tag_008()
10730 {
10731 #define  TEST_STRING "<input type=\"hidden\">"
10732 #define  RESULT_STRING "<input type=\"hidden\" />"
10733   char  *ret;
10734   char  *tmp;
10735   device_table spec;
10736   chxjconvrule_entry entry;
10737   cookie_t cookie;
10738   apr_size_t destlen;
10739   APR_INIT;
10740
10741   COOKIE_INIT(cookie);
10742
10743   SPEC_INIT(spec);
10744   destlen = sizeof(TEST_STRING)-1;
10745
10746   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10747   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10748   ret = chxj_rencoding(&r, ret, &destlen);
10749   fprintf(stderr, "actual:[%s]\n", ret);
10750   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10751   CU_ASSERT(ret != NULL);
10752   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10753   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10754
10755   APR_TERM;
10756 #undef TEST_STRING
10757 #undef RESULT_STRING
10758 }
10759 void test_ixhtml10_input_tag_009()
10760 {
10761 #define  TEST_STRING "<input type=\"submit\">"
10762 #define  RESULT_STRING "<input type=\"submit\" />"
10763   char  *ret;
10764   char  *tmp;
10765   device_table spec;
10766   chxjconvrule_entry entry;
10767   cookie_t cookie;
10768   apr_size_t destlen;
10769   APR_INIT;
10770
10771   COOKIE_INIT(cookie);
10772
10773   SPEC_INIT(spec);
10774   destlen = sizeof(TEST_STRING)-1;
10775
10776   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10777   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10778   ret = chxj_rencoding(&r, ret, &destlen);
10779   fprintf(stderr, "actual:[%s]\n", ret);
10780   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10781   CU_ASSERT(ret != NULL);
10782   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10783   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10784
10785   APR_TERM;
10786 #undef TEST_STRING
10787 #undef RESULT_STRING
10788 }
10789 void test_ixhtml10_input_tag_010()
10790 {
10791 #define  TEST_STRING "<input type=\"reset\">"
10792 #define  RESULT_STRING "<input type=\"reset\" />"
10793   char  *ret;
10794   char  *tmp;
10795   device_table spec;
10796   chxjconvrule_entry entry;
10797   cookie_t cookie;
10798   apr_size_t destlen;
10799   APR_INIT;
10800
10801   COOKIE_INIT(cookie);
10802
10803   SPEC_INIT(spec);
10804   destlen = sizeof(TEST_STRING)-1;
10805
10806   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10807   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10808   ret = chxj_rencoding(&r, ret, &destlen);
10809   fprintf(stderr, "actual:[%s]\n", ret);
10810   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10811   CU_ASSERT(ret != NULL);
10812   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10813   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10814
10815   APR_TERM;
10816 #undef TEST_STRING
10817 #undef RESULT_STRING
10818 }
10819 void test_ixhtml10_input_tag_011()
10820 {
10821 #define  TEST_STRING "<input type=\"unknown\">"
10822 #define  RESULT_STRING "<input />"
10823   char  *ret;
10824   char  *tmp;
10825   device_table spec;
10826   chxjconvrule_entry entry;
10827   cookie_t cookie;
10828   apr_size_t destlen;
10829   APR_INIT;
10830
10831   COOKIE_INIT(cookie);
10832
10833   SPEC_INIT(spec);
10834   destlen = sizeof(TEST_STRING)-1;
10835
10836   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10837   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10838   ret = chxj_rencoding(&r, ret, &destlen);
10839   fprintf(stderr, "actual:[%s]\n", ret);
10840   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10841   CU_ASSERT(ret != NULL);
10842   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10843   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10844
10845   APR_TERM;
10846 #undef TEST_STRING
10847 #undef RESULT_STRING
10848 }
10849 void test_ixhtml10_input_tag_012()
10850 {
10851 #define  TEST_STRING "<input name>"
10852 #define  RESULT_STRING "<input />"
10853   char  *ret;
10854   char  *tmp;
10855   device_table spec;
10856   chxjconvrule_entry entry;
10857   cookie_t cookie;
10858   apr_size_t destlen;
10859   APR_INIT;
10860
10861   COOKIE_INIT(cookie);
10862
10863   SPEC_INIT(spec);
10864   destlen = sizeof(TEST_STRING)-1;
10865
10866   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10867   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10868   ret = chxj_rencoding(&r, ret, &destlen);
10869   fprintf(stderr, "actual:[%s]\n", ret);
10870   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10871   CU_ASSERT(ret != NULL);
10872   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10873   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10874
10875   APR_TERM;
10876 #undef TEST_STRING
10877 #undef RESULT_STRING
10878 }
10879 void test_ixhtml10_input_tag_013()
10880 {
10881 #define  TEST_STRING "<input name=\"\">"
10882 #define  RESULT_STRING "<input />"
10883   char  *ret;
10884   char  *tmp;
10885   device_table spec;
10886   chxjconvrule_entry entry;
10887   cookie_t cookie;
10888   apr_size_t destlen;
10889   APR_INIT;
10890
10891   COOKIE_INIT(cookie);
10892
10893   SPEC_INIT(spec);
10894   destlen = sizeof(TEST_STRING)-1;
10895
10896   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10897   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10898   ret = chxj_rencoding(&r, ret, &destlen);
10899   fprintf(stderr, "actual:[%s]\n", ret);
10900   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10901   CU_ASSERT(ret != NULL);
10902   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10903   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10904
10905   APR_TERM;
10906 #undef TEST_STRING
10907 #undef RESULT_STRING
10908 }
10909 void test_ixhtml10_input_tag_014()
10910 {
10911 #define  TEST_STRING "<input name=\"a\">"
10912 #define  RESULT_STRING "<input name=\"a\" />"
10913   char  *ret;
10914   char  *tmp;
10915   device_table spec;
10916   chxjconvrule_entry entry;
10917   cookie_t cookie;
10918   apr_size_t destlen;
10919   APR_INIT;
10920
10921   COOKIE_INIT(cookie);
10922
10923   SPEC_INIT(spec);
10924   destlen = sizeof(TEST_STRING)-1;
10925
10926   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10927   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10928   ret = chxj_rencoding(&r, ret, &destlen);
10929   fprintf(stderr, "actual:[%s]\n", ret);
10930   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10931   CU_ASSERT(ret != NULL);
10932   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10933   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10934
10935   APR_TERM;
10936 #undef TEST_STRING
10937 #undef RESULT_STRING
10938 }
10939 void test_ixhtml10_input_tag_015()
10940 {
10941 #define  TEST_STRING "<input name=\"亀\">"
10942 #define  RESULT_STRING "<input name=\"亀\" />"
10943   char  *ret;
10944   char  *tmp;
10945   device_table spec;
10946   chxjconvrule_entry entry;
10947   cookie_t cookie;
10948   apr_size_t destlen;
10949   APR_INIT;
10950
10951   COOKIE_INIT(cookie);
10952
10953   SPEC_INIT(spec);
10954   destlen = sizeof(TEST_STRING)-1;
10955
10956   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10957   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10958   ret = chxj_rencoding(&r, ret, &destlen);
10959   fprintf(stderr, "actual:[%s]\n", ret);
10960   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10961   CU_ASSERT(ret != NULL);
10962   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10963   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10964
10965   APR_TERM;
10966 #undef TEST_STRING
10967 #undef RESULT_STRING
10968 }
10969 void test_ixhtml10_input_tag_016()
10970 {
10971 #define  TEST_STRING "<input name=\"ハンカク\">"
10972 #define  RESULT_STRING "<input name=\"ハンカク\" />"
10973   char  *ret;
10974   char  *tmp;
10975   device_table spec;
10976   chxjconvrule_entry entry;
10977   cookie_t cookie;
10978   apr_size_t destlen;
10979   APR_INIT;
10980
10981   COOKIE_INIT(cookie);
10982
10983   SPEC_INIT(spec);
10984   destlen = sizeof(TEST_STRING)-1;
10985
10986   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
10987   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
10988   ret = chxj_rencoding(&r, ret, &destlen);
10989   fprintf(stderr, "actual:[%s]\n", ret);
10990   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
10991   CU_ASSERT(ret != NULL);
10992   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
10993   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
10994
10995   APR_TERM;
10996 #undef TEST_STRING
10997 #undef RESULT_STRING
10998 }
10999 void test_ixhtml10_input_tag_017()
11000 {
11001 #define  TEST_STRING "<input value>"
11002 #define  RESULT_STRING "<input />"
11003   char  *ret;
11004   char  *tmp;
11005   device_table spec;
11006   chxjconvrule_entry entry;
11007   cookie_t cookie;
11008   apr_size_t destlen;
11009   APR_INIT;
11010
11011   COOKIE_INIT(cookie);
11012
11013   SPEC_INIT(spec);
11014   destlen = sizeof(TEST_STRING)-1;
11015
11016   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11017   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11018   ret = chxj_rencoding(&r, ret, &destlen);
11019   fprintf(stderr, "actual:[%s]\n", ret);
11020   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11021   CU_ASSERT(ret != NULL);
11022   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11023   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11024
11025   APR_TERM;
11026 #undef TEST_STRING
11027 #undef RESULT_STRING
11028 }
11029 void test_ixhtml10_input_tag_018()
11030 {
11031 #define  TEST_STRING "<input value=\"\">"
11032 #define  RESULT_STRING "<input />"
11033   char  *ret;
11034   char  *tmp;
11035   device_table spec;
11036   chxjconvrule_entry entry;
11037   cookie_t cookie;
11038   apr_size_t destlen;
11039   APR_INIT;
11040
11041   COOKIE_INIT(cookie);
11042
11043   SPEC_INIT(spec);
11044   destlen = sizeof(TEST_STRING)-1;
11045
11046   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11047   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11048   ret = chxj_rencoding(&r, ret, &destlen);
11049   fprintf(stderr, "actual:[%s]\n", ret);
11050   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11051   CU_ASSERT(ret != NULL);
11052   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11053   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11054
11055   APR_TERM;
11056 #undef TEST_STRING
11057 #undef RESULT_STRING
11058 }
11059 void test_ixhtml10_input_tag_019()
11060 {
11061 #define  TEST_STRING "<input value=\"a\">"
11062 #define  RESULT_STRING "<input value=\"a\" />"
11063   char  *ret;
11064   char  *tmp;
11065   device_table spec;
11066   chxjconvrule_entry entry;
11067   cookie_t cookie;
11068   apr_size_t destlen;
11069   APR_INIT;
11070
11071   COOKIE_INIT(cookie);
11072
11073   SPEC_INIT(spec);
11074   destlen = sizeof(TEST_STRING)-1;
11075
11076   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11077   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11078   ret = chxj_rencoding(&r, ret, &destlen);
11079   fprintf(stderr, "actual:[%s]\n", ret);
11080   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11081   CU_ASSERT(ret != NULL);
11082   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11083   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11084
11085   APR_TERM;
11086 #undef TEST_STRING
11087 #undef RESULT_STRING
11088 }
11089 void test_ixhtml10_input_tag_020()
11090 {
11091 #define  TEST_STRING "<input value=\"亀\">"
11092 #define  RESULT_STRING "<input value=\"亀\" />"
11093   char  *ret;
11094   char  *tmp;
11095   device_table spec;
11096   chxjconvrule_entry entry;
11097   cookie_t cookie;
11098   apr_size_t destlen;
11099   APR_INIT;
11100
11101   COOKIE_INIT(cookie);
11102
11103   SPEC_INIT(spec);
11104   destlen = sizeof(TEST_STRING)-1;
11105
11106   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11107   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11108   ret = chxj_rencoding(&r, ret, &destlen);
11109   fprintf(stderr, "actual:[%s]\n", ret);
11110   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11111   CU_ASSERT(ret != NULL);
11112   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11113   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11114
11115   APR_TERM;
11116 #undef TEST_STRING
11117 #undef RESULT_STRING
11118 }
11119 void test_ixhtml10_input_tag_021()
11120 {
11121 #define  TEST_STRING "<input value=\"ハンカク\">"
11122 #define  RESULT_STRING "<input value=\"ハンカク\" />"
11123   char  *ret;
11124   char  *tmp;
11125   device_table spec;
11126   chxjconvrule_entry entry;
11127   cookie_t cookie;
11128   apr_size_t destlen;
11129   APR_INIT;
11130
11131   COOKIE_INIT(cookie);
11132
11133   SPEC_INIT(spec);
11134   destlen = sizeof(TEST_STRING)-1;
11135
11136   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11137   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11138   ret = chxj_rencoding(&r, ret, &destlen);
11139   fprintf(stderr, "actual:[%s]\n", ret);
11140   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11141   CU_ASSERT(ret != NULL);
11142   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11143   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11144
11145   APR_TERM;
11146 #undef TEST_STRING
11147 #undef RESULT_STRING
11148 }
11149 void test_ixhtml10_input_tag_022()
11150 {
11151 #define  TEST_STRING "<input size>"
11152 #define  RESULT_STRING "<input />"
11153   char  *ret;
11154   char  *tmp;
11155   device_table spec;
11156   chxjconvrule_entry entry;
11157   cookie_t cookie;
11158   apr_size_t destlen;
11159   APR_INIT;
11160
11161   COOKIE_INIT(cookie);
11162
11163   SPEC_INIT(spec);
11164   destlen = sizeof(TEST_STRING)-1;
11165
11166   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11167   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11168   ret = chxj_rencoding(&r, ret, &destlen);
11169   fprintf(stderr, "actual:[%s]\n", ret);
11170   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11171   CU_ASSERT(ret != NULL);
11172   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11173   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11174
11175   APR_TERM;
11176 #undef TEST_STRING
11177 #undef RESULT_STRING
11178 }
11179 void test_ixhtml10_input_tag_023()
11180 {
11181 #define  TEST_STRING "<input size=\"\">"
11182 #define  RESULT_STRING "<input />"
11183   char  *ret;
11184   char  *tmp;
11185   device_table spec;
11186   chxjconvrule_entry entry;
11187   cookie_t cookie;
11188   apr_size_t destlen;
11189   APR_INIT;
11190
11191   COOKIE_INIT(cookie);
11192
11193   SPEC_INIT(spec);
11194   destlen = sizeof(TEST_STRING)-1;
11195
11196   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11197   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11198   ret = chxj_rencoding(&r, ret, &destlen);
11199   fprintf(stderr, "actual:[%s]\n", ret);
11200   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11201   CU_ASSERT(ret != NULL);
11202   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11203   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11204
11205   APR_TERM;
11206 #undef TEST_STRING
11207 #undef RESULT_STRING
11208 }
11209 void test_ixhtml10_input_tag_024()
11210 {
11211 #define  TEST_STRING "<input size=\"a\">"
11212 #define  RESULT_STRING "<input size=\"a\" />"
11213   char  *ret;
11214   char  *tmp;
11215   device_table spec;
11216   chxjconvrule_entry entry;
11217   cookie_t cookie;
11218   apr_size_t destlen;
11219   APR_INIT;
11220
11221   COOKIE_INIT(cookie);
11222
11223   SPEC_INIT(spec);
11224   destlen = sizeof(TEST_STRING)-1;
11225
11226   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11227   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11228   ret = chxj_rencoding(&r, ret, &destlen);
11229   fprintf(stderr, "actual:[%s]\n", ret);
11230   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11231   CU_ASSERT(ret != NULL);
11232   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11233   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11234
11235   APR_TERM;
11236 #undef TEST_STRING
11237 #undef RESULT_STRING
11238 }
11239 void test_ixhtml10_input_tag_025()
11240 {
11241 #define  TEST_STRING "<input size=\"1\">"
11242 #define  RESULT_STRING "<input size=\"1\" />"
11243   char  *ret;
11244   char  *tmp;
11245   device_table spec;
11246   chxjconvrule_entry entry;
11247   cookie_t cookie;
11248   apr_size_t destlen;
11249   APR_INIT;
11250
11251   COOKIE_INIT(cookie);
11252
11253   SPEC_INIT(spec);
11254   destlen = sizeof(TEST_STRING)-1;
11255
11256   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11257   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11258   ret = chxj_rencoding(&r, ret, &destlen);
11259   fprintf(stderr, "actual:[%s]\n", ret);
11260   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11261   CU_ASSERT(ret != NULL);
11262   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11263   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11264
11265   APR_TERM;
11266 #undef TEST_STRING
11267 #undef RESULT_STRING
11268 }
11269 void test_ixhtml10_input_tag_026()
11270 {
11271 #define  TEST_STRING "<input maxlength>"
11272 #define  RESULT_STRING "<input />"
11273   char  *ret;
11274   char  *tmp;
11275   device_table spec;
11276   chxjconvrule_entry entry;
11277   cookie_t cookie;
11278   apr_size_t destlen;
11279   APR_INIT;
11280
11281   COOKIE_INIT(cookie);
11282
11283   SPEC_INIT(spec);
11284   destlen = sizeof(TEST_STRING)-1;
11285
11286   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11287   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11288   ret = chxj_rencoding(&r, ret, &destlen);
11289   fprintf(stderr, "actual:[%s]\n", ret);
11290   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11291   CU_ASSERT(ret != NULL);
11292   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11293   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11294
11295   APR_TERM;
11296 #undef TEST_STRING
11297 #undef RESULT_STRING
11298 }
11299 void test_ixhtml10_input_tag_027()
11300 {
11301 #define  TEST_STRING "<input maxlength=\"\">"
11302 #define  RESULT_STRING "<input />"
11303   char  *ret;
11304   char  *tmp;
11305   device_table spec;
11306   chxjconvrule_entry entry;
11307   cookie_t cookie;
11308   apr_size_t destlen;
11309   APR_INIT;
11310
11311   COOKIE_INIT(cookie);
11312
11313   SPEC_INIT(spec);
11314   destlen = sizeof(TEST_STRING)-1;
11315
11316   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11317   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11318   ret = chxj_rencoding(&r, ret, &destlen);
11319   fprintf(stderr, "actual:[%s]\n", ret);
11320   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11321   CU_ASSERT(ret != NULL);
11322   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11323   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11324
11325   APR_TERM;
11326 #undef TEST_STRING
11327 #undef RESULT_STRING
11328 }
11329 void test_ixhtml10_input_tag_028()
11330 {
11331 #define  TEST_STRING "<input maxlength=\"a\">"
11332 #define  RESULT_STRING "<input />"
11333   char  *ret;
11334   char  *tmp;
11335   device_table spec;
11336   chxjconvrule_entry entry;
11337   cookie_t cookie;
11338   apr_size_t destlen;
11339   APR_INIT;
11340
11341   COOKIE_INIT(cookie);
11342
11343   SPEC_INIT(spec);
11344   destlen = sizeof(TEST_STRING)-1;
11345
11346   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11347   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11348   ret = chxj_rencoding(&r, ret, &destlen);
11349   fprintf(stderr, "actual:[%s]\n", ret);
11350   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11351   CU_ASSERT(ret != NULL);
11352   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11353   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11354
11355   APR_TERM;
11356 #undef TEST_STRING
11357 #undef RESULT_STRING
11358 }
11359 void test_ixhtml10_input_tag_029()
11360 {
11361 #define  TEST_STRING "<input maxlength=\"1\">"
11362 #define  RESULT_STRING "<input maxlength=\"1\" />"
11363   char  *ret;
11364   char  *tmp;
11365   device_table spec;
11366   chxjconvrule_entry entry;
11367   cookie_t cookie;
11368   apr_size_t destlen;
11369   APR_INIT;
11370
11371   COOKIE_INIT(cookie);
11372
11373   SPEC_INIT(spec);
11374   destlen = sizeof(TEST_STRING)-1;
11375
11376   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11377   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11378   ret = chxj_rencoding(&r, ret, &destlen);
11379   fprintf(stderr, "actual:[%s]\n", ret);
11380   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11381   CU_ASSERT(ret != NULL);
11382   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11383   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11384
11385   APR_TERM;
11386 #undef TEST_STRING
11387 #undef RESULT_STRING
11388 }
11389 void test_ixhtml10_input_tag_030()
11390 {
11391 #define  TEST_STRING "<input checked>"
11392 #define  RESULT_STRING "<input checked=\"checked\" />"
11393   char  *ret;
11394   char  *tmp;
11395   device_table spec;
11396   chxjconvrule_entry entry;
11397   cookie_t cookie;
11398   apr_size_t destlen;
11399   APR_INIT;
11400
11401   COOKIE_INIT(cookie);
11402
11403   SPEC_INIT(spec);
11404   destlen = sizeof(TEST_STRING)-1;
11405
11406   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11407   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11408   ret = chxj_rencoding(&r, ret, &destlen);
11409   fprintf(stderr, "actual:[%s]\n", ret);
11410   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11411   CU_ASSERT(ret != NULL);
11412   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11413   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11414
11415   APR_TERM;
11416 #undef TEST_STRING
11417 #undef RESULT_STRING
11418 }
11419 void test_ixhtml10_input_tag_031()
11420 {
11421 #define  TEST_STRING "<input accesskey>"
11422 #define  RESULT_STRING "<input />"
11423   char  *ret;
11424   char  *tmp;
11425   device_table spec;
11426   chxjconvrule_entry entry;
11427   cookie_t cookie;
11428   apr_size_t destlen;
11429   APR_INIT;
11430
11431   COOKIE_INIT(cookie);
11432
11433   SPEC_INIT(spec);
11434   destlen = sizeof(TEST_STRING)-1;
11435
11436   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11437   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11438   ret = chxj_rencoding(&r, ret, &destlen);
11439   fprintf(stderr, "actual:[%s]\n", ret);
11440   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11441   CU_ASSERT(ret != NULL);
11442   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11443   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11444
11445   APR_TERM;
11446 #undef TEST_STRING
11447 #undef RESULT_STRING
11448 }
11449 void test_ixhtml10_input_tag_032()
11450 {
11451 #define  TEST_STRING "<input accesskey=\"\">"
11452 #define  RESULT_STRING "<input />"
11453   char  *ret;
11454   char  *tmp;
11455   device_table spec;
11456   chxjconvrule_entry entry;
11457   cookie_t cookie;
11458   apr_size_t destlen;
11459   APR_INIT;
11460
11461   COOKIE_INIT(cookie);
11462
11463   SPEC_INIT(spec);
11464   destlen = sizeof(TEST_STRING)-1;
11465
11466   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11467   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11468   ret = chxj_rencoding(&r, ret, &destlen);
11469   fprintf(stderr, "actual:[%s]\n", ret);
11470   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11471   CU_ASSERT(ret != NULL);
11472   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11473   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11474
11475   APR_TERM;
11476 #undef TEST_STRING
11477 #undef RESULT_STRING
11478 }
11479 void test_ixhtml10_input_tag_033()
11480 {
11481 #define  TEST_STRING "<input accesskey=\"1\">"
11482 #define  RESULT_STRING "<input accesskey=\"1\" />"
11483   char  *ret;
11484   char  *tmp;
11485   device_table spec;
11486   chxjconvrule_entry entry;
11487   cookie_t cookie;
11488   apr_size_t destlen;
11489   APR_INIT;
11490
11491   COOKIE_INIT(cookie);
11492
11493   SPEC_INIT(spec);
11494   destlen = sizeof(TEST_STRING)-1;
11495
11496   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11497   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11498   ret = chxj_rencoding(&r, ret, &destlen);
11499   fprintf(stderr, "actual:[%s]\n", ret);
11500   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11501   CU_ASSERT(ret != NULL);
11502   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11503   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11504
11505   APR_TERM;
11506 #undef TEST_STRING
11507 #undef RESULT_STRING
11508 }
11509 void test_ixhtml10_input_tag_034()
11510 {
11511 #define  TEST_STRING "<input istyle>"
11512 #define  RESULT_STRING "<input />"
11513   char  *ret;
11514   char  *tmp;
11515   device_table spec;
11516   chxjconvrule_entry entry;
11517   cookie_t cookie;
11518   apr_size_t destlen;
11519   APR_INIT;
11520
11521   COOKIE_INIT(cookie);
11522
11523   SPEC_INIT(spec);
11524   destlen = sizeof(TEST_STRING)-1;
11525
11526   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11527   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11528   ret = chxj_rencoding(&r, ret, &destlen);
11529   fprintf(stderr, "actual:[%s]\n", ret);
11530   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11531   CU_ASSERT(ret != NULL);
11532   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11533   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11534
11535   APR_TERM;
11536 #undef TEST_STRING
11537 #undef RESULT_STRING
11538 }
11539 void test_ixhtml10_input_tag_035()
11540 {
11541 #define  TEST_STRING "<input istyle=\"\">"
11542 #define  RESULT_STRING "<input />"
11543   char  *ret;
11544   char  *tmp;
11545   device_table spec;
11546   chxjconvrule_entry entry;
11547   cookie_t cookie;
11548   apr_size_t destlen;
11549   APR_INIT;
11550
11551   COOKIE_INIT(cookie);
11552
11553   SPEC_INIT(spec);
11554   destlen = sizeof(TEST_STRING)-1;
11555
11556   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11557   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11558   ret = chxj_rencoding(&r, ret, &destlen);
11559   fprintf(stderr, "actual:[%s]\n", ret);
11560   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11561   CU_ASSERT(ret != NULL);
11562   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11563   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11564
11565   APR_TERM;
11566 #undef TEST_STRING
11567 #undef RESULT_STRING
11568 }
11569 void test_ixhtml10_input_tag_036()
11570 {
11571 #define  TEST_STRING "<input istyle=\"0\">"
11572 #define  RESULT_STRING "<input />"
11573   char  *ret;
11574   char  *tmp;
11575   device_table spec;
11576   chxjconvrule_entry entry;
11577   cookie_t cookie;
11578   apr_size_t destlen;
11579   APR_INIT;
11580
11581   COOKIE_INIT(cookie);
11582
11583   SPEC_INIT(spec);
11584   destlen = sizeof(TEST_STRING)-1;
11585
11586   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11587   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11588   ret = chxj_rencoding(&r, ret, &destlen);
11589   fprintf(stderr, "actual:[%s]\n", ret);
11590   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11591   CU_ASSERT(ret != NULL);
11592   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11593   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11594
11595   APR_TERM;
11596 #undef TEST_STRING
11597 #undef RESULT_STRING
11598 }
11599 void test_ixhtml10_input_tag_037()
11600 {
11601 #define  TEST_STRING "<input istyle=\"1\">"
11602 #define  RESULT_STRING "<input style=\"-wap-input-format:&quot;*&lt;ja:h&gt;&quot;;\" />"
11603   char  *ret;
11604   char  *tmp;
11605   device_table spec;
11606   chxjconvrule_entry entry;
11607   cookie_t cookie;
11608   apr_size_t destlen;
11609   APR_INIT;
11610
11611   COOKIE_INIT(cookie);
11612
11613   SPEC_INIT(spec);
11614   destlen = sizeof(TEST_STRING)-1;
11615
11616   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11617   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11618   ret = chxj_rencoding(&r, ret, &destlen);
11619   fprintf(stderr, "actual:[%s]\n", ret);
11620   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11621   CU_ASSERT(ret != NULL);
11622   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11623   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11624
11625   APR_TERM;
11626 #undef TEST_STRING
11627 #undef RESULT_STRING
11628 }
11629 void test_ixhtml10_input_tag_038()
11630 {
11631 #define  TEST_STRING "<input istyle=\"2\">"
11632 #define  RESULT_STRING "<input style=\"-wap-input-format:&quot;*&lt;ja:hk&gt;&quot;;\" />"
11633   char  *ret;
11634   char  *tmp;
11635   device_table spec;
11636   chxjconvrule_entry entry;
11637   cookie_t cookie;
11638   apr_size_t destlen;
11639   APR_INIT;
11640
11641   COOKIE_INIT(cookie);
11642
11643   SPEC_INIT(spec);
11644   destlen = sizeof(TEST_STRING)-1;
11645
11646   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11647   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11648   ret = chxj_rencoding(&r, ret, &destlen);
11649   fprintf(stderr, "actual:[%s]\n", ret);
11650   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11651   CU_ASSERT(ret != NULL);
11652   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11653   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11654
11655   APR_TERM;
11656 #undef TEST_STRING
11657 #undef RESULT_STRING
11658 }
11659 void test_ixhtml10_input_tag_039()
11660 {
11661 #define  TEST_STRING "<input istyle=\"3\">"
11662 #define  RESULT_STRING "<input style=\"-wap-input-format:&quot;*&lt;ja:en&gt;&quot;;\" />"
11663   char  *ret;
11664   char  *tmp;
11665   device_table spec;
11666   chxjconvrule_entry entry;
11667   cookie_t cookie;
11668   apr_size_t destlen;
11669   APR_INIT;
11670
11671   COOKIE_INIT(cookie);
11672
11673   SPEC_INIT(spec);
11674   destlen = sizeof(TEST_STRING)-1;
11675
11676   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11677   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11678   ret = chxj_rencoding(&r, ret, &destlen);
11679   fprintf(stderr, "actual:[%s]\n", ret);
11680   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11681   CU_ASSERT(ret != NULL);
11682   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11683   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11684
11685   APR_TERM;
11686 #undef TEST_STRING
11687 #undef RESULT_STRING
11688 }
11689 void test_ixhtml10_input_tag_040()
11690 {
11691 #define  TEST_STRING "<input istyle=\"4\">"
11692 #define  RESULT_STRING "<input style=\"-wap-input-format:&quot;*&lt;ja:n&gt;&quot;;\" />"
11693   char  *ret;
11694   char  *tmp;
11695   device_table spec;
11696   chxjconvrule_entry entry;
11697   cookie_t cookie;
11698   apr_size_t destlen;
11699   APR_INIT;
11700
11701   COOKIE_INIT(cookie);
11702
11703   SPEC_INIT(spec);
11704   destlen = sizeof(TEST_STRING)-1;
11705
11706   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11707   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11708   ret = chxj_rencoding(&r, ret, &destlen);
11709   fprintf(stderr, "actual:[%s]\n", ret);
11710   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11711   CU_ASSERT(ret != NULL);
11712   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11713   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11714
11715   APR_TERM;
11716 #undef TEST_STRING
11717 #undef RESULT_STRING
11718 }
11719 void test_ixhtml10_input_tag_041()
11720 {
11721 #define  TEST_STRING "<input istyle=\"5\">"
11722 #define  RESULT_STRING "<input />"
11723   char  *ret;
11724   char  *tmp;
11725   device_table spec;
11726   chxjconvrule_entry entry;
11727   cookie_t cookie;
11728   apr_size_t destlen;
11729   APR_INIT;
11730
11731   COOKIE_INIT(cookie);
11732
11733   SPEC_INIT(spec);
11734   destlen = sizeof(TEST_STRING)-1;
11735
11736   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11737   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11738   ret = chxj_rencoding(&r, ret, &destlen);
11739   fprintf(stderr, "actual:[%s]\n", ret);
11740   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11741   CU_ASSERT(ret != NULL);
11742   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11743   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11744
11745   APR_TERM;
11746 #undef TEST_STRING
11747 #undef RESULT_STRING
11748 }
11749 void test_ixhtml10_input_tag_042()
11750 {
11751 #define  TEST_STRING "<input istyle=\"a\">"
11752 #define  RESULT_STRING "<input />"
11753   char  *ret;
11754   char  *tmp;
11755   device_table spec;
11756   chxjconvrule_entry entry;
11757   cookie_t cookie;
11758   apr_size_t destlen;
11759   APR_INIT;
11760
11761   COOKIE_INIT(cookie);
11762
11763   SPEC_INIT(spec);
11764   destlen = sizeof(TEST_STRING)-1;
11765
11766   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11767   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11768   ret = chxj_rencoding(&r, ret, &destlen);
11769   fprintf(stderr, "actual:[%s]\n", ret);
11770   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11771   CU_ASSERT(ret != NULL);
11772   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11773   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11774
11775   APR_TERM;
11776 #undef TEST_STRING
11777 #undef RESULT_STRING
11778 }
11779 void test_ixhtml10_input_tag_043()
11780 {
11781 #define  TEST_STRING   "<input istyle=\"1\" maxlength=\"10\">"
11782 #define  RESULT_STRING "<input style=\"-wap-input-format:&quot;*&lt;ja:h&gt;&quot;;\" maxlength=\"10\" />"
11783   char  *ret;
11784   char  *tmp;
11785   device_table spec;
11786   chxjconvrule_entry entry;
11787   cookie_t cookie;
11788   apr_size_t destlen;
11789   APR_INIT;
11790
11791   COOKIE_INIT(cookie);
11792
11793   SPEC_INIT(spec);
11794   destlen = sizeof(TEST_STRING)-1;
11795
11796   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11797   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11798   ret = chxj_rencoding(&r, ret, &destlen);
11799   fprintf(stderr, "actual:[%s]\n", ret);
11800   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11801   CU_ASSERT(ret != NULL);
11802   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11803   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11804
11805   APR_TERM;
11806 #undef TEST_STRING
11807 #undef RESULT_STRING
11808 }
11809 void test_ixhtml10_input_tag_044()
11810 {
11811 #define  TEST_STRING   "<input istyle=\"2\" maxlength=\"10\">"
11812 #define  RESULT_STRING "<input style=\"-wap-input-format:&quot;*&lt;ja:hk&gt;&quot;;\" maxlength=\"10\" />"
11813   char  *ret;
11814   char  *tmp;
11815   device_table spec;
11816   chxjconvrule_entry entry;
11817   cookie_t cookie;
11818   apr_size_t destlen;
11819   APR_INIT;
11820
11821   COOKIE_INIT(cookie);
11822
11823   SPEC_INIT(spec);
11824   destlen = sizeof(TEST_STRING)-1;
11825
11826   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11827   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11828   ret = chxj_rencoding(&r, ret, &destlen);
11829   fprintf(stderr, "actual:[%s]\n", ret);
11830   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11831   CU_ASSERT(ret != NULL);
11832   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11833   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11834
11835   APR_TERM;
11836 #undef TEST_STRING
11837 #undef RESULT_STRING
11838 }
11839 void test_ixhtml10_input_tag_045()
11840 {
11841 #define  TEST_STRING   "<input istyle=\"3\" maxlength=\"10\">"
11842 #define  RESULT_STRING "<input style=\"-wap-input-format:&quot;*&lt;ja:en&gt;&quot;;\" maxlength=\"10\" />"
11843   char  *ret;
11844   char  *tmp;
11845   device_table spec;
11846   chxjconvrule_entry entry;
11847   cookie_t cookie;
11848   apr_size_t destlen;
11849   APR_INIT;
11850
11851   COOKIE_INIT(cookie);
11852
11853   SPEC_INIT(spec);
11854   destlen = sizeof(TEST_STRING)-1;
11855
11856   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11857   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11858   ret = chxj_rencoding(&r, ret, &destlen);
11859   fprintf(stderr, "actual:[%s]\n", ret);
11860   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11861   CU_ASSERT(ret != NULL);
11862   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11863   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11864
11865   APR_TERM;
11866 #undef TEST_STRING
11867 #undef RESULT_STRING
11868 }
11869 void test_ixhtml10_input_tag_046()
11870 {
11871 #define  TEST_STRING "<input istyle=\"4\" maxlength=\"10\">"
11872 #define  RESULT_STRING "<input style=\"-wap-input-format:&quot;*&lt;ja:n&gt;&quot;;\" maxlength=\"10\" />"
11873   char  *ret;
11874   char  *tmp;
11875   device_table spec;
11876   chxjconvrule_entry entry;
11877   cookie_t cookie;
11878   apr_size_t destlen;
11879   APR_INIT;
11880
11881   COOKIE_INIT(cookie);
11882
11883   SPEC_INIT(spec);
11884   destlen = sizeof(TEST_STRING)-1;
11885
11886   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11887   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11888   ret = chxj_rencoding(&r, ret, &destlen);
11889   fprintf(stderr, "actual:[%s]\n", ret);
11890   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11891   CU_ASSERT(ret != NULL);
11892   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11893   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11894
11895   APR_TERM;
11896 #undef TEST_STRING
11897 #undef RESULT_STRING
11898 }
11899 void test_ixhtml10_input_tag_047()
11900 {
11901 #define  TEST_STRING "<input istyle=\"a\" maxlength=\"10\">"
11902 #define  RESULT_STRING "<input maxlength=\"10\" />"
11903   char  *ret;
11904   char  *tmp;
11905   device_table spec;
11906   chxjconvrule_entry entry;
11907   cookie_t cookie;
11908   apr_size_t destlen;
11909   APR_INIT;
11910
11911   COOKIE_INIT(cookie);
11912
11913   SPEC_INIT(spec);
11914   destlen = sizeof(TEST_STRING)-1;
11915
11916   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11917   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11918   ret = chxj_rencoding(&r, ret, &destlen);
11919   fprintf(stderr, "actual:[%s]\n", ret);
11920   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11921   CU_ASSERT(ret != NULL);
11922   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11923   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11924
11925   APR_TERM;
11926 #undef TEST_STRING
11927 #undef RESULT_STRING
11928 }
11929 /*============================================================================*/
11930 /* <MENU>                                                                     */
11931 /*============================================================================*/
11932 void test_ixhtml10_menu_tag_001()
11933 {
11934 #define  TEST_STRING "<menu></menu>"
11935 #define  RESULT_STRING "<ul></ul>"
11936   char  *ret;
11937   char  *tmp;
11938   device_table spec;
11939   chxjconvrule_entry entry;
11940   cookie_t cookie;
11941   apr_size_t destlen;
11942   APR_INIT;
11943
11944   COOKIE_INIT(cookie);
11945
11946   SPEC_INIT(spec);
11947   destlen = sizeof(TEST_STRING)-1;
11948
11949   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11950   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11951   ret = chxj_rencoding(&r, ret, &destlen);
11952   fprintf(stderr, "actual:[%s]\n", ret);
11953   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11954   CU_ASSERT(ret != NULL);
11955   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11956   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11957
11958   APR_TERM;
11959 #undef TEST_STRING
11960 #undef RESULT_STRING
11961 }
11962 void test_ixhtml10_menu_tag_002()
11963 {
11964 #define  TEST_STRING "<menu><li></li><li></li></menu>"
11965 #define  RESULT_STRING "<ul><li></li><li></li></ul>"
11966   char  *ret;
11967   char  *tmp;
11968   device_table spec;
11969   chxjconvrule_entry entry;
11970   cookie_t cookie;
11971   apr_size_t destlen;
11972   APR_INIT;
11973
11974   COOKIE_INIT(cookie);
11975
11976   SPEC_INIT(spec);
11977   destlen = sizeof(TEST_STRING)-1;
11978
11979   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
11980   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
11981   ret = chxj_rencoding(&r, ret, &destlen);
11982   fprintf(stderr, "actual:[%s]\n", ret);
11983   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
11984   CU_ASSERT(ret != NULL);
11985   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
11986   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
11987
11988   APR_TERM;
11989 #undef TEST_STRING
11990 #undef RESULT_STRING
11991 }
11992 void test_ixhtml10_menu_tag_003()
11993 {
11994 #define  TEST_STRING "<menu><li>abc</li><li>def</li></menu>"
11995 #define  RESULT_STRING "<ul><li>abc</li><li>def</li></ul>"
11996   char  *ret;
11997   char  *tmp;
11998   device_table spec;
11999   chxjconvrule_entry entry;
12000   cookie_t cookie;
12001   apr_size_t destlen;
12002   APR_INIT;
12003
12004   COOKIE_INIT(cookie);
12005
12006   SPEC_INIT(spec);
12007   destlen = sizeof(TEST_STRING)-1;
12008
12009   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12010   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12011   ret = chxj_rencoding(&r, ret, &destlen);
12012   fprintf(stderr, "actual:[%s]\n", ret);
12013   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12014   CU_ASSERT(ret != NULL);
12015   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12016   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12017
12018   APR_TERM;
12019 #undef TEST_STRING
12020 #undef RESULT_STRING
12021 }
12022 void test_ixhtml10_menu_tag_004()
12023 {
12024 #define  TEST_STRING "<menu><li>あああ</li><li>いいい</li></menu>"
12025 #define  RESULT_STRING "<ul><li>あああ</li><li>いいい</li></ul>"
12026   char  *ret;
12027   char  *tmp;
12028   device_table spec;
12029   chxjconvrule_entry entry;
12030   cookie_t cookie;
12031   apr_size_t destlen;
12032   APR_INIT;
12033
12034   COOKIE_INIT(cookie);
12035
12036   SPEC_INIT(spec);
12037   destlen = sizeof(TEST_STRING)-1;
12038
12039   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12040   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12041   ret = chxj_rencoding(&r, ret, &destlen);
12042   fprintf(stderr, "actual:[%s]\n", ret);
12043   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12044   CU_ASSERT(ret != NULL);
12045   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12046   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12047
12048   APR_TERM;
12049 #undef TEST_STRING
12050 #undef RESULT_STRING
12051 }
12052 void test_ixhtml10_menu_tag_005()
12053 {
12054 #define  TEST_STRING "<menu><li>ハンカク</li><li>ハンカク</li></menu>"
12055 #define  RESULT_STRING "<ul><li>ハンカク</li><li>ハンカク</li></ul>"
12056   char  *ret;
12057   char  *tmp;
12058   device_table spec;
12059   chxjconvrule_entry entry;
12060   cookie_t cookie;
12061   apr_size_t destlen;
12062   APR_INIT;
12063
12064   COOKIE_INIT(cookie);
12065
12066   SPEC_INIT(spec);
12067   destlen = sizeof(TEST_STRING)-1;
12068
12069   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12070   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12071   ret = chxj_rencoding(&r, ret, &destlen);
12072   fprintf(stderr, "actual:[%s]\n", ret);
12073   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12074   CU_ASSERT(ret != NULL);
12075   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12076   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12077
12078   APR_TERM;
12079 #undef TEST_STRING
12080 #undef RESULT_STRING
12081 }
12082 void test_ixhtml10_menu_tag_006()
12083 {
12084 #define  TEST_STRING "<menu type=\"disc\"><li>ハンカク</li><li>ハンカク</li></menu>"
12085 #define  RESULT_STRING "<ul style=\"list-style-type:disc;\"><li>ハンカク</li><li>ハンカク</li></ul>"
12086   char  *ret;
12087   char  *tmp;
12088   device_table spec;
12089   chxjconvrule_entry entry;
12090   cookie_t cookie;
12091   apr_size_t destlen;
12092   APR_INIT;
12093
12094   COOKIE_INIT(cookie);
12095
12096   SPEC_INIT(spec);
12097   destlen = sizeof(TEST_STRING)-1;
12098
12099   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12100   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12101   ret = chxj_rencoding(&r, ret, &destlen);
12102   fprintf(stderr, "actual:[%s]\n", ret);
12103   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12104   CU_ASSERT(ret != NULL);
12105   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12106   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12107
12108   APR_TERM;
12109 #undef TEST_STRING
12110 #undef RESULT_STRING
12111 }
12112 void test_ixhtml10_menu_tag_007()
12113 {
12114 #define  TEST_STRING "<menu type=\"circle\"><li>ハンカク</li><li>ハンカク</li></menu>"
12115 #define  RESULT_STRING "<ul style=\"list-style-type:circle;\"><li>ハンカク</li><li>ハンカク</li></ul>"
12116   char  *ret;
12117   char  *tmp;
12118   device_table spec;
12119   chxjconvrule_entry entry;
12120   cookie_t cookie;
12121   apr_size_t destlen;
12122   APR_INIT;
12123
12124   COOKIE_INIT(cookie);
12125
12126   SPEC_INIT(spec);
12127   destlen = sizeof(TEST_STRING)-1;
12128
12129   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12130   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12131   ret = chxj_rencoding(&r, ret, &destlen);
12132   fprintf(stderr, "actual:[%s]\n", ret);
12133   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12134   CU_ASSERT(ret != NULL);
12135   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12136   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12137
12138   APR_TERM;
12139 #undef TEST_STRING
12140 #undef RESULT_STRING
12141 }
12142 void test_ixhtml10_menu_tag_008()
12143 {
12144 #define  TEST_STRING "<menu type=\"square\"><li>ハンカク</li><li>ハンカク</li></menu>"
12145 #define  RESULT_STRING "<ul style=\"list-style-type:square;\"><li>ハンカク</li><li>ハンカク</li></ul>"
12146   char  *ret;
12147   char  *tmp;
12148   device_table spec;
12149   chxjconvrule_entry entry;
12150   cookie_t cookie;
12151   apr_size_t destlen;
12152   APR_INIT;
12153
12154   COOKIE_INIT(cookie);
12155
12156   SPEC_INIT(spec);
12157   destlen = sizeof(TEST_STRING)-1;
12158
12159   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12160   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12161   ret = chxj_rencoding(&r, ret, &destlen);
12162   fprintf(stderr, "actual:[%s]\n", ret);
12163   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12164   CU_ASSERT(ret != NULL);
12165   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12166   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12167
12168   APR_TERM;
12169 #undef TEST_STRING
12170 #undef RESULT_STRING
12171 }
12172 void test_ixhtml10_menu_tag_009()
12173 {
12174 #define  TEST_STRING "<menu type=\"\"><li>ハンカク</li><li>ハンカク</li></menu>"
12175 #define  RESULT_STRING "<ul><li>ハンカク</li><li>ハンカク</li></ul>"
12176   char  *ret;
12177   char  *tmp;
12178   device_table spec;
12179   chxjconvrule_entry entry;
12180   cookie_t cookie;
12181   apr_size_t destlen;
12182   APR_INIT;
12183
12184   COOKIE_INIT(cookie);
12185
12186   SPEC_INIT(spec);
12187   destlen = sizeof(TEST_STRING)-1;
12188
12189   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12190   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12191   ret = chxj_rencoding(&r, ret, &destlen);
12192   fprintf(stderr, "actual:[%s]\n", ret);
12193   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12194   CU_ASSERT(ret != NULL);
12195   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12196   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12197
12198   APR_TERM;
12199 #undef TEST_STRING
12200 #undef RESULT_STRING
12201 }
12202 void test_ixhtml10_menu_tag_010()
12203 {
12204 #define  TEST_STRING "<menu type><li>ハンカク</li><li>ハンカク</li></menu>"
12205 #define  RESULT_STRING "<ul><li>ハンカク</li><li>ハンカク</li></ul>"
12206   char  *ret;
12207   char  *tmp;
12208   device_table spec;
12209   chxjconvrule_entry entry;
12210   cookie_t cookie;
12211   apr_size_t destlen;
12212   APR_INIT;
12213
12214   COOKIE_INIT(cookie);
12215
12216   SPEC_INIT(spec);
12217   destlen = sizeof(TEST_STRING)-1;
12218
12219   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12220   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12221   ret = chxj_rencoding(&r, ret, &destlen);
12222   fprintf(stderr, "actual:[%s]\n", ret);
12223   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12224   CU_ASSERT(ret != NULL);
12225   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12226   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12227
12228   APR_TERM;
12229 #undef TEST_STRING
12230 #undef RESULT_STRING
12231 }
12232 /*============================================================================*/
12233 /* <OPTION>                                                                   */
12234 /*============================================================================*/
12235 void test_ixhtml10_option_tag_001()
12236 {
12237 #define  TEST_STRING "<option></option>"
12238 #define  RESULT_STRING "<option></option>"
12239   char  *ret;
12240   char  *tmp;
12241   device_table spec;
12242   chxjconvrule_entry entry;
12243   cookie_t cookie;
12244   apr_size_t destlen;
12245   APR_INIT;
12246
12247   COOKIE_INIT(cookie);
12248
12249   SPEC_INIT(spec);
12250   destlen = sizeof(TEST_STRING)-1;
12251
12252   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12253   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12254   ret = chxj_rencoding(&r, ret, &destlen);
12255   fprintf(stderr, "actual:[%s]\n", ret);
12256   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12257   CU_ASSERT(ret != NULL);
12258   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12259   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12260
12261   APR_TERM;
12262 #undef TEST_STRING
12263 #undef RESULT_STRING
12264 }
12265 void test_ixhtml10_option_tag_002()
12266 {
12267 #define  TEST_STRING "<option value></option>"
12268 #define  RESULT_STRING "<option></option>"
12269   char  *ret;
12270   char  *tmp;
12271   device_table spec;
12272   chxjconvrule_entry entry;
12273   cookie_t cookie;
12274   apr_size_t destlen;
12275   APR_INIT;
12276
12277   COOKIE_INIT(cookie);
12278
12279   SPEC_INIT(spec);
12280   destlen = sizeof(TEST_STRING)-1;
12281
12282   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12283   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12284   ret = chxj_rencoding(&r, ret, &destlen);
12285   CU_ASSERT(ret != NULL);
12286   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12287   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12288
12289   APR_TERM;
12290 #undef TEST_STRING
12291 #undef RESULT_STRING
12292 }
12293 void test_ixhtml10_option_tag_003()
12294 {
12295 #define  TEST_STRING "<option value=\"\"></option>"
12296 #define  RESULT_STRING "<option></option>"
12297   char  *ret;
12298   char  *tmp;
12299   device_table spec;
12300   chxjconvrule_entry entry;
12301   cookie_t cookie;
12302   apr_size_t destlen;
12303   APR_INIT;
12304
12305   COOKIE_INIT(cookie);
12306
12307   SPEC_INIT(spec);
12308   destlen = sizeof(TEST_STRING)-1;
12309
12310   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12311   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12312   ret = chxj_rencoding(&r, ret, &destlen);
12313   CU_ASSERT(ret != NULL);
12314   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12315   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12316
12317   APR_TERM;
12318 #undef TEST_STRING
12319 #undef RESULT_STRING
12320 }
12321 void test_ixhtml10_option_tag_004()
12322 {
12323 #define  TEST_STRING "<option value=\"a\"></option>"
12324 #define  RESULT_STRING "<option value=\"a\"></option>"
12325   char  *ret;
12326   char  *tmp;
12327   device_table spec;
12328   chxjconvrule_entry entry;
12329   cookie_t cookie;
12330   apr_size_t destlen;
12331   APR_INIT;
12332
12333   COOKIE_INIT(cookie);
12334
12335   SPEC_INIT(spec);
12336   destlen = sizeof(TEST_STRING)-1;
12337
12338   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12339   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12340   ret = chxj_rencoding(&r, ret, &destlen);
12341   CU_ASSERT(ret != NULL);
12342   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12343   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12344
12345   APR_TERM;
12346 #undef TEST_STRING
12347 #undef RESULT_STRING
12348 }
12349 void test_ixhtml10_option_tag_005()
12350 {
12351 #define  TEST_STRING "<option value=\"亀\"></option>"
12352 #define  RESULT_STRING "<option value=\"亀\"></option>"
12353   char  *ret;
12354   char  *tmp;
12355   device_table spec;
12356   chxjconvrule_entry entry;
12357   cookie_t cookie;
12358   apr_size_t destlen;
12359   APR_INIT;
12360
12361   COOKIE_INIT(cookie);
12362
12363   SPEC_INIT(spec);
12364   destlen = sizeof(TEST_STRING)-1;
12365
12366   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12367   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12368   ret = chxj_rencoding(&r, ret, &destlen);
12369   CU_ASSERT(ret != NULL);
12370   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12371   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12372
12373   APR_TERM;
12374 #undef TEST_STRING
12375 #undef RESULT_STRING
12376 }
12377 void test_ixhtml10_option_tag_006()
12378 {
12379 #define  TEST_STRING "<option value=\"ハンカク\"></option>"
12380 #define  RESULT_STRING "<option value=\"ハンカク\"></option>"
12381   char  *ret;
12382   char  *tmp;
12383   device_table spec;
12384   chxjconvrule_entry entry;
12385   cookie_t cookie;
12386   apr_size_t destlen;
12387   APR_INIT;
12388
12389   COOKIE_INIT(cookie);
12390
12391   SPEC_INIT(spec);
12392   destlen = sizeof(TEST_STRING)-1;
12393
12394   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12395   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12396   ret = chxj_rencoding(&r, ret, &destlen);
12397   CU_ASSERT(ret != NULL);
12398   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12399   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12400
12401   APR_TERM;
12402 #undef TEST_STRING
12403 #undef RESULT_STRING
12404 }
12405 void test_ixhtml10_option_tag_007()
12406 {
12407 #define  TEST_STRING "<option selected></option>"
12408 #define  RESULT_STRING "<option selected=\"selected\"></option>"
12409   char  *ret;
12410   char  *tmp;
12411   device_table spec;
12412   chxjconvrule_entry entry;
12413   cookie_t cookie;
12414   apr_size_t destlen;
12415   APR_INIT;
12416
12417   COOKIE_INIT(cookie);
12418
12419   SPEC_INIT(spec);
12420   destlen = sizeof(TEST_STRING)-1;
12421
12422   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12423   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12424   ret = chxj_rencoding(&r, ret, &destlen);
12425   CU_ASSERT(ret != NULL);
12426   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12427   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12428
12429   APR_TERM;
12430 #undef TEST_STRING
12431 #undef RESULT_STRING
12432 }
12433 /*============================================================================*/
12434 /* <PLAINTEXT>                                                                */
12435 /*============================================================================*/
12436 void test_ixhtml10_plaintext_tag_001()
12437 {
12438 #define  TEST_STRING "<plaintext>あああ</plaintext>"
12439 #define  RESULT_STRING "<plaintext>あああ"
12440   char  *ret;
12441   char  *tmp;
12442   device_table spec;
12443   chxjconvrule_entry entry;
12444   cookie_t cookie;
12445   apr_size_t destlen;
12446   APR_INIT;
12447
12448   COOKIE_INIT(cookie);
12449
12450   SPEC_INIT(spec);
12451   destlen = sizeof(TEST_STRING)-1;
12452
12453   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12454   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12455   ret = chxj_rencoding(&r, ret, &destlen);
12456   fprintf(stderr, "actual:[%s]\n", ret);
12457   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12458   CU_ASSERT(ret != NULL);
12459   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12460   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12461
12462   APR_TERM;
12463 #undef TEST_STRING
12464 #undef RESULT_STRING
12465 }
12466 void test_ixhtml10_plaintext_tag_002()
12467 {
12468 #define  TEST_STRING "<plaintext><h1>あああ</h1><h1>いいい</h1></plaintext>"
12469 #define  RESULT_STRING "<plaintext><h1>あああ</h1><h1>いいい</h1>"
12470   char  *ret;
12471   char  *tmp;
12472   device_table spec;
12473   chxjconvrule_entry entry;
12474   cookie_t cookie;
12475   apr_size_t destlen;
12476   APR_INIT;
12477
12478   COOKIE_INIT(cookie);
12479
12480   SPEC_INIT(spec);
12481   destlen = sizeof(TEST_STRING)-1;
12482
12483   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12484   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12485   ret = chxj_rencoding(&r, ret, &destlen);
12486   fprintf(stderr, "actual:[%s]\n", ret);
12487   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12488   CU_ASSERT(ret != NULL);
12489   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12490   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12491
12492   APR_TERM;
12493 #undef TEST_STRING
12494 #undef RESULT_STRING
12495 }
12496 void test_ixhtml10_plaintext_tag_003()
12497 {
12498 #define  TEST_STRING "<plaintext><h1>あああ<h1>いいい</h1></plaintext>"
12499 #define  RESULT_STRING "<plaintext><h1>あああ<h1>いいい</h1>"
12500   char  *ret;
12501   char  *tmp;
12502   device_table spec;
12503   chxjconvrule_entry entry;
12504   cookie_t cookie;
12505   apr_size_t destlen;
12506   APR_INIT;
12507
12508   COOKIE_INIT(cookie);
12509
12510   SPEC_INIT(spec);
12511   destlen = sizeof(TEST_STRING)-1;
12512
12513   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12514   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12515   ret = chxj_rencoding(&r, ret, &destlen);
12516   fprintf(stderr, "actual:[%s]\n", ret);
12517   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12518   CU_ASSERT(ret != NULL);
12519   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12520   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12521
12522   APR_TERM;
12523 #undef TEST_STRING
12524 #undef RESULT_STRING
12525 }
12526 void test_ixhtml10_plaintext_tag_004()
12527 {
12528 #define  TEST_STRING "<plaintext><h1>ハンカク<h1>ハンカク</plaintext>"
12529 #define  RESULT_STRING "<plaintext><h1>ハンカク<h1>ハンカク"
12530   char  *ret;
12531   char  *tmp;
12532   device_table spec;
12533   chxjconvrule_entry entry;
12534   cookie_t cookie;
12535   apr_size_t destlen;
12536   APR_INIT;
12537
12538   COOKIE_INIT(cookie);
12539
12540   SPEC_INIT(spec);
12541   destlen = sizeof(TEST_STRING)-1;
12542
12543   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12544   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12545   ret = chxj_rencoding(&r, ret, &destlen);
12546   fprintf(stderr, "actual:[%s]\n", ret);
12547   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12548   CU_ASSERT(ret != NULL);
12549   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12550   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12551
12552   APR_TERM;
12553 #undef TEST_STRING
12554 #undef RESULT_STRING
12555 }
12556 /*============================================================================*/
12557 /* <SELECT>                                                                   */
12558 /*============================================================================*/
12559 void test_ixhtml10_select_tag_001()
12560 {
12561 #define  TEST_STRING "<select></select>"
12562 #define  RESULT_STRING "<select></select>"
12563   char  *ret;
12564   char  *tmp;
12565   device_table spec;
12566   chxjconvrule_entry entry;
12567   cookie_t cookie;
12568   apr_size_t destlen;
12569   APR_INIT;
12570
12571   COOKIE_INIT(cookie);
12572
12573   SPEC_INIT(spec);
12574   destlen = sizeof(TEST_STRING)-1;
12575
12576   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12577   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12578   ret = chxj_rencoding(&r, ret, &destlen);
12579   fprintf(stderr, "actual:[%s]\n", ret);
12580   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12581   CU_ASSERT(ret != NULL);
12582   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12583   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12584
12585   APR_TERM;
12586 #undef TEST_STRING
12587 #undef RESULT_STRING
12588 }
12589 void test_ixhtml10_select_tag_002()
12590 {
12591 #define  TEST_STRING "<select>あああ</select>"
12592 #define  RESULT_STRING "<select>あああ</select>"
12593   char  *ret;
12594   char  *tmp;
12595   device_table spec;
12596   chxjconvrule_entry entry;
12597   cookie_t cookie;
12598   apr_size_t destlen;
12599   APR_INIT;
12600
12601   COOKIE_INIT(cookie);
12602
12603   SPEC_INIT(spec);
12604   destlen = sizeof(TEST_STRING)-1;
12605
12606   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12607   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12608   ret = chxj_rencoding(&r, ret, &destlen);
12609   fprintf(stderr, "actual:[%s]\n", ret);
12610   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12611   CU_ASSERT(ret != NULL);
12612   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12613   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12614
12615   APR_TERM;
12616 #undef TEST_STRING
12617 #undef RESULT_STRING
12618 }
12619 void test_ixhtml10_select_tag_003()
12620 {
12621 #define  TEST_STRING "<select name></select>"
12622 #define  RESULT_STRING "<select></select>"
12623   char  *ret;
12624   char  *tmp;
12625   device_table spec;
12626   chxjconvrule_entry entry;
12627   cookie_t cookie;
12628   apr_size_t destlen;
12629   APR_INIT;
12630
12631   COOKIE_INIT(cookie);
12632
12633   SPEC_INIT(spec);
12634   destlen = sizeof(TEST_STRING)-1;
12635
12636   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12637   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12638   ret = chxj_rencoding(&r, ret, &destlen);
12639   fprintf(stderr, "actual:[%s]\n", ret);
12640   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12641   CU_ASSERT(ret != NULL);
12642   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12643   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12644
12645   APR_TERM;
12646 #undef TEST_STRING
12647 #undef RESULT_STRING
12648 }
12649 void test_ixhtml10_select_tag_004()
12650 {
12651 #define  TEST_STRING "<select name=\"\"></select>"
12652 #define  RESULT_STRING "<select></select>"
12653   char  *ret;
12654   char  *tmp;
12655   device_table spec;
12656   chxjconvrule_entry entry;
12657   cookie_t cookie;
12658   apr_size_t destlen;
12659   APR_INIT;
12660
12661   COOKIE_INIT(cookie);
12662
12663   SPEC_INIT(spec);
12664   destlen = sizeof(TEST_STRING)-1;
12665
12666   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12667   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12668   ret = chxj_rencoding(&r, ret, &destlen);
12669   fprintf(stderr, "actual:[%s]\n", ret);
12670   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12671   CU_ASSERT(ret != NULL);
12672   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12673   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12674
12675   APR_TERM;
12676 #undef TEST_STRING
12677 #undef RESULT_STRING
12678 }
12679 void test_ixhtml10_select_tag_005()
12680 {
12681 #define  TEST_STRING "<select name=\"abc\"></select>"
12682 #define  RESULT_STRING "<select name=\"abc\"></select>"
12683   char  *ret;
12684   char  *tmp;
12685   device_table spec;
12686   chxjconvrule_entry entry;
12687   cookie_t cookie;
12688   apr_size_t destlen;
12689   APR_INIT;
12690
12691   COOKIE_INIT(cookie);
12692
12693   SPEC_INIT(spec);
12694   destlen = sizeof(TEST_STRING)-1;
12695
12696   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12697   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12698   ret = chxj_rencoding(&r, ret, &destlen);
12699   fprintf(stderr, "actual:[%s]\n", ret);
12700   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12701   CU_ASSERT(ret != NULL);
12702   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12703   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12704
12705   APR_TERM;
12706 #undef TEST_STRING
12707 #undef RESULT_STRING
12708 }
12709 void test_ixhtml10_select_tag_006()
12710 {
12711 #define  TEST_STRING "<select name=\"あああ\"></select>"
12712 #define  RESULT_STRING "<select name=\"あああ\"></select>"
12713   char  *ret;
12714   char  *tmp;
12715   device_table spec;
12716   chxjconvrule_entry entry;
12717   cookie_t cookie;
12718   apr_size_t destlen;
12719   APR_INIT;
12720
12721   COOKIE_INIT(cookie);
12722
12723   SPEC_INIT(spec);
12724   destlen = sizeof(TEST_STRING)-1;
12725
12726   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12727   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12728   ret = chxj_rencoding(&r, ret, &destlen);
12729   fprintf(stderr, "actual:[%s]\n", ret);
12730   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12731   CU_ASSERT(ret != NULL);
12732   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12733   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12734
12735   APR_TERM;
12736 #undef TEST_STRING
12737 #undef RESULT_STRING
12738 }
12739 void test_ixhtml10_select_tag_007()
12740 {
12741 #define  TEST_STRING "<select name=\"ハンカク\"></select>"
12742 #define  RESULT_STRING "<select name=\"ハンカク\"></select>"
12743   char  *ret;
12744   char  *tmp;
12745   device_table spec;
12746   chxjconvrule_entry entry;
12747   cookie_t cookie;
12748   apr_size_t destlen;
12749   APR_INIT;
12750
12751   COOKIE_INIT(cookie);
12752
12753   SPEC_INIT(spec);
12754   destlen = sizeof(TEST_STRING)-1;
12755
12756   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12757   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12758   ret = chxj_rencoding(&r, ret, &destlen);
12759   fprintf(stderr, "actual:[%s]\n", ret);
12760   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12761   CU_ASSERT(ret != NULL);
12762   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12763   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12764
12765   APR_TERM;
12766 #undef TEST_STRING
12767 #undef RESULT_STRING
12768 }
12769 void test_ixhtml10_select_tag_008()
12770 {
12771 #define  TEST_STRING "<select size></select>"
12772 #define  RESULT_STRING "<select></select>"
12773   char  *ret;
12774   char  *tmp;
12775   device_table spec;
12776   chxjconvrule_entry entry;
12777   cookie_t cookie;
12778   apr_size_t destlen;
12779   APR_INIT;
12780
12781   COOKIE_INIT(cookie);
12782
12783   SPEC_INIT(spec);
12784   destlen = sizeof(TEST_STRING)-1;
12785
12786   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12787   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12788   ret = chxj_rencoding(&r, ret, &destlen);
12789   fprintf(stderr, "actual:[%s]\n", ret);
12790   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12791   CU_ASSERT(ret != NULL);
12792   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12793   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12794
12795   APR_TERM;
12796 #undef TEST_STRING
12797 #undef RESULT_STRING
12798 }
12799 void test_ixhtml10_select_tag_009()
12800 {
12801 #define  TEST_STRING "<select size=\"\"></select>"
12802 #define  RESULT_STRING "<select></select>"
12803   char  *ret;
12804   char  *tmp;
12805   device_table spec;
12806   chxjconvrule_entry entry;
12807   cookie_t cookie;
12808   apr_size_t destlen;
12809   APR_INIT;
12810
12811   COOKIE_INIT(cookie);
12812
12813   SPEC_INIT(spec);
12814   destlen = sizeof(TEST_STRING)-1;
12815
12816   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12817   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12818   ret = chxj_rencoding(&r, ret, &destlen);
12819   fprintf(stderr, "actual:[%s]\n", ret);
12820   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12821   CU_ASSERT(ret != NULL);
12822   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12823   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12824
12825   APR_TERM;
12826 #undef TEST_STRING
12827 #undef RESULT_STRING
12828 }
12829 void test_ixhtml10_select_tag_010()
12830 {
12831 #define  TEST_STRING "<select size=\"abc\"></select>"
12832 #define  RESULT_STRING "<select size=\"abc\"></select>"
12833   char  *ret;
12834   char  *tmp;
12835   device_table spec;
12836   chxjconvrule_entry entry;
12837   cookie_t cookie;
12838   apr_size_t destlen;
12839   APR_INIT;
12840
12841   COOKIE_INIT(cookie);
12842
12843   SPEC_INIT(spec);
12844   destlen = sizeof(TEST_STRING)-1;
12845
12846   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12847   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12848   ret = chxj_rencoding(&r, ret, &destlen);
12849   fprintf(stderr, "actual:[%s]\n", ret);
12850   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12851   CU_ASSERT(ret != NULL);
12852   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12853   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12854
12855   APR_TERM;
12856 #undef TEST_STRING
12857 #undef RESULT_STRING
12858 }
12859 void test_ixhtml10_select_tag_011()
12860 {
12861 #define  TEST_STRING "<select size=\"11\"></select>"
12862 #define  RESULT_STRING "<select size=\"11\"></select>"
12863   char  *ret;
12864   char  *tmp;
12865   device_table spec;
12866   chxjconvrule_entry entry;
12867   cookie_t cookie;
12868   apr_size_t destlen;
12869   APR_INIT;
12870
12871   COOKIE_INIT(cookie);
12872
12873   SPEC_INIT(spec);
12874   destlen = sizeof(TEST_STRING)-1;
12875
12876   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12877   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12878   ret = chxj_rencoding(&r, ret, &destlen);
12879   fprintf(stderr, "actual:[%s]\n", ret);
12880   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12881   CU_ASSERT(ret != NULL);
12882   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12883   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12884
12885   APR_TERM;
12886 #undef TEST_STRING
12887 #undef RESULT_STRING
12888 }
12889 void test_ixhtml10_select_tag_012()
12890 {
12891 #define  TEST_STRING "<select multiple></select>"
12892 #define  RESULT_STRING "<select multiple></select>"
12893   char  *ret;
12894   char  *tmp;
12895   device_table spec;
12896   chxjconvrule_entry entry;
12897   cookie_t cookie;
12898   apr_size_t destlen;
12899   APR_INIT;
12900
12901   COOKIE_INIT(cookie);
12902
12903   SPEC_INIT(spec);
12904   destlen = sizeof(TEST_STRING)-1;
12905
12906   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12907   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12908   ret = chxj_rencoding(&r, ret, &destlen);
12909   fprintf(stderr, "actual:[%s]\n", ret);
12910   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12911   CU_ASSERT(ret != NULL);
12912   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12913   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12914
12915   APR_TERM;
12916 #undef TEST_STRING
12917 #undef RESULT_STRING
12918 }
12919 void test_ixhtml10_select_tag_013()
12920 {
12921 #define  TEST_STRING "<select multiple=\"\"></select>"
12922 #define  RESULT_STRING "<select multiple></select>"
12923   char  *ret;
12924   char  *tmp;
12925   device_table spec;
12926   chxjconvrule_entry entry;
12927   cookie_t cookie;
12928   apr_size_t destlen;
12929   APR_INIT;
12930
12931   COOKIE_INIT(cookie);
12932
12933   SPEC_INIT(spec);
12934   destlen = sizeof(TEST_STRING)-1;
12935
12936   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12937   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12938   ret = chxj_rencoding(&r, ret, &destlen);
12939   fprintf(stderr, "actual:[%s]\n", ret);
12940   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12941   CU_ASSERT(ret != NULL);
12942   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12943   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12944
12945   APR_TERM;
12946 #undef TEST_STRING
12947 #undef RESULT_STRING
12948 }
12949 void test_ixhtml10_select_tag_014()
12950 {
12951 #define  TEST_STRING "<select multiple=\"abc\"></select>"
12952 #define  RESULT_STRING "<select multiple></select>"
12953   char  *ret;
12954   char  *tmp;
12955   device_table spec;
12956   chxjconvrule_entry entry;
12957   cookie_t cookie;
12958   apr_size_t destlen;
12959   APR_INIT;
12960
12961   COOKIE_INIT(cookie);
12962
12963   SPEC_INIT(spec);
12964   destlen = sizeof(TEST_STRING)-1;
12965
12966   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
12967   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
12968   ret = chxj_rencoding(&r, ret, &destlen);
12969   fprintf(stderr, "actual:[%s]\n", ret);
12970   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
12971   CU_ASSERT(ret != NULL);
12972   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
12973   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
12974
12975   APR_TERM;
12976 #undef TEST_STRING
12977 #undef RESULT_STRING
12978 }
12979 /*============================================================================*/
12980 /* <BLINK>                                                                    */
12981 /*============================================================================*/
12982 void test_ixhtml10_blink_tag_001()
12983 {
12984 #define  TEST_STRING "<blink></blink>"
12985 #define  RESULT_STRING "<span style=\"text-decoration:blink;\"></span>"
12986   char  *ret;
12987   char  *tmp;
12988   device_table spec;
12989   chxjconvrule_entry entry;
12990   cookie_t cookie;
12991   apr_size_t destlen;
12992   APR_INIT;
12993
12994   COOKIE_INIT(cookie);
12995
12996   SPEC_INIT(spec);
12997   destlen = sizeof(TEST_STRING)-1;
12998
12999   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13000   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13001   ret = chxj_rencoding(&r, ret, &destlen);
13002   fprintf(stderr, "actual:[%s]\n", ret);
13003   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13004   CU_ASSERT(ret != NULL);
13005   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13006   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13007
13008   APR_TERM;
13009 #undef TEST_STRING
13010 #undef RESULT_STRING
13011 }
13012 void test_ixhtml10_blink_tag_002()
13013 {
13014 #define  TEST_STRING "<blink>abc</blink>"
13015 #define  RESULT_STRING "<span style=\"text-decoration:blink;\">abc</span>"
13016   char  *ret;
13017   char  *tmp;
13018   device_table spec;
13019   chxjconvrule_entry entry;
13020   cookie_t cookie;
13021   apr_size_t destlen;
13022   APR_INIT;
13023
13024   COOKIE_INIT(cookie);
13025
13026   SPEC_INIT(spec);
13027   destlen = sizeof(TEST_STRING)-1;
13028
13029   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13030   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13031   ret = chxj_rencoding(&r, ret, &destlen);
13032   fprintf(stderr, "actual:[%s]\n", ret);
13033   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13034   CU_ASSERT(ret != NULL);
13035   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13036   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13037
13038   APR_TERM;
13039 #undef TEST_STRING
13040 #undef RESULT_STRING
13041 }
13042 void test_ixhtml10_blink_tag_003()
13043 {
13044 #define  TEST_STRING "<blink>あああ</blink>"
13045 #define  RESULT_STRING "<span style=\"text-decoration:blink;\">あああ</span>"
13046   char  *ret;
13047   char  *tmp;
13048   device_table spec;
13049   chxjconvrule_entry entry;
13050   cookie_t cookie;
13051   apr_size_t destlen;
13052   APR_INIT;
13053
13054   COOKIE_INIT(cookie);
13055
13056   SPEC_INIT(spec);
13057   destlen = sizeof(TEST_STRING)-1;
13058
13059   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13060   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13061   ret = chxj_rencoding(&r, ret, &destlen);
13062   fprintf(stderr, "actual:[%s]\n", ret);
13063   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13064   CU_ASSERT(ret != NULL);
13065   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13066   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13067
13068   APR_TERM;
13069 #undef TEST_STRING
13070 #undef RESULT_STRING
13071 }
13072 void test_ixhtml10_blink_tag_004()
13073 {
13074 #define  TEST_STRING "<blink>ハンカク</blink>"
13075 #define  RESULT_STRING "<span style=\"text-decoration:blink;\">ハンカク</span>"
13076   char  *ret;
13077   char  *tmp;
13078   device_table spec;
13079   chxjconvrule_entry entry;
13080   cookie_t cookie;
13081   apr_size_t destlen;
13082   APR_INIT;
13083
13084   COOKIE_INIT(cookie);
13085
13086   SPEC_INIT(spec);
13087   destlen = sizeof(TEST_STRING)-1;
13088
13089   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13090   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13091   ret = chxj_rencoding(&r, ret, &destlen);
13092   fprintf(stderr, "actual:[%s]\n", ret);
13093   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13094   CU_ASSERT(ret != NULL);
13095   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13096   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13097
13098   APR_TERM;
13099 #undef TEST_STRING
13100 #undef RESULT_STRING
13101 }
13102 /*============================================================================*/
13103 /* MARQUEE                                                                    */
13104 /*============================================================================*/
13105 void test_ixhtml10_marquee_tag_001()
13106 {
13107 #define  TEST_STRING "<marquee></marquee>"
13108 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\"></span>"
13109   char  *ret;
13110   char  *tmp;
13111   device_table spec;
13112   chxjconvrule_entry entry;
13113   cookie_t cookie;
13114   apr_size_t destlen;
13115   APR_INIT;
13116
13117   COOKIE_INIT(cookie);
13118
13119   SPEC_INIT(spec);
13120   destlen = sizeof(TEST_STRING)-1;
13121
13122   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13123   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13124   ret = chxj_rencoding(&r, ret, &destlen);
13125   fprintf(stderr, "actual:[%s]\n", ret);
13126   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13127   CU_ASSERT(ret != NULL);
13128   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13129   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13130
13131   APR_TERM;
13132 #undef TEST_STRING
13133 #undef RESULT_STRING
13134 }
13135 void test_ixhtml10_marquee_tag_002()
13136 {
13137 #define  TEST_STRING "<marquee>abc</marquee>"
13138 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">abc</span>"
13139   char  *ret;
13140   char  *tmp;
13141   device_table spec;
13142   chxjconvrule_entry entry;
13143   cookie_t cookie;
13144   apr_size_t destlen;
13145   APR_INIT;
13146
13147   COOKIE_INIT(cookie);
13148
13149   SPEC_INIT(spec);
13150   destlen = sizeof(TEST_STRING)-1;
13151
13152   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13153   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13154   ret = chxj_rencoding(&r, ret, &destlen);
13155   fprintf(stderr, "actual:[%s]\n", ret);
13156   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13157   CU_ASSERT(ret != NULL);
13158   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13159   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13160
13161   APR_TERM;
13162 #undef TEST_STRING
13163 #undef RESULT_STRING
13164 }
13165 void test_ixhtml10_marquee_tag_003()
13166 {
13167 #define  TEST_STRING "<marquee>あああ</marquee>"
13168 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">あああ</span>"
13169   char  *ret;
13170   char  *tmp;
13171   device_table spec;
13172   chxjconvrule_entry entry;
13173   cookie_t cookie;
13174   apr_size_t destlen;
13175   APR_INIT;
13176
13177   COOKIE_INIT(cookie);
13178
13179   SPEC_INIT(spec);
13180   destlen = sizeof(TEST_STRING)-1;
13181
13182   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13183   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13184   ret = chxj_rencoding(&r, ret, &destlen);
13185   fprintf(stderr, "actual:[%s]\n", ret);
13186   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13187   CU_ASSERT(ret != NULL);
13188   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13189   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13190
13191   APR_TERM;
13192 #undef TEST_STRING
13193 #undef RESULT_STRING
13194 }
13195 void test_ixhtml10_marquee_tag_004()
13196 {
13197 #define  TEST_STRING "<marquee>ハンカク</marquee>"
13198 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13199   char  *ret;
13200   char  *tmp;
13201   device_table spec;
13202   chxjconvrule_entry entry;
13203   cookie_t cookie;
13204   apr_size_t destlen;
13205   APR_INIT;
13206
13207   COOKIE_INIT(cookie);
13208
13209   SPEC_INIT(spec);
13210   destlen = sizeof(TEST_STRING)-1;
13211
13212   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13213   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13214   ret = chxj_rencoding(&r, ret, &destlen);
13215   fprintf(stderr, "actual:[%s]\n", ret);
13216   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13217   CU_ASSERT(ret != NULL);
13218   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13219   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13220
13221   APR_TERM;
13222 #undef TEST_STRING
13223 #undef RESULT_STRING
13224 }
13225 void test_ixhtml10_marquee_tag_005()
13226 {
13227 #define  TEST_STRING "<marquee direction>ハンカク</marquee>"
13228 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13229   char  *ret;
13230   char  *tmp;
13231   device_table spec;
13232   chxjconvrule_entry entry;
13233   cookie_t cookie;
13234   apr_size_t destlen;
13235   APR_INIT;
13236
13237   COOKIE_INIT(cookie);
13238
13239   SPEC_INIT(spec);
13240   destlen = sizeof(TEST_STRING)-1;
13241
13242   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13243   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13244   ret = chxj_rencoding(&r, ret, &destlen);
13245   fprintf(stderr, "actual:[%s]\n", ret);
13246   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13247   CU_ASSERT(ret != NULL);
13248   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13249   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13250
13251   APR_TERM;
13252 #undef TEST_STRING
13253 #undef RESULT_STRING
13254 }
13255 void test_ixhtml10_marquee_tag_006()
13256 {
13257 #define  TEST_STRING "<marquee direction=\"\">ハンカク</marquee>"
13258 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13259   char  *ret;
13260   char  *tmp;
13261   device_table spec;
13262   chxjconvrule_entry entry;
13263   cookie_t cookie;
13264   apr_size_t destlen;
13265   APR_INIT;
13266
13267   COOKIE_INIT(cookie);
13268
13269   SPEC_INIT(spec);
13270   destlen = sizeof(TEST_STRING)-1;
13271
13272   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13273   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13274   ret = chxj_rencoding(&r, ret, &destlen);
13275   fprintf(stderr, "actual:[%s]\n", ret);
13276   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13277   CU_ASSERT(ret != NULL);
13278   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13279   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13280
13281   APR_TERM;
13282 #undef TEST_STRING
13283 #undef RESULT_STRING
13284 }
13285 void test_ixhtml10_marquee_tag_007()
13286 {
13287 #define  TEST_STRING "<marquee direction=\"left\">ハンカク</marquee>"
13288 #define  RESULT_STRING "<span style=\"display:-wap-marquee;-wap-marquee-dir:rtl;\">ハンカク</span>"
13289   char  *ret;
13290   char  *tmp;
13291   device_table spec;
13292   chxjconvrule_entry entry;
13293   cookie_t cookie;
13294   apr_size_t destlen;
13295   APR_INIT;
13296
13297   COOKIE_INIT(cookie);
13298
13299   SPEC_INIT(spec);
13300   destlen = sizeof(TEST_STRING)-1;
13301
13302   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13303   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13304   ret = chxj_rencoding(&r, ret, &destlen);
13305   fprintf(stderr, "actual:[%s]\n", ret);
13306   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13307   CU_ASSERT(ret != NULL);
13308   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13309   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13310
13311   APR_TERM;
13312 #undef TEST_STRING
13313 #undef RESULT_STRING
13314 }
13315 void test_ixhtml10_marquee_tag_008()
13316 {
13317 #define  TEST_STRING "<marquee direction=\"right\">ハンカク</marquee>"
13318 #define  RESULT_STRING "<span style=\"display:-wap-marquee;-wap-marquee-dir:ltr;\">ハンカク</span>"
13319   char  *ret;
13320   char  *tmp;
13321   device_table spec;
13322   chxjconvrule_entry entry;
13323   cookie_t cookie;
13324   apr_size_t destlen;
13325   APR_INIT;
13326
13327   COOKIE_INIT(cookie);
13328
13329   SPEC_INIT(spec);
13330   destlen = sizeof(TEST_STRING)-1;
13331
13332   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13333   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13334   ret = chxj_rencoding(&r, ret, &destlen);
13335   fprintf(stderr, "actual:[%s]\n", ret);
13336   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13337   CU_ASSERT(ret != NULL);
13338   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13339   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13340
13341   APR_TERM;
13342 #undef TEST_STRING
13343 #undef RESULT_STRING
13344 }
13345 void test_ixhtml10_marquee_tag_009()
13346 {
13347 #define  TEST_STRING "<marquee direction=\"center\">ハンカク</marquee>"
13348 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13349   char  *ret;
13350   char  *tmp;
13351   device_table spec;
13352   chxjconvrule_entry entry;
13353   cookie_t cookie;
13354   apr_size_t destlen;
13355   APR_INIT;
13356
13357   COOKIE_INIT(cookie);
13358
13359   SPEC_INIT(spec);
13360   destlen = sizeof(TEST_STRING)-1;
13361
13362   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13363   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13364   ret = chxj_rencoding(&r, ret, &destlen);
13365   fprintf(stderr, "actual:[%s]\n", ret);
13366   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13367   CU_ASSERT(ret != NULL);
13368   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13369   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13370
13371   APR_TERM;
13372 #undef TEST_STRING
13373 #undef RESULT_STRING
13374 }
13375 void test_ixhtml10_marquee_tag_010()
13376 {
13377 #define  TEST_STRING "<marquee behavior>ハンカク</marquee>"
13378 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13379   char  *ret;
13380   char  *tmp;
13381   device_table spec;
13382   chxjconvrule_entry entry;
13383   cookie_t cookie;
13384   apr_size_t destlen;
13385   APR_INIT;
13386
13387   COOKIE_INIT(cookie);
13388
13389   SPEC_INIT(spec);
13390   destlen = sizeof(TEST_STRING)-1;
13391
13392   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13393   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13394   ret = chxj_rencoding(&r, ret, &destlen);
13395   fprintf(stderr, "actual:[%s]\n", ret);
13396   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13397   CU_ASSERT(ret != NULL);
13398   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13399   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13400
13401   APR_TERM;
13402 #undef TEST_STRING
13403 #undef RESULT_STRING
13404 }
13405 void test_ixhtml10_marquee_tag_011()
13406 {
13407 #define  TEST_STRING "<marquee behavior=\"\">ハンカク</marquee>"
13408 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13409   char  *ret;
13410   char  *tmp;
13411   device_table spec;
13412   chxjconvrule_entry entry;
13413   cookie_t cookie;
13414   apr_size_t destlen;
13415   APR_INIT;
13416
13417   COOKIE_INIT(cookie);
13418
13419   SPEC_INIT(spec);
13420   destlen = sizeof(TEST_STRING)-1;
13421
13422   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13423   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13424   ret = chxj_rencoding(&r, ret, &destlen);
13425   fprintf(stderr, "actual:[%s]\n", ret);
13426   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13427   CU_ASSERT(ret != NULL);
13428   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13429   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13430
13431   APR_TERM;
13432 #undef TEST_STRING
13433 #undef RESULT_STRING
13434 }
13435 void test_ixhtml10_marquee_tag_012()
13436 {
13437 #define  TEST_STRING "<marquee behavior=\"scroll\">ハンカク</marquee>"
13438 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13439   char  *ret;
13440   char  *tmp;
13441   device_table spec;
13442   chxjconvrule_entry entry;
13443   cookie_t cookie;
13444   apr_size_t destlen;
13445   APR_INIT;
13446
13447   COOKIE_INIT(cookie);
13448
13449   SPEC_INIT(spec);
13450   destlen = sizeof(TEST_STRING)-1;
13451
13452   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13453   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13454   ret = chxj_rencoding(&r, ret, &destlen);
13455   fprintf(stderr, "actual:[%s]\n", ret);
13456   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13457   CU_ASSERT(ret != NULL);
13458   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13459   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13460
13461   APR_TERM;
13462 #undef TEST_STRING
13463 #undef RESULT_STRING
13464 }
13465 void test_ixhtml10_marquee_tag_013()
13466 {
13467 #define  TEST_STRING "<marquee behavior=\"slide\">ハンカク</marquee>"
13468 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13469   char  *ret;
13470   char  *tmp;
13471   device_table spec;
13472   chxjconvrule_entry entry;
13473   cookie_t cookie;
13474   apr_size_t destlen;
13475   APR_INIT;
13476
13477   COOKIE_INIT(cookie);
13478
13479   SPEC_INIT(spec);
13480   destlen = sizeof(TEST_STRING)-1;
13481
13482   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13483   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13484   ret = chxj_rencoding(&r, ret, &destlen);
13485   fprintf(stderr, "actual:[%s]\n", ret);
13486   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13487   CU_ASSERT(ret != NULL);
13488   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13489   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13490
13491   APR_TERM;
13492 #undef TEST_STRING
13493 #undef RESULT_STRING
13494 }
13495 void test_ixhtml10_marquee_tag_014()
13496 {
13497 #define  TEST_STRING "<marquee behavior=\"alternate\">ハンカク</marquee>"
13498 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13499   char  *ret;
13500   char  *tmp;
13501   device_table spec;
13502   chxjconvrule_entry entry;
13503   cookie_t cookie;
13504   apr_size_t destlen;
13505   APR_INIT;
13506
13507   COOKIE_INIT(cookie);
13508
13509   SPEC_INIT(spec);
13510   destlen = sizeof(TEST_STRING)-1;
13511
13512   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13513   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13514   ret = chxj_rencoding(&r, ret, &destlen);
13515   fprintf(stderr, "actual:[%s]\n", ret);
13516   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13517   CU_ASSERT(ret != NULL);
13518   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13519   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13520
13521   APR_TERM;
13522 #undef TEST_STRING
13523 #undef RESULT_STRING
13524 }
13525 void test_ixhtml10_marquee_tag_015()
13526 {
13527 #define  TEST_STRING "<marquee behavior=\"unknown\">ハンカク</marquee>"
13528 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13529   char  *ret;
13530   char  *tmp;
13531   device_table spec;
13532   chxjconvrule_entry entry;
13533   cookie_t cookie;
13534   apr_size_t destlen;
13535   APR_INIT;
13536
13537   COOKIE_INIT(cookie);
13538
13539   SPEC_INIT(spec);
13540   destlen = sizeof(TEST_STRING)-1;
13541
13542   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13543   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13544   ret = chxj_rencoding(&r, ret, &destlen);
13545   fprintf(stderr, "actual:[%s]\n", ret);
13546   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13547   CU_ASSERT(ret != NULL);
13548   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13549   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13550
13551   APR_TERM;
13552 #undef TEST_STRING
13553 #undef RESULT_STRING
13554 }
13555 void test_ixhtml10_marquee_tag_016()
13556 {
13557 #define  TEST_STRING "<marquee loop>ハンカク</marquee>"
13558 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13559   char  *ret;
13560   char  *tmp;
13561   device_table spec;
13562   chxjconvrule_entry entry;
13563   cookie_t cookie;
13564   apr_size_t destlen;
13565   APR_INIT;
13566
13567   COOKIE_INIT(cookie);
13568
13569   SPEC_INIT(spec);
13570   destlen = sizeof(TEST_STRING)-1;
13571
13572   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13573   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13574   ret = chxj_rencoding(&r, ret, &destlen);
13575   fprintf(stderr, "actual:[%s]\n", ret);
13576   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13577   CU_ASSERT(ret != NULL);
13578   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13579   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13580
13581   APR_TERM;
13582 #undef TEST_STRING
13583 #undef RESULT_STRING
13584 }
13585 void test_ixhtml10_marquee_tag_017()
13586 {
13587 #define  TEST_STRING "<marquee loop=\"\">ハンカク</marquee>"
13588 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13589   char  *ret;
13590   char  *tmp;
13591   device_table spec;
13592   chxjconvrule_entry entry;
13593   cookie_t cookie;
13594   apr_size_t destlen;
13595   APR_INIT;
13596
13597   COOKIE_INIT(cookie);
13598
13599   SPEC_INIT(spec);
13600   destlen = sizeof(TEST_STRING)-1;
13601
13602   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13603   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13604   ret = chxj_rencoding(&r, ret, &destlen);
13605   fprintf(stderr, "actual:[%s]\n", ret);
13606   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13607   CU_ASSERT(ret != NULL);
13608   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13609   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13610
13611   APR_TERM;
13612 #undef TEST_STRING
13613 #undef RESULT_STRING
13614 }
13615 void test_ixhtml10_marquee_tag_018()
13616 {
13617 #define  TEST_STRING "<marquee loop=\"1\">ハンカク</marquee>"
13618 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13619   char  *ret;
13620   char  *tmp;
13621   device_table spec;
13622   chxjconvrule_entry entry;
13623   cookie_t cookie;
13624   apr_size_t destlen;
13625   APR_INIT;
13626
13627   COOKIE_INIT(cookie);
13628
13629   SPEC_INIT(spec);
13630   destlen = sizeof(TEST_STRING)-1;
13631
13632   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13633   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13634   ret = chxj_rencoding(&r, ret, &destlen);
13635   fprintf(stderr, "actual:[%s]\n", ret);
13636   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13637   CU_ASSERT(ret != NULL);
13638   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13639   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13640
13641   APR_TERM;
13642 #undef TEST_STRING
13643 #undef RESULT_STRING
13644 }
13645 void test_ixhtml10_marquee_tag_019()
13646 {
13647 #define  TEST_STRING "<marquee bgcolor=\"#ff0000\">ハンカク</marquee>"
13648 #define  RESULT_STRING "<span style=\"display:-wap-marquee;background-color:#ff0000;\">ハンカク</span>"
13649   char  *ret;
13650   char  *tmp;
13651   device_table spec;
13652   chxjconvrule_entry entry;
13653   cookie_t cookie;
13654   apr_size_t destlen;
13655   APR_INIT;
13656
13657   COOKIE_INIT(cookie);
13658
13659   SPEC_INIT(spec);
13660   destlen = sizeof(TEST_STRING)-1;
13661
13662   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13663   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13664   ret = chxj_rencoding(&r, ret, &destlen);
13665   fprintf(stderr, "actual:[%s]\n", ret);
13666   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13667   CU_ASSERT(ret != NULL);
13668   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13669   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13670
13671   APR_TERM;
13672 #undef TEST_STRING
13673 #undef RESULT_STRING
13674 }
13675 void test_ixhtml10_marquee_tag_020()
13676 {
13677 #define  TEST_STRING "<marquee bgcolor=\"\">ハンカク</marquee>"
13678 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13679   char  *ret;
13680   char  *tmp;
13681   device_table spec;
13682   chxjconvrule_entry entry;
13683   cookie_t cookie;
13684   apr_size_t destlen;
13685   APR_INIT;
13686
13687   COOKIE_INIT(cookie);
13688
13689   SPEC_INIT(spec);
13690   destlen = sizeof(TEST_STRING)-1;
13691
13692   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13693   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13694   ret = chxj_rencoding(&r, ret, &destlen);
13695   fprintf(stderr, "actual:[%s]\n", ret);
13696   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13697   CU_ASSERT(ret != NULL);
13698   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13699   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13700
13701   APR_TERM;
13702 #undef TEST_STRING
13703 #undef RESULT_STRING
13704 }
13705 void test_ixhtml10_marquee_tag_021()
13706 {
13707 #define  TEST_STRING "<marquee bgcolor>ハンカク</marquee>"
13708 #define  RESULT_STRING "<span style=\"display:-wap-marquee;\">ハンカク</span>"
13709   char  *ret;
13710   char  *tmp;
13711   device_table spec;
13712   chxjconvrule_entry entry;
13713   cookie_t cookie;
13714   apr_size_t destlen;
13715   APR_INIT;
13716
13717   COOKIE_INIT(cookie);
13718
13719   SPEC_INIT(spec);
13720   destlen = sizeof(TEST_STRING)-1;
13721
13722   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13723   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13724   ret = chxj_rencoding(&r, ret, &destlen);
13725   fprintf(stderr, "actual:[%s]\n", ret);
13726   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13727   CU_ASSERT(ret != NULL);
13728   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13729   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13730
13731   APR_TERM;
13732 #undef TEST_STRING
13733 #undef RESULT_STRING
13734 }
13735
13736
13737 /*============================================================================*/
13738 /* <A>                                                                        */
13739 /*============================================================================*/
13740 void test_ixhtml10_a_tag_name_attribute_001()
13741 {
13742 #define  TEST_STRING "<a name=\"abc\">abc</a>"
13743 #define  RESULT_STRING "<a name=\"abc\">abc</a>"
13744   char  *ret;
13745   device_table spec;
13746   chxjconvrule_entry entry;
13747   cookie_t cookie;
13748   apr_size_t destlen;
13749   APR_INIT;
13750
13751   COOKIE_INIT(cookie);
13752
13753   SPEC_INIT(spec);
13754
13755   ret = chxj_convert_ixhtml10(&r, &spec, TEST_STRING, sizeof(TEST_STRING)-1, &destlen, &entry, &cookie);
13756   fprintf(stderr, "actual:[%s]\n", ret);
13757   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13758   CU_ASSERT(ret != NULL);
13759   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13760   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13761
13762   APR_TERM;
13763 #undef TEST_STRING
13764 #undef RESULT_STRING
13765 }
13766 void test_ixhtml10_a_tag_name_attribute_002()
13767 {
13768 #define  TEST_STRING "<a name=\"\">abc</a>"
13769 #define  RESULT_STRING "<a name=\"\">abc</a>"
13770   char  *ret;
13771   device_table spec;
13772   chxjconvrule_entry entry;
13773   cookie_t cookie;
13774   apr_size_t destlen;
13775   APR_INIT;
13776
13777   COOKIE_INIT(cookie);
13778
13779   SPEC_INIT(spec);
13780
13781   ret = chxj_convert_ixhtml10(&r, &spec, TEST_STRING, sizeof(TEST_STRING)-1, &destlen, &entry, &cookie);
13782   fprintf(stderr, "actual:[%s]\n", ret);
13783   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13784   CU_ASSERT(ret != NULL);
13785   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13786   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13787
13788   APR_TERM;
13789 #undef TEST_STRING
13790 #undef RESULT_STRING
13791 }
13792 void test_ixhtml10_a_tag_name_attribute_003()
13793 {
13794 #define  TEST_STRING "<a name=\"あああ\">abc</a>"
13795 #define  RESULT_STRING "<a name=\"あああ\">abc</a>"
13796   char  *ret;
13797   char  *tmp;
13798   device_table spec;
13799   chxjconvrule_entry entry;
13800   cookie_t cookie;
13801   apr_size_t destlen;
13802   APR_INIT;
13803
13804   COOKIE_INIT(cookie);
13805
13806   SPEC_INIT(spec);
13807
13808   destlen = sizeof(TEST_STRING)-1;
13809   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13810   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13811   ret = chxj_rencoding(&r, ret, &destlen);
13812   fprintf(stderr, "actual:[%s]\n", ret);
13813   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13814   CU_ASSERT(ret != NULL);
13815   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13816   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13817
13818   APR_TERM;
13819 #undef TEST_STRING
13820 #undef RESULT_STRING
13821 }
13822 void test_ixhtml10_a_tag_name_attribute_004()
13823 {
13824 #define  TEST_STRING "<a name=\"アアア\">abc</a>"
13825 #define  RESULT_STRING "<a name=\"アアア\">abc</a>"
13826   char  *ret;
13827   char  *tmp;
13828   device_table spec;
13829   chxjconvrule_entry entry;
13830   cookie_t cookie;
13831   apr_size_t destlen;
13832   APR_INIT;
13833
13834   COOKIE_INIT(cookie);
13835
13836   SPEC_INIT(spec);
13837   destlen = sizeof(TEST_STRING)-1;
13838
13839   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13840   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13841   ret = chxj_rencoding(&r, ret, &destlen);
13842   fprintf(stderr, "actual:[%s]\n", ret);
13843   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13844   CU_ASSERT(ret != NULL);
13845   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13846   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13847
13848   APR_TERM;
13849 #undef TEST_STRING
13850 #undef RESULT_STRING
13851 }
13852 void test_ixhtml10_a_tag_href_attribute_001()
13853 {
13854 #define  TEST_STRING "<a href=\"\">abc</a>"
13855 #define  RESULT_STRING "<a href=\"?_chxj_cc=test_cookie_id\">abc</a>"
13856   char  *ret;
13857   char  *tmp;
13858   device_table spec;
13859   chxjconvrule_entry entry;
13860   cookie_t cookie;
13861   apr_size_t destlen;
13862   APR_INIT;
13863
13864   COOKIE_INIT(cookie);
13865
13866   SPEC_INIT(spec);
13867   destlen = sizeof(TEST_STRING)-1;
13868
13869   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13870   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13871   ret = chxj_rencoding(&r, ret, &destlen);
13872   fprintf(stderr, "actual:[%s]\n", ret);
13873   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13874   CU_ASSERT(ret != NULL);
13875   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13876   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13877
13878   APR_TERM;
13879 #undef TEST_STRING
13880 #undef RESULT_STRING
13881 }
13882 void test_ixhtml10_a_tag_href_attribute_002()
13883 {
13884 #define  TEST_STRING "<a href=\"http://www.google.co.jp/\">abc</a>"
13885 #define  RESULT_STRING "<a href=\"http://www.google.co.jp/\">abc</a>"
13886   char  *ret;
13887   char  *tmp;
13888   device_table spec;
13889   chxjconvrule_entry entry;
13890   cookie_t cookie;
13891   apr_size_t destlen;
13892   APR_INIT;
13893
13894   COOKIE_INIT(cookie);
13895
13896   SPEC_INIT(spec);
13897   destlen = sizeof(TEST_STRING)-1;
13898
13899   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13900   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13901   ret = chxj_rencoding(&r, ret, &destlen);
13902   fprintf(stderr, "actual:[%s]\n", ret);
13903   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13904   CU_ASSERT(ret != NULL);
13905   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13906   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13907
13908   APR_TERM;
13909 #undef TEST_STRING
13910 #undef RESULT_STRING
13911 }
13912 void test_ixhtml10_a_tag_href_attribute_003()
13913 {
13914 #define  TEST_STRING "<a href=\"a.html\">abc</a>"
13915 #define  RESULT_STRING "<a href=\"a.html?_chxj_cc=test_cookie_id\">abc</a>"
13916   char  *ret;
13917   char  *tmp;
13918   device_table spec;
13919   chxjconvrule_entry entry;
13920   cookie_t cookie;
13921   apr_size_t destlen;
13922   APR_INIT;
13923
13924   COOKIE_INIT(cookie);
13925
13926   SPEC_INIT(spec);
13927   destlen = sizeof(TEST_STRING)-1;
13928
13929   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13930   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13931   ret = chxj_rencoding(&r, ret, &destlen);
13932   fprintf(stderr, "actual:[%s]\n", ret);
13933   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13934   CU_ASSERT(ret != NULL);
13935   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13936   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13937
13938   APR_TERM;
13939 #undef TEST_STRING
13940 #undef RESULT_STRING
13941 }
13942 void test_ixhtml10_a_tag_href_attribute_004()
13943 {
13944 #define  TEST_STRING "<a href=\"a.html#abc\">abc</a>"
13945 #define  RESULT_STRING "<a href=\"a.html?_chxj_cc=test_cookie_id#abc\">abc</a>"
13946   char  *ret;
13947   char  *tmp;
13948   device_table spec;
13949   chxjconvrule_entry entry;
13950   cookie_t cookie;
13951   apr_size_t destlen;
13952   APR_INIT;
13953
13954   COOKIE_INIT(cookie);
13955
13956   SPEC_INIT(spec);
13957   destlen = sizeof(TEST_STRING)-1;
13958
13959   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13960   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13961   ret = chxj_rencoding(&r, ret, &destlen);
13962   fprintf(stderr, "actual:[%s]\n", ret);
13963   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13964   CU_ASSERT(ret != NULL);
13965   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13966   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13967
13968   APR_TERM;
13969 #undef TEST_STRING
13970 #undef RESULT_STRING
13971 }
13972 void test_ixhtml10_a_tag_href_attribute_005()
13973 {
13974 #define  TEST_STRING "<a href=\"a.html#\">abc</a>"
13975 #define  RESULT_STRING "<a href=\"a.html?_chxj_cc=test_cookie_id#\">abc</a>"
13976   char  *ret;
13977   char  *tmp;
13978   device_table spec;
13979   chxjconvrule_entry entry;
13980   cookie_t cookie;
13981   apr_size_t destlen;
13982   APR_INIT;
13983
13984   COOKIE_INIT(cookie);
13985
13986   SPEC_INIT(spec);
13987   destlen = sizeof(TEST_STRING)-1;
13988
13989   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
13990   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
13991   ret = chxj_rencoding(&r, ret, &destlen);
13992   fprintf(stderr, "actual:[%s]\n", ret);
13993   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
13994   CU_ASSERT(ret != NULL);
13995   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
13996   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
13997
13998   APR_TERM;
13999 #undef TEST_STRING
14000 #undef RESULT_STRING
14001 }
14002 void test_ixhtml10_a_tag_href_attribute_006()
14003 {
14004 #define  TEST_STRING "<a href=\"a.html\">abc</a>"
14005 #define  RESULT_STRING "<a href=\"a.html\">abc</a>"
14006   char  *ret;
14007   char  *tmp;
14008   device_table spec;
14009   chxjconvrule_entry entry;
14010   cookie_t cookie;
14011   apr_size_t destlen;
14012   APR_INIT;
14013
14014   COOKIE_INIT(cookie);
14015
14016   SPEC_INIT(spec);
14017   destlen = sizeof(TEST_STRING)-1;
14018
14019   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14020   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, NULL);
14021   ret = chxj_rencoding(&r, ret, &destlen);
14022   fprintf(stderr, "actual:[%s]\n", ret);
14023   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14024   CU_ASSERT(ret != NULL);
14025   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14026   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14027
14028   APR_TERM;
14029 #undef TEST_STRING
14030 #undef RESULT_STRING
14031 }
14032 void test_ixhtml10_a_tag_accesskey_attribute_001()
14033 {
14034 #define  TEST_STRING "<a accesskey=\"1\">abc</a>"
14035 #define  RESULT_STRING "<a accesskey=\"1\">abc</a>"
14036   char  *ret;
14037   char  *tmp;
14038   device_table spec;
14039   chxjconvrule_entry entry;
14040   cookie_t cookie;
14041   apr_size_t destlen;
14042   APR_INIT;
14043
14044   COOKIE_INIT(cookie);
14045
14046   SPEC_INIT(spec);
14047   destlen = sizeof(TEST_STRING)-1;
14048
14049   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14050   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14051   ret = chxj_rencoding(&r, ret, &destlen);
14052   fprintf(stderr, "actual:[%s]\n", ret);
14053   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14054   CU_ASSERT(ret != NULL);
14055   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14056   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14057
14058   APR_TERM;
14059 #undef TEST_STRING
14060 #undef RESULT_STRING
14061 }
14062 void test_ixhtml10_a_tag_accesskey_attribute_002()
14063 {
14064 #define  TEST_STRING "<a accesskey=\"\">abc</a>"
14065 #define  RESULT_STRING "<a accesskey=\"\">abc</a>"
14066   char  *ret;
14067   char  *tmp;
14068   device_table spec;
14069   chxjconvrule_entry entry;
14070   cookie_t cookie;
14071   apr_size_t destlen;
14072   APR_INIT;
14073
14074   COOKIE_INIT(cookie);
14075
14076   SPEC_INIT(spec);
14077   destlen = sizeof(TEST_STRING)-1;
14078
14079   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14080   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14081   ret = chxj_rencoding(&r, ret, &destlen);
14082   fprintf(stderr, "actual:[%s]\n", ret);
14083   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14084   CU_ASSERT(ret != NULL);
14085   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14086   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14087
14088   APR_TERM;
14089 #undef TEST_STRING
14090 #undef RESULT_STRING
14091 }
14092 void test_ixhtml10_a_tag_accesskey_attribute_003()
14093 {
14094 #define  TEST_STRING "<a accesskey>abc</a>"
14095 #define  RESULT_STRING "<a accesskey=\"\">abc</a>"
14096   char  *ret;
14097   char  *tmp;
14098   device_table spec;
14099   chxjconvrule_entry entry;
14100   cookie_t cookie;
14101   apr_size_t destlen;
14102   APR_INIT;
14103
14104   COOKIE_INIT(cookie);
14105
14106   SPEC_INIT(spec);
14107   destlen = sizeof(TEST_STRING)-1;
14108
14109   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14110   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14111   ret = chxj_rencoding(&r, ret, &destlen);
14112   fprintf(stderr, "actual:[%s]\n", ret);
14113   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14114   CU_ASSERT(ret != NULL);
14115   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14116   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14117
14118   APR_TERM;
14119 #undef TEST_STRING
14120 #undef RESULT_STRING
14121 }
14122 /*============================================================================*/
14123 /* <FONT>                                                                     */
14124 /*============================================================================*/
14125 void test_ixhtml10_font_tag_001()
14126 {
14127 #define  TEST_STRING "<font>"
14128 #define  RESULT_STRING "<span></span>"
14129   char  *ret;
14130   char  *tmp;
14131   device_table spec;
14132   chxjconvrule_entry entry;
14133   cookie_t cookie;
14134   apr_size_t destlen;
14135   APR_INIT;
14136
14137   COOKIE_INIT(cookie);
14138
14139   SPEC_INIT(spec);
14140   destlen = sizeof(TEST_STRING)-1;
14141
14142   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14143   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14144   ret = chxj_rencoding(&r, ret, &destlen);
14145   fprintf(stderr, "actual:[%s]\n", ret);
14146   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14147   CU_ASSERT(ret != NULL);
14148   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14149   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14150
14151   APR_TERM;
14152 #undef TEST_STRING
14153 #undef RESULT_STRING
14154 }
14155 void test_ixhtml10_font_tag_002()
14156 {
14157 #define  TEST_STRING "<font>あああ</font>"
14158 #define  RESULT_STRING "<span>あああ</span>"
14159   char  *ret;
14160   char  *tmp;
14161   device_table spec;
14162   chxjconvrule_entry entry;
14163   cookie_t cookie;
14164   apr_size_t destlen;
14165   APR_INIT;
14166
14167   COOKIE_INIT(cookie);
14168
14169   SPEC_INIT(spec);
14170   destlen = sizeof(TEST_STRING)-1;
14171
14172   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14173   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14174   ret = chxj_rencoding(&r, ret, &destlen);
14175   fprintf(stderr, "actual:[%s]\n", ret);
14176   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14177   CU_ASSERT(ret != NULL);
14178   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14179   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14180
14181   APR_TERM;
14182 #undef TEST_STRING
14183 #undef RESULT_STRING
14184 }
14185 void test_ixhtml10_font_tag_003()
14186 {
14187 #define  TEST_STRING "<font>アアア</font>"
14188 #define  RESULT_STRING "<span>アアア</span>"
14189   char  *ret;
14190   char  *tmp;
14191   device_table spec;
14192   chxjconvrule_entry entry;
14193   cookie_t cookie;
14194   apr_size_t destlen;
14195   APR_INIT;
14196
14197   COOKIE_INIT(cookie);
14198
14199   SPEC_INIT(spec);
14200   destlen = sizeof(TEST_STRING)-1;
14201
14202   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14203   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14204   ret = chxj_rencoding(&r, ret, &destlen);
14205   fprintf(stderr, "actual:[%s]\n", ret);
14206   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14207   CU_ASSERT(ret != NULL);
14208   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14209   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14210
14211   APR_TERM;
14212 #undef TEST_STRING
14213 #undef RESULT_STRING
14214 }
14215 void test_ixhtml10_font_tag_004()
14216 {
14217 #define  TEST_STRING "<font color>アアア</font>"
14218 #define  RESULT_STRING "<span>アアア</span>"
14219   char  *ret;
14220   char  *tmp;
14221   device_table spec;
14222   chxjconvrule_entry entry;
14223   cookie_t cookie;
14224   apr_size_t destlen;
14225   APR_INIT;
14226
14227   COOKIE_INIT(cookie);
14228
14229   SPEC_INIT(spec);
14230   destlen = sizeof(TEST_STRING)-1;
14231
14232   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14233   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14234   ret = chxj_rencoding(&r, ret, &destlen);
14235   fprintf(stderr, "actual:[%s]\n", ret);
14236   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14237   CU_ASSERT(ret != NULL);
14238   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14239   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14240
14241   APR_TERM;
14242 #undef TEST_STRING
14243 #undef RESULT_STRING
14244 }
14245 void test_ixhtml10_font_tag_005()
14246 {
14247 #define  TEST_STRING "<font color=\"\">アアア</font>"
14248 #define  RESULT_STRING "<span>アアア</span>"
14249   char  *ret;
14250   char  *tmp;
14251   device_table spec;
14252   chxjconvrule_entry entry;
14253   cookie_t cookie;
14254   apr_size_t destlen;
14255   APR_INIT;
14256
14257   COOKIE_INIT(cookie);
14258
14259   SPEC_INIT(spec);
14260   destlen = sizeof(TEST_STRING)-1;
14261
14262   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14263   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14264   ret = chxj_rencoding(&r, ret, &destlen);
14265   fprintf(stderr, "actual:[%s]\n", ret);
14266   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14267   CU_ASSERT(ret != NULL);
14268   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14269   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14270
14271   APR_TERM;
14272 #undef TEST_STRING
14273 #undef RESULT_STRING
14274 }
14275 void test_ixhtml10_font_tag_006()
14276 {
14277 #define  TEST_STRING "<font color=\"#ff0000\">アアア</font>"
14278 #define  RESULT_STRING "<span style=\"color:#ff0000;\">アアア</span>"
14279   char  *ret;
14280   char  *tmp;
14281   device_table spec;
14282   chxjconvrule_entry entry;
14283   cookie_t cookie;
14284   apr_size_t destlen;
14285   APR_INIT;
14286
14287   COOKIE_INIT(cookie);
14288
14289   SPEC_INIT(spec);
14290   destlen = sizeof(TEST_STRING)-1;
14291
14292   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14293   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14294   ret = chxj_rencoding(&r, ret, &destlen);
14295   fprintf(stderr, "actual:[%s]\n", ret);
14296   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14297   CU_ASSERT(ret != NULL);
14298   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14299   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14300
14301   APR_TERM;
14302 #undef TEST_STRING
14303 #undef RESULT_STRING
14304 }
14305 void test_ixhtml10_font_tag_007()
14306 {
14307 #define  TEST_STRING "<font size=\"1\">アアア</font>"
14308 #define  RESULT_STRING "<span style=\"font-size:xx-small;\">アアア</span>"
14309   char  *ret;
14310   char  *tmp;
14311   device_table spec;
14312   chxjconvrule_entry entry;
14313   cookie_t cookie;
14314   apr_size_t destlen;
14315   APR_INIT;
14316
14317   COOKIE_INIT(cookie);
14318
14319   SPEC_INIT(spec);
14320   destlen = sizeof(TEST_STRING)-1;
14321
14322   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14323   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14324   ret = chxj_rencoding(&r, ret, &destlen);
14325   fprintf(stderr, "actual:[%s]\n", ret);
14326   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14327   CU_ASSERT(ret != NULL);
14328   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14329   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14330
14331   APR_TERM;
14332 #undef TEST_STRING
14333 #undef RESULT_STRING
14334 }
14335 void test_ixhtml10_font_tag_008()
14336 {
14337 #define  TEST_STRING "<font size=\"2\">アアア</font>"
14338 #define  RESULT_STRING "<span style=\"font-size:x-small;\">アアア</span>"
14339   char  *ret;
14340   char  *tmp;
14341   device_table spec;
14342   chxjconvrule_entry entry;
14343   cookie_t cookie;
14344   apr_size_t destlen;
14345   APR_INIT;
14346
14347   COOKIE_INIT(cookie);
14348
14349   SPEC_INIT(spec);
14350   destlen = sizeof(TEST_STRING)-1;
14351
14352   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14353   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14354   ret = chxj_rencoding(&r, ret, &destlen);
14355   fprintf(stderr, "actual:[%s]\n", ret);
14356   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14357   CU_ASSERT(ret != NULL);
14358   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14359   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14360
14361   APR_TERM;
14362 #undef TEST_STRING
14363 #undef RESULT_STRING
14364 }
14365 void test_ixhtml10_font_tag_009()
14366 {
14367 #define  TEST_STRING "<font size=\"3\">アアア</font>"
14368 #define  RESULT_STRING "<span style=\"font-size:small;\">アアア</span>"
14369   char  *ret;
14370   char  *tmp;
14371   device_table spec;
14372   chxjconvrule_entry entry;
14373   cookie_t cookie;
14374   apr_size_t destlen;
14375   APR_INIT;
14376
14377   COOKIE_INIT(cookie);
14378
14379   SPEC_INIT(spec);
14380   destlen = sizeof(TEST_STRING)-1;
14381
14382   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14383   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14384   ret = chxj_rencoding(&r, ret, &destlen);
14385   fprintf(stderr, "actual:[%s]\n", ret);
14386   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14387   CU_ASSERT(ret != NULL);
14388   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14389   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14390
14391   APR_TERM;
14392 #undef TEST_STRING
14393 #undef RESULT_STRING
14394 }
14395 void test_ixhtml10_font_tag_010()
14396 {
14397 #define  TEST_STRING "<font size=\"4\">アアア</font>"
14398 #define  RESULT_STRING "<span style=\"font-size:medium;\">アアア</span>"
14399   char  *ret;
14400   char  *tmp;
14401   device_table spec;
14402   chxjconvrule_entry entry;
14403   cookie_t cookie;
14404   apr_size_t destlen;
14405   APR_INIT;
14406
14407   COOKIE_INIT(cookie);
14408
14409   SPEC_INIT(spec);
14410   destlen = sizeof(TEST_STRING)-1;
14411
14412   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14413   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14414   ret = chxj_rencoding(&r, ret, &destlen);
14415   fprintf(stderr, "actual:[%s]\n", ret);
14416   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14417   CU_ASSERT(ret != NULL);
14418   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14419   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14420
14421   APR_TERM;
14422 #undef TEST_STRING
14423 #undef RESULT_STRING
14424 }
14425 void test_ixhtml10_font_tag_011()
14426 {
14427 #define  TEST_STRING "<font size=\"5\">アアア</font>"
14428 #define  RESULT_STRING "<span style=\"font-size:large;\">アアア</span>"
14429   char  *ret;
14430   char  *tmp;
14431   device_table spec;
14432   chxjconvrule_entry entry;
14433   cookie_t cookie;
14434   apr_size_t destlen;
14435   APR_INIT;
14436
14437   COOKIE_INIT(cookie);
14438
14439   SPEC_INIT(spec);
14440   destlen = sizeof(TEST_STRING)-1;
14441
14442   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14443   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14444   ret = chxj_rencoding(&r, ret, &destlen);
14445   fprintf(stderr, "actual:[%s]\n", ret);
14446   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14447   CU_ASSERT(ret != NULL);
14448   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14449   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14450
14451   APR_TERM;
14452 #undef TEST_STRING
14453 #undef RESULT_STRING
14454 }
14455 void test_ixhtml10_font_tag_012()
14456 {
14457 #define  TEST_STRING "<font size=\"6\">アアア</font>"
14458 #define  RESULT_STRING "<span style=\"font-size:x-large;\">アアア</span>"
14459   char  *ret;
14460   char  *tmp;
14461   device_table spec;
14462   chxjconvrule_entry entry;
14463   cookie_t cookie;
14464   apr_size_t destlen;
14465   APR_INIT;
14466
14467   COOKIE_INIT(cookie);
14468
14469   SPEC_INIT(spec);
14470   destlen = sizeof(TEST_STRING)-1;
14471
14472   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14473   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14474   ret = chxj_rencoding(&r, ret, &destlen);
14475   fprintf(stderr, "actual:[%s]\n", ret);
14476   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14477   CU_ASSERT(ret != NULL);
14478   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14479   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14480
14481   APR_TERM;
14482 #undef TEST_STRING
14483 #undef RESULT_STRING
14484 }
14485 void test_ixhtml10_font_tag_013()
14486 {
14487 #define  TEST_STRING "<font size=\"7\">アアア</font>"
14488 #define  RESULT_STRING "<span style=\"font-size:xx-large;\">アアア</span>"
14489   char  *ret;
14490   char  *tmp;
14491   device_table spec;
14492   chxjconvrule_entry entry;
14493   cookie_t cookie;
14494   apr_size_t destlen;
14495   APR_INIT;
14496
14497   COOKIE_INIT(cookie);
14498
14499   SPEC_INIT(spec);
14500   destlen = sizeof(TEST_STRING)-1;
14501
14502   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14503   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14504   ret = chxj_rencoding(&r, ret, &destlen);
14505   fprintf(stderr, "actual:[%s]\n", ret);
14506   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14507   CU_ASSERT(ret != NULL);
14508   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14509   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14510
14511   APR_TERM;
14512 #undef TEST_STRING
14513 #undef RESULT_STRING
14514 }
14515 void test_ixhtml10_font_tag_014()
14516 {
14517 #define  TEST_STRING "<font size=\"0\">アアア</font>"
14518 #define  RESULT_STRING "<span>アアア</span>"
14519   char  *ret;
14520   char  *tmp;
14521   device_table spec;
14522   chxjconvrule_entry entry;
14523   cookie_t cookie;
14524   apr_size_t destlen;
14525   APR_INIT;
14526
14527   COOKIE_INIT(cookie);
14528
14529   SPEC_INIT(spec);
14530   destlen = sizeof(TEST_STRING)-1;
14531
14532   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14533   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14534   ret = chxj_rencoding(&r, ret, &destlen);
14535   fprintf(stderr, "actual:[%s]\n", ret);
14536   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14537   CU_ASSERT(ret != NULL);
14538   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14539   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14540
14541   APR_TERM;
14542 #undef TEST_STRING
14543 #undef RESULT_STRING
14544 }
14545 void test_ixhtml10_font_tag_015()
14546 {
14547 #define  TEST_STRING "<font size=\"8\">アアア</font>"
14548 #define  RESULT_STRING "<span>アアア</span>"
14549   char  *ret;
14550   char  *tmp;
14551   device_table spec;
14552   chxjconvrule_entry entry;
14553   cookie_t cookie;
14554   apr_size_t destlen;
14555   APR_INIT;
14556
14557   COOKIE_INIT(cookie);
14558
14559   SPEC_INIT(spec);
14560   destlen = sizeof(TEST_STRING)-1;
14561
14562   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14563   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14564   ret = chxj_rencoding(&r, ret, &destlen);
14565   fprintf(stderr, "actual:[%s]\n", ret);
14566   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14567   CU_ASSERT(ret != NULL);
14568   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14569   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14570
14571   APR_TERM;
14572 #undef TEST_STRING
14573 #undef RESULT_STRING
14574 }
14575 void test_ixhtml10_font_tag_016()
14576 {
14577 #define  TEST_STRING "<font color=\"#ff0000\" size=\"1\">アアア</font>"
14578 #define  RESULT_STRING "<span style=\"color:#ff0000;font-size:xx-small;\">アアア</span>"
14579   char  *ret;
14580   char  *tmp;
14581   device_table spec;
14582   chxjconvrule_entry entry;
14583   cookie_t cookie;
14584   apr_size_t destlen;
14585   APR_INIT;
14586
14587   COOKIE_INIT(cookie);
14588
14589   SPEC_INIT(spec);
14590   destlen = sizeof(TEST_STRING)-1;
14591
14592   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14593   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14594   ret = chxj_rencoding(&r, ret, &destlen);
14595   fprintf(stderr, "actual:[%s]\n", ret);
14596   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14597   CU_ASSERT(ret != NULL);
14598   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14599   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14600
14601   APR_TERM;
14602 #undef TEST_STRING
14603 #undef RESULT_STRING
14604 }
14605 void test_ixhtml10_font_tag_017()
14606 {
14607 #define  TEST_STRING "<font size=\"-1\">アアア</font>"
14608 #define  RESULT_STRING "<span style=\"font-size:small;\">アアア</span>"
14609   char  *ret;
14610   char  *tmp;
14611   device_table spec;
14612   chxjconvrule_entry entry;
14613   cookie_t cookie;
14614   apr_size_t destlen;
14615   APR_INIT;
14616
14617   COOKIE_INIT(cookie);
14618
14619   SPEC_INIT(spec);
14620   destlen = sizeof(TEST_STRING)-1;
14621
14622   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14623   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14624   ret = chxj_rencoding(&r, ret, &destlen);
14625   fprintf(stderr, "actual:[%s]\n", ret);
14626   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14627   CU_ASSERT(ret != NULL);
14628   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14629   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14630
14631   APR_TERM;
14632 #undef TEST_STRING
14633 #undef RESULT_STRING
14634 }
14635 void test_ixhtml10_font_tag_018()
14636 {
14637 #define  TEST_STRING "<font size=\"-2\">アアア</font>"
14638 #define  RESULT_STRING "<span style=\"font-size:x-small;\">アアア</span>"
14639   char  *ret;
14640   char  *tmp;
14641   device_table spec;
14642   chxjconvrule_entry entry;
14643   cookie_t cookie;
14644   apr_size_t destlen;
14645   APR_INIT;
14646
14647   COOKIE_INIT(cookie);
14648
14649   SPEC_INIT(spec);
14650   destlen = sizeof(TEST_STRING)-1;
14651
14652   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14653   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14654   ret = chxj_rencoding(&r, ret, &destlen);
14655   fprintf(stderr, "actual:[%s]\n", ret);
14656   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14657   CU_ASSERT(ret != NULL);
14658   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14659   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14660
14661   APR_TERM;
14662 #undef TEST_STRING
14663 #undef RESULT_STRING
14664 }
14665 void test_ixhtml10_font_tag_019()
14666 {
14667 #define  TEST_STRING "<font size=\"-3\">アアア</font>"
14668 #define  RESULT_STRING "<span style=\"font-size:xx-small;\">アアア</span>"
14669   char  *ret;
14670   char  *tmp;
14671   device_table spec;
14672   chxjconvrule_entry entry;
14673   cookie_t cookie;
14674   apr_size_t destlen;
14675   APR_INIT;
14676
14677   COOKIE_INIT(cookie);
14678
14679   SPEC_INIT(spec);
14680   destlen = sizeof(TEST_STRING)-1;
14681
14682   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14683   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14684   ret = chxj_rencoding(&r, ret, &destlen);
14685   fprintf(stderr, "actual:[%s]\n", ret);
14686   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14687   CU_ASSERT(ret != NULL);
14688   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14689   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14690
14691   APR_TERM;
14692 #undef TEST_STRING
14693 #undef RESULT_STRING
14694 }
14695 void test_ixhtml10_font_tag_020()
14696 {
14697 #define  TEST_STRING "<font size=\"+1\">アアア</font>"
14698 #define  RESULT_STRING "<span style=\"font-size:large;\">アアア</span>"
14699   char  *ret;
14700   char  *tmp;
14701   device_table spec;
14702   chxjconvrule_entry entry;
14703   cookie_t cookie;
14704   apr_size_t destlen;
14705   APR_INIT;
14706
14707   COOKIE_INIT(cookie);
14708
14709   SPEC_INIT(spec);
14710   destlen = sizeof(TEST_STRING)-1;
14711
14712   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14713   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14714   ret = chxj_rencoding(&r, ret, &destlen);
14715   fprintf(stderr, "actual:[%s]\n", ret);
14716   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14717   CU_ASSERT(ret != NULL);
14718   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14719   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14720
14721   APR_TERM;
14722 #undef TEST_STRING
14723 #undef RESULT_STRING
14724 }
14725 void test_ixhtml10_font_tag_021()
14726 {
14727 #define  TEST_STRING "<font size=\"+2\">アアア</font>"
14728 #define  RESULT_STRING "<span style=\"font-size:x-large;\">アアア</span>"
14729   char  *ret;
14730   char  *tmp;
14731   device_table spec;
14732   chxjconvrule_entry entry;
14733   cookie_t cookie;
14734   apr_size_t destlen;
14735   APR_INIT;
14736
14737   COOKIE_INIT(cookie);
14738
14739   SPEC_INIT(spec);
14740   destlen = sizeof(TEST_STRING)-1;
14741
14742   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14743   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14744   ret = chxj_rencoding(&r, ret, &destlen);
14745   fprintf(stderr, "actual:[%s]\n", ret);
14746   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14747   CU_ASSERT(ret != NULL);
14748   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14749   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14750
14751   APR_TERM;
14752 #undef TEST_STRING
14753 #undef RESULT_STRING
14754 }
14755 void test_ixhtml10_font_tag_022()
14756 {
14757 #define  TEST_STRING "<font size=\"+3\">アアア</font>"
14758 #define  RESULT_STRING "<span style=\"font-size:xx-large;\">アアア</span>"
14759   char  *ret;
14760   char  *tmp;
14761   device_table spec;
14762   chxjconvrule_entry entry;
14763   cookie_t cookie;
14764   apr_size_t destlen;
14765   APR_INIT;
14766
14767   COOKIE_INIT(cookie);
14768
14769   SPEC_INIT(spec);
14770   destlen = sizeof(TEST_STRING)-1;
14771
14772   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14773   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14774   ret = chxj_rencoding(&r, ret, &destlen);
14775   fprintf(stderr, "actual:[%s]\n", ret);
14776   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
14777   CU_ASSERT(ret != NULL);
14778   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14779   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14780
14781   APR_TERM;
14782 #undef TEST_STRING
14783 #undef RESULT_STRING
14784 }
14785 /* KONNO */
14786 /*============================================================================*/
14787 /* <META>                                                                     */
14788 /*============================================================================*/
14789 void test_ixhtml10_meta_tag_001()
14790 {
14791 #define  TEST_STRING   "<meta>"
14792 #define  RESULT_STRING "<meta />"
14793   char  *ret;
14794   char  *tmp;
14795   device_table spec;
14796   chxjconvrule_entry entry;
14797   cookie_t cookie;
14798   apr_size_t destlen;
14799   APR_INIT;
14800
14801   COOKIE_INIT(cookie);
14802
14803   SPEC_INIT(spec);
14804   destlen = sizeof(TEST_STRING)-1;
14805
14806   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14807   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14808   ret = chxj_rencoding(&r, ret, &destlen);
14809   CU_ASSERT(ret != NULL);
14810   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14811   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14812
14813   APR_TERM;
14814 #undef TEST_STRING
14815 #undef RESULT_STRING
14816 }
14817 void test_ixhtml10_meta_tag_002()
14818 {
14819 #define  TEST_STRING "<meta http-equiv>"
14820 #define  RESULT_STRING "<meta />"
14821   char  *ret;
14822   char  *tmp;
14823   device_table spec;
14824   chxjconvrule_entry entry;
14825   cookie_t cookie;
14826   apr_size_t destlen;
14827   APR_INIT;
14828
14829   COOKIE_INIT(cookie);
14830
14831   SPEC_INIT(spec);
14832   destlen = sizeof(TEST_STRING)-1;
14833
14834   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14835   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14836   ret = chxj_rencoding(&r, ret, &destlen);
14837   CU_ASSERT(ret != NULL);
14838   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14839   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14840
14841   APR_TERM;
14842 #undef TEST_STRING
14843 #undef RESULT_STRING
14844 }
14845 void test_ixhtml10_meta_tag_003()
14846 {
14847 #define  TEST_STRING "<meta http-equiv=\"\">"
14848 #define  RESULT_STRING "<meta />"
14849   char  *ret;
14850   char  *tmp;
14851   device_table spec;
14852   chxjconvrule_entry entry;
14853   cookie_t cookie;
14854   apr_size_t destlen;
14855   APR_INIT;
14856
14857   COOKIE_INIT(cookie);
14858
14859   SPEC_INIT(spec);
14860   destlen = sizeof(TEST_STRING)-1;
14861
14862   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14863   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14864   ret = chxj_rencoding(&r, ret, &destlen);
14865   CU_ASSERT(ret != NULL);
14866   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14867   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14868
14869   APR_TERM;
14870 #undef TEST_STRING
14871 #undef RESULT_STRING
14872 }
14873 void test_ixhtml10_meta_tag_004()
14874 {
14875 #define  TEST_STRING "<meta http-equiv=\"content-type\">"
14876 #define  RESULT_STRING "<meta http-equiv=\"content-type\" />"
14877   char  *ret;
14878   char  *tmp;
14879   device_table spec;
14880   chxjconvrule_entry entry;
14881   cookie_t cookie;
14882   apr_size_t destlen;
14883   APR_INIT;
14884
14885   COOKIE_INIT(cookie);
14886
14887   SPEC_INIT(spec);
14888   destlen = sizeof(TEST_STRING)-1;
14889
14890   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14891   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14892   ret = chxj_rencoding(&r, ret, &destlen);
14893   CU_ASSERT(ret != NULL);
14894   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14895   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14896
14897   APR_TERM;
14898 #undef TEST_STRING
14899 #undef RESULT_STRING
14900 }
14901 void test_ixhtml10_meta_tag_005()
14902 {
14903 #define  TEST_STRING "<meta http-equiv=\"abc\">"
14904 #define  RESULT_STRING "<meta http-equiv=\"abc\" />"
14905   char  *ret;
14906   char  *tmp;
14907   device_table spec;
14908   chxjconvrule_entry entry;
14909   cookie_t cookie;
14910   apr_size_t destlen;
14911   APR_INIT;
14912
14913   COOKIE_INIT(cookie);
14914
14915   SPEC_INIT(spec);
14916   destlen = sizeof(TEST_STRING)-1;
14917
14918   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14919   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14920   ret = chxj_rencoding(&r, ret, &destlen);
14921   CU_ASSERT(ret != NULL);
14922   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14923   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14924
14925   APR_TERM;
14926 #undef TEST_STRING
14927 #undef RESULT_STRING
14928 }
14929 void test_ixhtml10_meta_tag_006()
14930 {
14931 #define  TEST_STRING "<meta content>"
14932 #define  RESULT_STRING "<meta />"
14933   char  *ret;
14934   char  *tmp;
14935   device_table spec;
14936   chxjconvrule_entry entry;
14937   cookie_t cookie;
14938   apr_size_t destlen;
14939   APR_INIT;
14940
14941   COOKIE_INIT(cookie);
14942
14943   SPEC_INIT(spec);
14944   destlen = sizeof(TEST_STRING)-1;
14945
14946   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14947   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14948   ret = chxj_rencoding(&r, ret, &destlen);
14949   CU_ASSERT(ret != NULL);
14950   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14951   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14952
14953   APR_TERM;
14954 #undef TEST_STRING
14955 #undef RESULT_STRING
14956 }
14957 void test_ixhtml10_meta_tag_007()
14958 {
14959 #define  TEST_STRING "<meta content=\"\">"
14960 #define  RESULT_STRING "<meta />"
14961   char  *ret;
14962   char  *tmp;
14963   device_table spec;
14964   chxjconvrule_entry entry;
14965   cookie_t cookie;
14966   apr_size_t destlen;
14967   APR_INIT;
14968
14969   COOKIE_INIT(cookie);
14970
14971   SPEC_INIT(spec);
14972   destlen = sizeof(TEST_STRING)-1;
14973
14974   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
14975   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
14976   ret = chxj_rencoding(&r, ret, &destlen);
14977   CU_ASSERT(ret != NULL);
14978   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
14979   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
14980
14981   APR_TERM;
14982 #undef TEST_STRING
14983 #undef RESULT_STRING
14984 }
14985 void test_ixhtml10_meta_tag_008()
14986 {
14987 #define  TEST_STRING "<meta http-equiv=\"Content-Type\" content=\"text/html\">"
14988 #define  RESULT_STRING "<meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml; charset=Shift_JIS\" />"
14989   char  *ret;
14990   char  *tmp;
14991   device_table spec;
14992   chxjconvrule_entry entry;
14993   cookie_t cookie;
14994   apr_size_t destlen;
14995   APR_INIT;
14996
14997   COOKIE_INIT(cookie);
14998
14999   SPEC_INIT(spec);
15000   destlen = sizeof(TEST_STRING)-1;
15001
15002   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15003   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15004   ret = chxj_rencoding(&r, ret, &destlen);
15005   CU_ASSERT(ret != NULL);
15006   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15007   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15008
15009   APR_TERM;
15010 #undef TEST_STRING
15011 #undef RESULT_STRING
15012 }
15013 void test_ixhtml10_meta_tag_009()
15014 {
15015 #define  TEST_STRING "<meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml\">"
15016 #define  RESULT_STRING "<meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml; charset=Shift_JIS\" />"
15017   char  *ret;
15018   char  *tmp;
15019   device_table spec;
15020   chxjconvrule_entry entry;
15021   cookie_t cookie;
15022   apr_size_t destlen;
15023   APR_INIT;
15024
15025   COOKIE_INIT(cookie);
15026
15027   SPEC_INIT(spec);
15028   destlen = sizeof(TEST_STRING)-1;
15029
15030   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15031   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15032   ret = chxj_rencoding(&r, ret, &destlen);
15033   CU_ASSERT(ret != NULL);
15034   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15035   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15036
15037   APR_TERM;
15038 #undef TEST_STRING
15039 #undef RESULT_STRING
15040 }
15041 /*============================================================================*/
15042 /* <PARAM>                                                                    */
15043 /*============================================================================*/
15044 void test_ixhtml10_param_tag_001()
15045 {
15046 #define  TEST_STRING "<param>aaa</param>"
15047 #define  RESULT_STRING "\n"
15048   char  *ret;
15049   char  *tmp;
15050   device_table spec;
15051   chxjconvrule_entry entry;
15052   cookie_t cookie;
15053   apr_size_t destlen;
15054   APR_INIT;
15055
15056   COOKIE_INIT(cookie);
15057
15058   SPEC_INIT(spec);
15059   destlen = sizeof(TEST_STRING)-1;
15060
15061   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15062   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15063   ret = chxj_rencoding(&r, ret, &destlen);
15064   fprintf(stderr, "actual:[%s]\n", ret);
15065   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
15066   CU_ASSERT(ret != NULL);
15067   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15068   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15069
15070   APR_TERM;
15071 #undef TEST_STRING
15072 #undef RESULT_STRING
15073 }
15074
15075
15076
15077 /* CSS */
15078 static int call_check = 0;
15079 char *test_chxj_serf_get001(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
15080 {
15081   static char *css = "a:focus { display: none }\n"
15082                      "a:link  { display: none }\n"
15083                      "a       { display: none }\n"
15084                      "hr      { display: none }\n"
15085                      "a:visited { display:none }";
15086   *len = strlen(css);
15087   call_check = 1;
15088   return css;
15089 }
15090 void test_ixhtml10_link_001()
15091 {
15092 #define  TEST_STRING "<link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />"
15093 #define  RESULT_STRING "\n"
15094   char  *ret;
15095   char  *tmp;
15096   device_table spec;
15097   chxjconvrule_entry entry;
15098   cookie_t cookie;
15099   apr_size_t destlen;
15100   APR_INIT;
15101   chxj_serf_get = test_chxj_serf_get001;
15102
15103   call_check = 0;
15104   COOKIE_INIT(cookie);
15105   entry.action |= CONVRULE_CSS_ON_BIT;
15106
15107   SPEC_INIT(spec);
15108   destlen = sizeof(TEST_STRING)-1;
15109
15110   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15111   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15112   ret = chxj_rencoding(&r, ret, &destlen);
15113   CU_ASSERT(ret != NULL);
15114   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15115   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15116   CU_ASSERT(call_check == 1);
15117
15118   APR_TERM;
15119 #undef TEST_STRING
15120 #undef RESULT_STRING
15121 }
15122 void test_ixhtml10_link_002()
15123 {
15124 #define  TEST_STRING "<link rel=\"abc\" href=\"http://localhost/a.css\" type=\"text/css\" />"
15125 #define  RESULT_STRING "\n"
15126   char  *ret;
15127   char  *tmp;
15128   device_table spec;
15129   chxjconvrule_entry entry;
15130   cookie_t cookie;
15131   apr_size_t destlen;
15132   APR_INIT;
15133   chxj_serf_get = test_chxj_serf_get001;
15134   call_check = 0;
15135
15136   COOKIE_INIT(cookie);
15137
15138   SPEC_INIT(spec);
15139   destlen = sizeof(TEST_STRING)-1;
15140   entry.action |= CONVRULE_CSS_ON_BIT;
15141
15142   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15143   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15144   ret = chxj_rencoding(&r, ret, &destlen);
15145   CU_ASSERT(ret != NULL);
15146   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15147   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15148   CU_ASSERT(call_check == 0);
15149
15150   APR_TERM;
15151 #undef TEST_STRING
15152 #undef RESULT_STRING
15153 }
15154 void test_ixhtml10_link_003()
15155 {
15156 #define  TEST_STRING "<link rel=\"\" href=\"http://localhost/a.css\" type=\"text/css\" />"
15157 #define  RESULT_STRING "\n"
15158   char  *ret;
15159   char  *tmp;
15160   device_table spec;
15161   chxjconvrule_entry entry;
15162   cookie_t cookie;
15163   apr_size_t destlen;
15164   APR_INIT;
15165   chxj_serf_get = test_chxj_serf_get001;
15166   call_check = 0;
15167
15168   COOKIE_INIT(cookie);
15169
15170   SPEC_INIT(spec);
15171   destlen = sizeof(TEST_STRING)-1;
15172   entry.action |= CONVRULE_CSS_ON_BIT;
15173
15174   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15175   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15176   ret = chxj_rencoding(&r, ret, &destlen);
15177   CU_ASSERT(ret != NULL);
15178   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15179   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15180   CU_ASSERT(call_check == 0);
15181
15182   APR_TERM;
15183 #undef TEST_STRING
15184 #undef RESULT_STRING
15185 }
15186 void test_ixhtml10_link_004()
15187 {
15188 #define  TEST_STRING "<link rel href=\"http://localhost/a.css\" type=\"text/css\" />"
15189 #define  RESULT_STRING "\n"
15190   char  *ret;
15191   char  *tmp;
15192   device_table spec;
15193   chxjconvrule_entry entry;
15194   cookie_t cookie;
15195   apr_size_t destlen;
15196   APR_INIT;
15197   chxj_serf_get = test_chxj_serf_get001;
15198   call_check = 0;
15199
15200   COOKIE_INIT(cookie);
15201
15202   SPEC_INIT(spec);
15203   destlen = sizeof(TEST_STRING)-1;
15204   entry.action |= CONVRULE_CSS_ON_BIT;
15205
15206   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15207   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15208   ret = chxj_rencoding(&r, ret, &destlen);
15209   CU_ASSERT(ret != NULL);
15210   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15211   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15212   CU_ASSERT(call_check == 0);
15213
15214   APR_TERM;
15215 #undef TEST_STRING
15216 #undef RESULT_STRING
15217 }
15218 void test_ixhtml10_link_005()
15219 {
15220 #define  TEST_STRING "<link rel=\"stylesheet\" href=\"\" type=\"text/css\" />"
15221 #define  RESULT_STRING "\n"
15222   char  *ret;
15223   char  *tmp;
15224   device_table spec;
15225   chxjconvrule_entry entry;
15226   cookie_t cookie;
15227   apr_size_t destlen;
15228   APR_INIT;
15229   chxj_serf_get = test_chxj_serf_get001;
15230   call_check = 0;
15231
15232   COOKIE_INIT(cookie);
15233
15234   SPEC_INIT(spec);
15235   destlen = sizeof(TEST_STRING)-1;
15236   entry.action |= CONVRULE_CSS_ON_BIT;
15237
15238   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15239   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15240   ret = chxj_rencoding(&r, ret, &destlen);
15241   CU_ASSERT(ret != NULL);
15242   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15243   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15244   CU_ASSERT(call_check == 0);
15245
15246   APR_TERM;
15247 #undef TEST_STRING
15248 #undef RESULT_STRING
15249 }
15250 void test_ixhtml10_link_006()
15251 {
15252 #define  TEST_STRING "<link rel=\"stylesheet\" href type=\"text/css\" />"
15253 #define  RESULT_STRING "\n"
15254   char  *ret;
15255   char  *tmp;
15256   device_table spec;
15257   chxjconvrule_entry entry;
15258   cookie_t cookie;
15259   apr_size_t destlen;
15260   APR_INIT;
15261   chxj_serf_get = test_chxj_serf_get001;
15262   call_check = 0;
15263
15264   COOKIE_INIT(cookie);
15265
15266   SPEC_INIT(spec);
15267   destlen = sizeof(TEST_STRING)-1;
15268   entry.action |= CONVRULE_CSS_ON_BIT;
15269
15270   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15271   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15272   ret = chxj_rencoding(&r, ret, &destlen);
15273   CU_ASSERT(ret != NULL);
15274   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15275   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15276   CU_ASSERT(call_check == 0);
15277
15278   APR_TERM;
15279 #undef TEST_STRING
15280 #undef RESULT_STRING
15281 }
15282 void test_ixhtml10_link_007()
15283 {
15284 #define  TEST_STRING "<link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"\" />"
15285 #define  RESULT_STRING "\n"
15286   char  *ret;
15287   char  *tmp;
15288   device_table spec;
15289   chxjconvrule_entry entry;
15290   cookie_t cookie;
15291   apr_size_t destlen;
15292   APR_INIT;
15293   chxj_serf_get = test_chxj_serf_get001;
15294   call_check = 0;
15295
15296   COOKIE_INIT(cookie);
15297
15298   SPEC_INIT(spec);
15299   destlen = sizeof(TEST_STRING)-1;
15300   entry.action |= CONVRULE_CSS_ON_BIT;
15301
15302   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15303   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15304   ret = chxj_rencoding(&r, ret, &destlen);
15305   CU_ASSERT(ret != NULL);
15306   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15307   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15308   CU_ASSERT(call_check == 0);
15309
15310   APR_TERM;
15311 #undef TEST_STRING
15312 #undef RESULT_STRING
15313 }
15314 void test_ixhtml10_link_008()
15315 {
15316 #define  TEST_STRING "<link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type />"
15317 #define  RESULT_STRING "\n"
15318   char  *ret;
15319   char  *tmp;
15320   device_table spec;
15321   chxjconvrule_entry entry;
15322   cookie_t cookie;
15323   apr_size_t destlen;
15324   APR_INIT;
15325   chxj_serf_get = test_chxj_serf_get001;
15326   call_check = 0;
15327
15328   COOKIE_INIT(cookie);
15329
15330   SPEC_INIT(spec);
15331   destlen = sizeof(TEST_STRING)-1;
15332   entry.action |= CONVRULE_CSS_ON_BIT;
15333
15334   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15335   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15336   ret = chxj_rencoding(&r, ret, &destlen);
15337   CU_ASSERT(ret != NULL);
15338   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15339   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15340   CU_ASSERT(call_check == 0);
15341
15342   APR_TERM;
15343 #undef TEST_STRING
15344 #undef RESULT_STRING
15345 }
15346 void test_ixhtml10_link_009()
15347 {
15348 #define  TEST_STRING "<link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/abc\" />"
15349 #define  RESULT_STRING "\n"
15350   char  *ret;
15351   char  *tmp;
15352   device_table spec;
15353   chxjconvrule_entry entry;
15354   cookie_t cookie;
15355   apr_size_t destlen;
15356   APR_INIT;
15357   chxj_serf_get = test_chxj_serf_get001;
15358   call_check = 0;
15359
15360   COOKIE_INIT(cookie);
15361
15362   SPEC_INIT(spec);
15363   destlen = sizeof(TEST_STRING)-1;
15364   entry.action |= CONVRULE_CSS_ON_BIT;
15365
15366   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15367   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15368   ret = chxj_rencoding(&r, ret, &destlen);
15369   CU_ASSERT(ret != NULL);
15370   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15371   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15372   CU_ASSERT(call_check == 0);
15373
15374   APR_TERM;
15375 #undef TEST_STRING
15376 #undef RESULT_STRING
15377 }
15378
15379
15380
15381 /*===========================================================================*/
15382 /* HTML tag with CSS                                                         */
15383 /*===========================================================================*/
15384 char *test_chxj_serf_get002(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
15385 {
15386   static char *css = "a:focus { display: none }\n"
15387                      "a:link  { display: none }\n"
15388                      "a       { display: none }\n"
15389                      "hr      { display: none }\n"
15390                      "a:visited { display:none }\n"
15391                      "html    { display: none }\n";
15392   *len = strlen(css);
15393   call_check = 1;
15394   return css;
15395 }
15396 void test_ixhtml10_html_tag_with_css_001()
15397 {
15398 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" /></head><body></body></html>"
15399 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
15400                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
15401                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
15402                        "<head></head><body></body></html>"
15403   char  *ret;
15404   char  *tmp;
15405   device_table spec;
15406   chxjconvrule_entry entry;
15407   cookie_t cookie;
15408   apr_size_t destlen;
15409   APR_INIT;
15410   chxj_serf_get = test_chxj_serf_get002;
15411   call_check = 0;
15412
15413   COOKIE_INIT(cookie);
15414
15415   SPEC_INIT(spec);
15416   destlen = sizeof(TEST_STRING)-1;
15417   entry.action |= CONVRULE_CSS_ON_BIT;
15418
15419   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15420   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15421   ret = chxj_rencoding(&r, ret, &destlen);
15422   fprintf(stderr, "actual:[%s]\n", ret);
15423   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
15424   CU_ASSERT(ret != NULL);
15425   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15426   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15427   CU_ASSERT(call_check == 1);
15428
15429   APR_TERM;
15430 #undef TEST_STRING
15431 #undef RESULT_STRING
15432 }
15433
15434 /******************************************************************************/
15435 /* meta with CSS                                                              */
15436 /******************************************************************************/
15437 char *test_chxj_serf_get003(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
15438 {
15439   static char *css = "a:focus { display: none }\n"
15440                      "a:link  { display: none }\n"
15441                      "a       { display: none }\n"
15442                      "hr      { display: none }\n"
15443                      "a:visited { display:none }\n"
15444                      "meta    { display: none }\n";
15445   *len = strlen(css);
15446   call_check = 1;
15447   return css;
15448 }
15449 void test_ixhtml10_meta_tag_with_css_001()
15450 {
15451 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
15452                      "<META http-equiv=\"Content-Type\" content=\"text/html; charset=SHIFT_JIS\"></head><body></body></html>"
15453 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
15454                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
15455                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
15456                        "<head><meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml; charset=Shift_JIS\" /></head><body></body></html>"
15457   char  *ret;
15458   char  *tmp;
15459   device_table spec;
15460   chxjconvrule_entry entry;
15461   cookie_t cookie;
15462   apr_size_t destlen;
15463   APR_INIT;
15464   chxj_serf_get = test_chxj_serf_get003;
15465   call_check = 0;
15466
15467   COOKIE_INIT(cookie);
15468
15469   SPEC_INIT(spec);
15470   destlen = sizeof(TEST_STRING)-1;
15471   entry.action |= CONVRULE_CSS_ON_BIT;
15472
15473   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15474   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15475   ret = chxj_rencoding(&r, ret, &destlen);
15476   fprintf(stderr, "actual:[%s]\n", ret);
15477   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
15478   CU_ASSERT(ret != NULL);
15479   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15480   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15481   CU_ASSERT(call_check == 1);
15482
15483   APR_TERM;
15484 #undef TEST_STRING
15485 #undef RESULT_STRING
15486 }
15487
15488
15489 /******************************************************************************/
15490 /* TEXTAREA with CSS                                                          */
15491 /******************************************************************************/
15492 char *test_chxj_serf_get004(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
15493 {
15494   static char *css = "a:focus { display: none }\n"
15495                      "a:link  { display: none }\n"
15496                      "a       { display: none }\n"
15497                      "hr      { display: none }\n"
15498                      "a:visited { display:none }\n"
15499                      "textarea { -wap-input-format: &quot;*&lt;ja:h&gt;&quot; }\n";
15500   *len = strlen(css);
15501   call_check = 1;
15502   return css;
15503 }
15504 void test_ixhtml10_textarea_tag_with_css_001()
15505 {
15506 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
15507                      "</head><body><textarea></textarea></body></html>"
15508 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
15509                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
15510                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
15511                        "<head></head><body><textarea style=\"-wap-input-format:&quot;*&lt;ja:h&gt;&quot;;\"></textarea></body></html>"
15512   char  *ret;
15513   char  *tmp;
15514   device_table spec;
15515   chxjconvrule_entry entry;
15516   cookie_t cookie;
15517   apr_size_t destlen;
15518   APR_INIT;
15519   chxj_serf_get = test_chxj_serf_get004;
15520   call_check = 0;
15521
15522   COOKIE_INIT(cookie);
15523
15524   SPEC_INIT(spec);
15525   destlen = sizeof(TEST_STRING)-1;
15526   entry.action |= CONVRULE_CSS_ON_BIT;
15527
15528   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15529   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15530   ret = chxj_rencoding(&r, ret, &destlen);
15531   CU_ASSERT(ret != NULL);
15532   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15533   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15534   CU_ASSERT(call_check == 1);
15535
15536   APR_TERM;
15537 #undef TEST_STRING
15538 #undef RESULT_STRING
15539 }
15540 char *test_chxj_serf_get005(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
15541 {
15542   static char *css = "a:focus { display: none }\n"
15543                      "a:link  { display: none }\n"
15544                      "a       { display: none }\n"
15545                      "hr      { display: none }\n"
15546                      "a:visited { display:none }\n"
15547                      "textarea { -wap-input-format: &quot;*&lt;ja:hk&gt;&quot; }\n";
15548   *len = strlen(css);
15549   call_check = 1;
15550   return css;
15551 }
15552 void test_ixhtml10_textarea_tag_with_css_002()
15553 {
15554 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
15555                      "</head><body><textarea></textarea></body></html>"
15556 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
15557                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
15558                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
15559                        "<head></head><body><textarea style=\"-wap-input-format:&quot;*&lt;ja:hk&gt;&quot;;\"></textarea></body></html>"
15560   char  *ret;
15561   char  *tmp;
15562   device_table spec;
15563   chxjconvrule_entry entry;
15564   cookie_t cookie;
15565   apr_size_t destlen;
15566   APR_INIT;
15567   chxj_serf_get = test_chxj_serf_get005;
15568   call_check = 0;
15569
15570   COOKIE_INIT(cookie);
15571
15572   SPEC_INIT(spec);
15573   destlen = sizeof(TEST_STRING)-1;
15574   entry.action |= CONVRULE_CSS_ON_BIT;
15575
15576   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15577   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15578   ret = chxj_rencoding(&r, ret, &destlen);
15579   CU_ASSERT(ret != NULL);
15580   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15581   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15582   CU_ASSERT(call_check == 1);
15583   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
15584   fprintf(stderr, "actual:[%s]\n", ret);
15585
15586   APR_TERM;
15587 #undef TEST_STRING
15588 #undef RESULT_STRING
15589 }
15590
15591 char *test_chxj_serf_get006(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
15592 {
15593   static char *css = "a:focus { display: none }\n"
15594                      "a:link  { display: none }\n"
15595                      "a       { display: none }\n"
15596                      "hr      { display: none }\n"
15597                      "a:visited { display:none }\n"
15598                      "textarea { -wap-input-format: &quot;*&lt;ja:en&gt;&quot; }\n";
15599   *len = strlen(css);
15600   call_check = 1;
15601   return css;
15602 }
15603 void test_ixhtml10_textarea_tag_with_css_003()
15604 {
15605 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
15606                      "</head><body><textarea></textarea></body></html>"
15607 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
15608                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
15609                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
15610                        "<head></head><body><textarea style=\"-wap-input-format:&quot;*&lt;ja:en&gt;&quot;;\"></textarea></body></html>"
15611   char  *ret;
15612   char  *tmp;
15613   device_table spec;
15614   chxjconvrule_entry entry;
15615   cookie_t cookie;
15616   apr_size_t destlen;
15617   APR_INIT;
15618   chxj_serf_get = test_chxj_serf_get006;
15619   call_check = 0;
15620
15621   COOKIE_INIT(cookie);
15622
15623   SPEC_INIT(spec);
15624   destlen = sizeof(TEST_STRING)-1;
15625   entry.action |= CONVRULE_CSS_ON_BIT;
15626
15627   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15628   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15629   ret = chxj_rencoding(&r, ret, &destlen);
15630   CU_ASSERT(ret != NULL);
15631   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15632   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15633   CU_ASSERT(call_check == 1);
15634
15635   APR_TERM;
15636 #undef TEST_STRING
15637 #undef RESULT_STRING
15638 }
15639
15640 char *test_chxj_serf_get007(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
15641 {
15642   static char *css = "a:focus { display: none }\n"
15643                      "a:link  { display: none }\n"
15644                      "a       { display: none }\n"
15645                      "hr      { display: none }\n"
15646                      "a:visited { display:none }\n"
15647                      "textarea { -wap-input-format: &quot;*&lt;ja:n&gt;&quot;; }\n"
15648                      "br      { display: none }\n";
15649   *len = strlen(css);
15650   call_check = 1;
15651   return css;
15652 }
15653 void test_ixhtml10_textarea_tag_with_css_004()
15654 {
15655 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
15656                      "</head><body><textarea></textarea></body></html>"
15657 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
15658                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
15659                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
15660                        "<head></head><body><textarea style=\"-wap-input-format:&quot;*&lt;ja:n&gt;&quot;;\"></textarea></body></html>"
15661   char  *ret;
15662   char  *tmp;
15663   device_table spec;
15664   chxjconvrule_entry entry;
15665   cookie_t cookie;
15666   apr_size_t destlen;
15667   APR_INIT;
15668   chxj_serf_get = test_chxj_serf_get007;
15669   call_check = 0;
15670
15671   COOKIE_INIT(cookie);
15672
15673   SPEC_INIT(spec);
15674   destlen = sizeof(TEST_STRING)-1;
15675   entry.action |= CONVRULE_CSS_ON_BIT;
15676
15677   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15678   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15679   ret = chxj_rencoding(&r, ret, &destlen);
15680   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
15681   fprintf(stderr, "actual:[%s]\n", ret);
15682   CU_ASSERT(ret != NULL);
15683   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15684   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15685   CU_ASSERT(call_check == 1);
15686
15687   APR_TERM;
15688 #undef TEST_STRING
15689 #undef RESULT_STRING
15690 }
15691
15692
15693 /******************************************************************************/
15694 /* TEXTAREA with style attribute                                              */
15695 /******************************************************************************/
15696 void test_ixhtml10_textarea_tag_with_css_005()
15697 {
15698 #define  TEST_STRING "<html><head>" \
15699                      "</head><body><textarea style=\"-wap-input-format: &quot;*&lt;ja:h&gt;&quot;\"></textarea></body></html>"
15700 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
15701                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
15702                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
15703                        "<head></head><body><textarea style=\"-wap-input-format:&quot;*&lt;ja:h&gt;&quot;;\"></textarea></body></html>"
15704   char  *ret;
15705   char  *tmp;
15706   device_table spec;
15707   chxjconvrule_entry entry;
15708   cookie_t cookie;
15709   apr_size_t destlen;
15710   APR_INIT;
15711   chxj_serf_get = test_chxj_serf_get004;
15712   call_check = 0;
15713
15714   COOKIE_INIT(cookie);
15715
15716   SPEC_INIT(spec);
15717   destlen = sizeof(TEST_STRING)-1;
15718   entry.action |= CONVRULE_CSS_ON_BIT;
15719
15720   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15721   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15722   ret = chxj_rencoding(&r, ret, &destlen);
15723   CU_ASSERT(ret != NULL);
15724   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15725   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15726   CU_ASSERT(call_check == 0);
15727
15728   APR_TERM;
15729 #undef TEST_STRING
15730 #undef RESULT_STRING
15731 }
15732 void test_ixhtml10_textarea_tag_with_css_006()
15733 {
15734 #define  TEST_STRING "<html><head>" \
15735                      "</head><body><textarea style=\"-wap-input-format: &quot;*&lt;ja:hk&gt;&quot;\"></textarea></body></html>"
15736 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
15737                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
15738                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
15739                        "<head></head><body><textarea style=\"-wap-input-format:&quot;*&lt;ja:hk&gt;&quot;;\"></textarea></body></html>"
15740   char  *ret;
15741   char  *tmp;
15742   device_table spec;
15743   chxjconvrule_entry entry;
15744   cookie_t cookie;
15745   apr_size_t destlen;
15746   APR_INIT;
15747   chxj_serf_get = test_chxj_serf_get005;
15748   call_check = 0;
15749
15750   COOKIE_INIT(cookie);
15751
15752   SPEC_INIT(spec);
15753   destlen = sizeof(TEST_STRING)-1;
15754   entry.action |= CONVRULE_CSS_ON_BIT;
15755
15756   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15757   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15758   ret = chxj_rencoding(&r, ret, &destlen);
15759   CU_ASSERT(ret != NULL);
15760   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15761   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15762   CU_ASSERT(call_check == 0);
15763   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
15764   fprintf(stderr, "actual:[%s]\n", ret);
15765
15766   APR_TERM;
15767 #undef TEST_STRING
15768 #undef RESULT_STRING
15769 }
15770
15771 void test_ixhtml10_textarea_tag_with_css_007()
15772 {
15773 #define  TEST_STRING "<html><head>" \
15774                      "</head><body><textarea style=\"-wap-input-format: &quot;*&lt;ja:en&gt;&quot;;\"></textarea></body></html>"
15775 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
15776                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
15777                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
15778                        "<head></head><body><textarea style=\"-wap-input-format:&quot;*&lt;ja:en&gt;&quot;;\"></textarea></body></html>"
15779   char  *ret;
15780   char  *tmp;
15781   device_table spec;
15782   chxjconvrule_entry entry;
15783   cookie_t cookie;
15784   apr_size_t destlen;
15785   APR_INIT;
15786   chxj_serf_get = test_chxj_serf_get006;
15787   call_check = 0;
15788
15789   COOKIE_INIT(cookie);
15790
15791   SPEC_INIT(spec);
15792   destlen = sizeof(TEST_STRING)-1;
15793   entry.action |= CONVRULE_CSS_ON_BIT;
15794
15795   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15796   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15797   ret = chxj_rencoding(&r, ret, &destlen);
15798   CU_ASSERT(ret != NULL);
15799   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15800   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15801   CU_ASSERT(call_check == 0);
15802
15803   APR_TERM;
15804 #undef TEST_STRING
15805 #undef RESULT_STRING
15806 }
15807
15808 void test_ixhtml10_textarea_tag_with_css_008()
15809 {
15810 #define  TEST_STRING "<html><head>" \
15811                      "</head><body><textarea style=\"-wap-input-format: &quot;*&lt;ja:n&gt;&quot;;\"></textarea></body></html>"
15812 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
15813                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
15814                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
15815                        "<head></head><body><textarea style=\"-wap-input-format:&quot;*&lt;ja:n&gt;&quot;;\"></textarea></body></html>"
15816   char  *ret;
15817   char  *tmp;
15818   device_table spec;
15819   chxjconvrule_entry entry;
15820   cookie_t cookie;
15821   apr_size_t destlen;
15822   APR_INIT;
15823   chxj_serf_get = test_chxj_serf_get007;
15824   call_check = 0;
15825
15826   COOKIE_INIT(cookie);
15827
15828   SPEC_INIT(spec);
15829   destlen = sizeof(TEST_STRING)-1;
15830   entry.action |= CONVRULE_CSS_ON_BIT;
15831
15832   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15833   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15834   ret = chxj_rencoding(&r, ret, &destlen);
15835   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
15836   fprintf(stderr, "actual:[%s]\n", ret);
15837   CU_ASSERT(ret != NULL);
15838   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15839   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15840   CU_ASSERT(call_check == 0);
15841
15842   APR_TERM;
15843 #undef TEST_STRING
15844 #undef RESULT_STRING
15845 }
15846
15847
15848 /*===========================================================================*/
15849 /* p with CSS                                                                */
15850 /*===========================================================================*/
15851 char *test_chxj_serf_get008(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
15852 {
15853   static char *css = "a:focus { display: none }\n"
15854                      "a:link  { display: none }\n"
15855                      "a       { display: none }\n"
15856                      "hr      { display: none }\n"
15857                      "a:visited { display:none }\n"
15858                      "p       { text-align: left }\n";
15859   *len = strlen(css);
15860   call_check = 1;
15861   return css;
15862 }
15863 void test_ixhtml10_p_tag_with_css_001()
15864 {
15865 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
15866                      "</head><body><p>あいう</p></body></html>"
15867 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
15868                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
15869                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
15870                        "<head></head><body><p style=\"text-align:left;\">あいう</p></body></html>"
15871   char  *ret;
15872   char  *tmp;
15873   device_table spec;
15874   chxjconvrule_entry entry;
15875   cookie_t cookie;
15876   apr_size_t destlen;
15877   APR_INIT;
15878   chxj_serf_get = test_chxj_serf_get008;
15879   call_check = 0;
15880
15881   COOKIE_INIT(cookie);
15882
15883   SPEC_INIT(spec);
15884   destlen = sizeof(TEST_STRING)-1;
15885   entry.action |= CONVRULE_CSS_ON_BIT;
15886
15887   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15888   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15889   ret = chxj_rencoding(&r, ret, &destlen);
15890   CU_ASSERT(ret != NULL);
15891   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15892   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15893   CU_ASSERT(call_check == 1);
15894
15895   APR_TERM;
15896 #undef TEST_STRING
15897 #undef RESULT_STRING
15898 }
15899 char *test_chxj_serf_get009(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
15900 {
15901   static char *css = "a:focus { display: none }\n"
15902                      "a:link  { display: none }\n"
15903                      "a       { display: none }\n"
15904                      "hr      { display: none }\n"
15905                      "a:visited { display:none }\n"
15906                      "p       { text-align: center }\n";
15907   *len = strlen(css);
15908   call_check = 1;
15909   return css;
15910 }
15911 void test_ixhtml10_p_tag_with_css_002()
15912 {
15913 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
15914                      "</head><body><p>あいう</p></body></html>"
15915 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
15916                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
15917                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
15918                        "<head></head><body><p style=\"text-align:center;\">あいう</p></body></html>"
15919   char  *ret;
15920   char  *tmp;
15921   device_table spec;
15922   chxjconvrule_entry entry;
15923   cookie_t cookie;
15924   apr_size_t destlen;
15925   APR_INIT;
15926   chxj_serf_get = test_chxj_serf_get009;
15927   call_check = 0;
15928
15929   COOKIE_INIT(cookie);
15930
15931   SPEC_INIT(spec);
15932   destlen = sizeof(TEST_STRING)-1;
15933   entry.action |= CONVRULE_CSS_ON_BIT;
15934
15935   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15936   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15937   ret = chxj_rencoding(&r, ret, &destlen);
15938   CU_ASSERT(ret != NULL);
15939   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15940   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15941   CU_ASSERT(call_check == 1);
15942
15943   APR_TERM;
15944 #undef TEST_STRING
15945 #undef RESULT_STRING
15946 }
15947 char *test_chxj_serf_get010(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
15948 {
15949   static char *css = "a:focus { display: none }\n"
15950                      "a:link  { display: none }\n"
15951                      "a       { display: none }\n"
15952                      "hr      { display: none }\n"
15953                      "a:visited { display:none }\n"
15954                      "p       { text-align: right }\n";
15955   *len = strlen(css);
15956   call_check = 1;
15957   return css;
15958 }
15959 void test_ixhtml10_p_tag_with_css_003()
15960 {
15961 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
15962                      "</head><body><p>あいう</p></body></html>"
15963 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
15964                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
15965                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
15966                        "<head></head><body><p style=\"text-align:right;\">あいう</p></body></html>"
15967   char  *ret;
15968   char  *tmp;
15969   device_table spec;
15970   chxjconvrule_entry entry;
15971   cookie_t cookie;
15972   apr_size_t destlen;
15973   APR_INIT;
15974   chxj_serf_get = test_chxj_serf_get010;
15975   call_check = 0;
15976
15977   COOKIE_INIT(cookie);
15978
15979   SPEC_INIT(spec);
15980   destlen = sizeof(TEST_STRING)-1;
15981   entry.action |= CONVRULE_CSS_ON_BIT;
15982
15983   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
15984   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
15985   ret = chxj_rencoding(&r, ret, &destlen);
15986   CU_ASSERT(ret != NULL);
15987   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
15988   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
15989   CU_ASSERT(call_check == 1);
15990
15991   APR_TERM;
15992 #undef TEST_STRING
15993 #undef RESULT_STRING
15994 }
15995
15996 void test_ixhtml10_p_tag_with_css_004()
15997 {
15998 #define  TEST_STRING "<html><head>" \
15999                      "</head><body><p style=\"text-align: left\">あいう</p></body></html>"
16000 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16001                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16002                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16003                        "<head></head><body><p style=\"text-align:left;\">あいう</p></body></html>"
16004   char  *ret;
16005   char  *tmp;
16006   device_table spec;
16007   chxjconvrule_entry entry;
16008   cookie_t cookie;
16009   apr_size_t destlen;
16010   APR_INIT;
16011   chxj_serf_get = test_chxj_serf_get010;
16012   call_check = 0;
16013
16014   COOKIE_INIT(cookie);
16015
16016   SPEC_INIT(spec);
16017   destlen = sizeof(TEST_STRING)-1;
16018   entry.action |= CONVRULE_CSS_ON_BIT;
16019
16020   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16021   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16022   ret = chxj_rencoding(&r, ret, &destlen);
16023   CU_ASSERT(ret != NULL);
16024   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16025   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16026   CU_ASSERT(call_check == 0);
16027
16028   APR_TERM;
16029 #undef TEST_STRING
16030 #undef RESULT_STRING
16031 }
16032 void test_ixhtml10_p_tag_with_css_005()
16033 {
16034 #define  TEST_STRING "<html><head>" \
16035                      "</head><body><p style=\"text-align: center\">あいう</p></body></html>"
16036 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16037                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16038                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16039                        "<head></head><body><p style=\"text-align:center;\">あいう</p></body></html>"
16040   char  *ret;
16041   char  *tmp;
16042   device_table spec;
16043   chxjconvrule_entry entry;
16044   cookie_t cookie;
16045   apr_size_t destlen;
16046   APR_INIT;
16047   chxj_serf_get = test_chxj_serf_get010;
16048   call_check = 0;
16049
16050   COOKIE_INIT(cookie);
16051
16052   SPEC_INIT(spec);
16053   destlen = sizeof(TEST_STRING)-1;
16054   entry.action |= CONVRULE_CSS_ON_BIT;
16055
16056   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16057   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16058   ret = chxj_rencoding(&r, ret, &destlen);
16059   CU_ASSERT(ret != NULL);
16060   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16061   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16062   CU_ASSERT(call_check == 0);
16063
16064   APR_TERM;
16065 #undef TEST_STRING
16066 #undef RESULT_STRING
16067 }
16068 void test_ixhtml10_p_tag_with_css_006()
16069 {
16070 #define  TEST_STRING "<html><head>" \
16071                      "</head><body><p style=\"text-align: right\">あいう</p></body></html>"
16072 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16073                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16074                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16075                        "<head></head><body><p style=\"text-align:right;\">あいう</p></body></html>"
16076   char  *ret;
16077   char  *tmp;
16078   device_table spec;
16079   chxjconvrule_entry entry;
16080   cookie_t cookie;
16081   apr_size_t destlen;
16082   APR_INIT;
16083   chxj_serf_get = test_chxj_serf_get010;
16084   call_check = 0;
16085
16086   COOKIE_INIT(cookie);
16087
16088   SPEC_INIT(spec);
16089   destlen = sizeof(TEST_STRING)-1;
16090   entry.action |= CONVRULE_CSS_ON_BIT;
16091
16092   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16093   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16094   ret = chxj_rencoding(&r, ret, &destlen);
16095   CU_ASSERT(ret != NULL);
16096   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16097   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16098   CU_ASSERT(call_check == 0);
16099
16100   APR_TERM;
16101 #undef TEST_STRING
16102 #undef RESULT_STRING
16103 }
16104 void test_ixhtml10_p_tag_with_css_007()
16105 {
16106 #define  TEST_STRING "<html><head>" \
16107                      "</head><body><p style=\"text-align: right\"><p>あいう</p></p></body></html>"
16108 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16109                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16110                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16111                        "<head></head><body><p style=\"text-align:right;\"><p style=\"text-align:right;\">あいう</p></p></body></html>"
16112   char  *ret;
16113   char  *tmp;
16114   device_table spec;
16115   chxjconvrule_entry entry;
16116   cookie_t cookie;
16117   apr_size_t destlen;
16118   APR_INIT;
16119   chxj_serf_get = test_chxj_serf_get010;
16120   call_check = 0;
16121
16122   COOKIE_INIT(cookie);
16123
16124   SPEC_INIT(spec);
16125   destlen = sizeof(TEST_STRING)-1;
16126   entry.action |= CONVRULE_CSS_ON_BIT;
16127
16128   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16129   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16130   ret = chxj_rencoding(&r, ret, &destlen);
16131   CU_ASSERT(ret != NULL);
16132   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16133   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16134   CU_ASSERT(call_check == 0);
16135
16136   APR_TERM;
16137 #undef TEST_STRING
16138 #undef RESULT_STRING
16139 }
16140 /*=======================*/
16141 /* p with color property */
16142 /*=======================*/
16143 char *test_chxj_serf_get011(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
16144 {
16145   static char *css = "a:focus { display: none }\n"
16146                      "a:link  { display: none }\n"
16147                      "a       { display: none }\n"
16148                      "hr      { display: none }\n"
16149                      "a:visited { display:none }\n"
16150                      "p       { color: #ff0000 }\n";
16151   *len = strlen(css);
16152   call_check = 1;
16153   return css;
16154 }
16155 void test_ixhtml10_p_tag_with_css_008()
16156 {
16157 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
16158                      "</head><body><p>あいう</p></body></html>"
16159 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16160                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16161                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16162                        "<head></head><body><p style=\"color:#ff0000;\">あいう</p></body></html>"
16163   char  *ret;
16164   char  *tmp;
16165   device_table spec;
16166   chxjconvrule_entry entry;
16167   cookie_t cookie;
16168   apr_size_t destlen;
16169   APR_INIT;
16170   chxj_serf_get = test_chxj_serf_get011;
16171   call_check = 0;
16172
16173   COOKIE_INIT(cookie);
16174
16175   SPEC_INIT(spec);
16176   destlen = sizeof(TEST_STRING)-1;
16177   entry.action |= CONVRULE_CSS_ON_BIT;
16178
16179   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16180   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16181   ret = chxj_rencoding(&r, ret, &destlen);
16182   CU_ASSERT(ret != NULL);
16183   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16184   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16185   CU_ASSERT(call_check == 1);
16186
16187   APR_TERM;
16188 #undef TEST_STRING
16189 #undef RESULT_STRING
16190 }
16191 char *test_chxj_serf_get012(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
16192 {
16193   static char *css = "a:focus { display: none }\n"
16194                      "a:link  { display: none }\n"
16195                      "a       { display: none }\n"
16196                      "hr      { display: none }\n"
16197                      "a:visited { display:none }\n"
16198                      "p       { color: rgb(100%, 100%, 100%) }\n";
16199   *len = strlen(css);
16200   call_check = 1;
16201   return css;
16202 }
16203 void test_ixhtml10_p_tag_with_css_009()
16204 {
16205 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
16206                      "</head><body><p>あいう</p></body></html>"
16207 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16208                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16209                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16210                        "<head></head><body><p style=\"color:#ffffff;\">あいう</p></body></html>"
16211   char  *ret;
16212   char  *tmp;
16213   device_table spec;
16214   chxjconvrule_entry entry;
16215   cookie_t cookie;
16216   apr_size_t destlen;
16217   APR_INIT;
16218   chxj_serf_get = test_chxj_serf_get012;
16219   call_check = 0;
16220
16221   COOKIE_INIT(cookie);
16222
16223   SPEC_INIT(spec);
16224   destlen = sizeof(TEST_STRING)-1;
16225   entry.action |= CONVRULE_CSS_ON_BIT;
16226
16227   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16228   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16229   ret = chxj_rencoding(&r, ret, &destlen);
16230   CU_ASSERT(ret != NULL);
16231   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16232   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16233   CU_ASSERT(call_check == 1);
16234
16235   APR_TERM;
16236 #undef TEST_STRING
16237 #undef RESULT_STRING
16238 }
16239 void test_ixhtml10_p_tag_with_css_010()
16240 {
16241 #define  TEST_STRING "<html><head>" \
16242                      "</head><body><p style=\"color: #ff0000\">あいう</p></body></html>"
16243 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16244                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16245                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16246                         "<head></head><body><p style=\"color:#ff0000;\">あいう</p></body></html>"
16247   char  *ret;
16248   char  *tmp;
16249   device_table spec;
16250   chxjconvrule_entry entry;
16251   cookie_t cookie;
16252   apr_size_t destlen;
16253   APR_INIT;
16254   chxj_serf_get = test_chxj_serf_get011;
16255   call_check = 0;
16256
16257   COOKIE_INIT(cookie);
16258
16259   SPEC_INIT(spec);
16260   destlen = sizeof(TEST_STRING)-1;
16261   entry.action |= CONVRULE_CSS_ON_BIT;
16262
16263   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16264   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16265   ret = chxj_rencoding(&r, ret, &destlen);
16266   CU_ASSERT(ret != NULL);
16267   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16268   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16269   CU_ASSERT(call_check == 0);
16270
16271   APR_TERM;
16272 #undef TEST_STRING
16273 #undef RESULT_STRING
16274 }
16275 void test_ixhtml10_p_tag_with_css_011()
16276 {
16277 #define  TEST_STRING "<html><head>" \
16278                      "</head><body><p style=\"color: rgb(100%, 100%, 100%)\">あいう</p></body></html>"
16279 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16280                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16281                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16282                        "<head></head><body><p style=\"color:#ffffff;\">あいう</p></body></html>"
16283   char  *ret;
16284   char  *tmp;
16285   device_table spec;
16286   chxjconvrule_entry entry;
16287   cookie_t cookie;
16288   apr_size_t destlen;
16289   APR_INIT;
16290   chxj_serf_get = test_chxj_serf_get012;
16291   call_check = 0;
16292
16293   COOKIE_INIT(cookie);
16294
16295   SPEC_INIT(spec);
16296   destlen = sizeof(TEST_STRING)-1;
16297   entry.action |= CONVRULE_CSS_ON_BIT;
16298
16299   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16300   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16301   ret = chxj_rencoding(&r, ret, &destlen);
16302   CU_ASSERT(ret != NULL);
16303   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16304   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16305   CU_ASSERT(call_check == 0);
16306
16307   APR_TERM;
16308 #undef TEST_STRING
16309 #undef RESULT_STRING
16310 }
16311 char *test_chxj_serf_get013(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
16312 {
16313   static char *css = "a:focus { display: none }\n"
16314                      "a:link  { display: none }\n"
16315                      "a       { display: none }\n"
16316                      "hr      { display: none }\n"
16317                      "a:visited { display:none }\n"
16318                      "p       { text-decoration: blink }\n";
16319   *len = strlen(css);
16320   call_check = 1;
16321   return css;
16322 }
16323 void test_ixhtml10_p_tag_with_css_012()
16324 {
16325 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
16326                      "</head><body><p>あいう</p></body></html>"
16327 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16328                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16329                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16330                        "<head></head><body><p style=\"text-decoration:blink;\">あいう</p></body></html>"
16331   char  *ret;
16332   char  *tmp;
16333   device_table spec;
16334   chxjconvrule_entry entry;
16335   cookie_t cookie;
16336   apr_size_t destlen;
16337   APR_INIT;
16338   chxj_serf_get = test_chxj_serf_get013;
16339   call_check = 0;
16340
16341   COOKIE_INIT(cookie);
16342
16343   SPEC_INIT(spec);
16344   destlen = sizeof(TEST_STRING)-1;
16345   entry.action |= CONVRULE_CSS_ON_BIT;
16346
16347   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16348   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16349   ret = chxj_rencoding(&r, ret, &destlen);
16350   CU_ASSERT(ret != NULL);
16351   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16352   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16353   CU_ASSERT(call_check == 1);
16354
16355   APR_TERM;
16356 #undef TEST_STRING
16357 #undef RESULT_STRING
16358 }
16359 void test_ixhtml10_p_tag_with_css_013()
16360 {
16361 #define  TEST_STRING "<html><head>" \
16362                      "</head><body><p style=\"text-decoration: blink\">あいう</p></body></html>"
16363 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16364                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16365                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16366                        "<head></head><body><p style=\"text-decoration:blink;\">あいう</p></body></html>"
16367   char  *ret;
16368   char  *tmp;
16369   device_table spec;
16370   chxjconvrule_entry entry;
16371   cookie_t cookie;
16372   apr_size_t destlen;
16373   APR_INIT;
16374   chxj_serf_get = test_chxj_serf_get013;
16375   call_check = 0;
16376
16377   COOKIE_INIT(cookie);
16378
16379   SPEC_INIT(spec);
16380   destlen = sizeof(TEST_STRING)-1;
16381   entry.action |= CONVRULE_CSS_ON_BIT;
16382
16383   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16384   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16385   ret = chxj_rencoding(&r, ret, &destlen);
16386   CU_ASSERT(ret != NULL);
16387   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16388   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16389   CU_ASSERT(call_check == 0);
16390
16391   APR_TERM;
16392 #undef TEST_STRING
16393 #undef RESULT_STRING
16394 }
16395
16396
16397
16398 /*===========================================================================*/
16399 /* ul tag with CSS                                                           */
16400 /*===========================================================================*/
16401 char *test_chxj_serf_get014(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
16402 {
16403   static char *css = "a:focus { display: none }\n"
16404                      "a:link  { display: none }\n"
16405                      "a       { display: none }\n"
16406                      "hr      { display: none }\n"
16407                      "a:visited { display:none }\n"
16408                      "ul      { list-style-type: disc }\n";
16409   *len = strlen(css);
16410   call_check = 1;
16411   return css;
16412 }
16413 void test_ixhtml10_ul_tag_with_css_001()
16414 {
16415 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
16416                      "</head><body><ul>あいう</ul></body></html>"
16417 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16418                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16419                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16420                         "<head></head><body><ul style=\"list-style-type:disc;\">あいう</ul></body></html>"
16421   char  *ret;
16422   char  *tmp;
16423   device_table spec;
16424   chxjconvrule_entry entry;
16425   cookie_t cookie;
16426   apr_size_t destlen;
16427   APR_INIT;
16428   chxj_serf_get = test_chxj_serf_get014;
16429   call_check = 0;
16430
16431   COOKIE_INIT(cookie);
16432
16433   SPEC_INIT(spec);
16434   destlen = sizeof(TEST_STRING)-1;
16435   entry.action |= CONVRULE_CSS_ON_BIT;
16436
16437   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16438   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16439   ret = chxj_rencoding(&r, ret, &destlen);
16440   CU_ASSERT(ret != NULL);
16441   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16442   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16443   CU_ASSERT(call_check == 1);
16444
16445   APR_TERM;
16446 #undef TEST_STRING
16447 #undef RESULT_STRING
16448 }
16449 char *test_chxj_serf_get015(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
16450 {
16451   static char *css = "a:focus { display: none }\n"
16452                      "a:link  { display: none }\n"
16453                      "a       { display: none }\n"
16454                      "hr      { display: none }\n"
16455                      "a:visited { display:none }\n"
16456                      "ul      { list-style-type: circle }\n";
16457   *len = strlen(css);
16458   call_check = 1;
16459   return css;
16460 }
16461 void test_ixhtml10_ul_tag_with_css_002()
16462 {
16463 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
16464                      "</head><body><ul>あいう</ul></body></html>"
16465 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16466                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16467                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16468                        "<head></head><body><ul style=\"list-style-type:circle;\">あいう</ul></body></html>"
16469   char  *ret;
16470   char  *tmp;
16471   device_table spec;
16472   chxjconvrule_entry entry;
16473   cookie_t cookie;
16474   apr_size_t destlen;
16475   APR_INIT;
16476   chxj_serf_get = test_chxj_serf_get015;
16477   call_check = 0;
16478
16479   COOKIE_INIT(cookie);
16480
16481   SPEC_INIT(spec);
16482   destlen = sizeof(TEST_STRING)-1;
16483   entry.action |= CONVRULE_CSS_ON_BIT;
16484
16485   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16486   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16487   ret = chxj_rencoding(&r, ret, &destlen);
16488   CU_ASSERT(ret != NULL);
16489   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16490   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16491   CU_ASSERT(call_check == 1);
16492
16493   APR_TERM;
16494 #undef TEST_STRING
16495 #undef RESULT_STRING
16496 }
16497 char *test_chxj_serf_get016(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
16498 {
16499   static char *css = "a:focus { display: none }\n"
16500                      "a:link  { display: none }\n"
16501                      "a       { display: none }\n"
16502                      "hr      { display: none }\n"
16503                      "a:visited { display:none }\n"
16504                      "ul      { list-style-type: square }\n";
16505   *len = strlen(css);
16506   call_check = 1;
16507   return css;
16508 }
16509 void test_ixhtml10_ul_tag_with_css_003()
16510 {
16511 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
16512                      "</head><body><ul>あいう</ul></body></html>"
16513 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16514                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16515                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16516                        "<head></head><body><ul style=\"list-style-type:square;\">あいう</ul></body></html>"
16517   char  *ret;
16518   char  *tmp;
16519   device_table spec;
16520   chxjconvrule_entry entry;
16521   cookie_t cookie;
16522   apr_size_t destlen;
16523   APR_INIT;
16524   chxj_serf_get = test_chxj_serf_get016;
16525   call_check = 0;
16526
16527   COOKIE_INIT(cookie);
16528
16529   SPEC_INIT(spec);
16530   destlen = sizeof(TEST_STRING)-1;
16531   entry.action |= CONVRULE_CSS_ON_BIT;
16532
16533   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16534   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16535   ret = chxj_rencoding(&r, ret, &destlen);
16536   CU_ASSERT(ret != NULL);
16537   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16538   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16539   CU_ASSERT(call_check == 1);
16540
16541   APR_TERM;
16542 #undef TEST_STRING
16543 #undef RESULT_STRING
16544 }
16545 void test_ixhtml10_ul_tag_with_css_004()
16546 {
16547 #define  TEST_STRING "<html><head>" \
16548                      "</head><body><ul style=\"list-style-type: disc\">あいう</ul></body></html>"
16549 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16550                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16551                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16552                        "<head></head><body><ul style=\"list-style-type:disc;\">あいう</ul></body></html>"
16553   char  *ret;
16554   char  *tmp;
16555   device_table spec;
16556   chxjconvrule_entry entry;
16557   cookie_t cookie;
16558   apr_size_t destlen;
16559   APR_INIT;
16560   chxj_serf_get = test_chxj_serf_get013;
16561   call_check = 0;
16562
16563   COOKIE_INIT(cookie);
16564
16565   SPEC_INIT(spec);
16566   destlen = sizeof(TEST_STRING)-1;
16567   entry.action |= CONVRULE_CSS_ON_BIT;
16568
16569   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16570   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16571   ret = chxj_rencoding(&r, ret, &destlen);
16572   CU_ASSERT(ret != NULL);
16573   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16574   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16575   CU_ASSERT(call_check == 0);
16576
16577   APR_TERM;
16578 #undef TEST_STRING
16579 #undef RESULT_STRING
16580 }
16581 void test_ixhtml10_ul_tag_with_css_005()
16582 {
16583 #define  TEST_STRING "<html><head>" \
16584                      "</head><body><ul style=\"list-style-type: circle\">あいう</ul></body></html>"
16585 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16586                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16587                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16588                        "<head></head><body><ul style=\"list-style-type:circle;\">あいう</ul></body></html>"
16589   char  *ret;
16590   char  *tmp;
16591   device_table spec;
16592   chxjconvrule_entry entry;
16593   cookie_t cookie;
16594   apr_size_t destlen;
16595   APR_INIT;
16596   chxj_serf_get = test_chxj_serf_get013;
16597   call_check = 0;
16598
16599   COOKIE_INIT(cookie);
16600
16601   SPEC_INIT(spec);
16602   destlen = sizeof(TEST_STRING)-1;
16603   entry.action |= CONVRULE_CSS_ON_BIT;
16604
16605   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16606   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16607   ret = chxj_rencoding(&r, ret, &destlen);
16608   CU_ASSERT(ret != NULL);
16609   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16610   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16611   CU_ASSERT(call_check == 0);
16612
16613   APR_TERM;
16614 #undef TEST_STRING
16615 #undef RESULT_STRING
16616 }
16617 void test_ixhtml10_ul_tag_with_css_006()
16618 {
16619 #define  TEST_STRING "<html><head>" \
16620                      "</head><body><ul style=\"list-style-type: square\">あいう</ul></body></html>"
16621 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16622                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16623                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16624                        "<head></head><body><ul style=\"list-style-type:square;\">あいう</ul></body></html>"
16625   char  *ret;
16626   char  *tmp;
16627   device_table spec;
16628   chxjconvrule_entry entry;
16629   cookie_t cookie;
16630   apr_size_t destlen;
16631   APR_INIT;
16632   chxj_serf_get = test_chxj_serf_get013;
16633   call_check = 0;
16634
16635   COOKIE_INIT(cookie);
16636
16637   SPEC_INIT(spec);
16638   destlen = sizeof(TEST_STRING)-1;
16639   entry.action |= CONVRULE_CSS_ON_BIT;
16640
16641   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16642   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16643   ret = chxj_rencoding(&r, ret, &destlen);
16644   CU_ASSERT(ret != NULL);
16645   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16646   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16647   CU_ASSERT(call_check == 0);
16648
16649   APR_TERM;
16650 #undef TEST_STRING
16651 #undef RESULT_STRING
16652 }
16653 void test_ixhtml10_ul_tag_with_css_007()
16654 {
16655 #define  TEST_STRING "<html><head>" \
16656                      "</head><body><ul type=\"disc\">あいう</ul></body></html>"
16657 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16658                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16659                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16660                        "<head></head><body><ul style=\"list-style-type:disc;\">あいう</ul></body></html>"
16661   char  *ret;
16662   char  *tmp;
16663   device_table spec;
16664   chxjconvrule_entry entry;
16665   cookie_t cookie;
16666   apr_size_t destlen;
16667   APR_INIT;
16668   chxj_serf_get = test_chxj_serf_get013;
16669   call_check = 0;
16670
16671   COOKIE_INIT(cookie);
16672
16673   SPEC_INIT(spec);
16674   destlen = sizeof(TEST_STRING)-1;
16675   entry.action |= CONVRULE_CSS_ON_BIT;
16676
16677   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16678   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16679   ret = chxj_rencoding(&r, ret, &destlen);
16680   CU_ASSERT(ret != NULL);
16681   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16682   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16683   CU_ASSERT(call_check == 0);
16684
16685   APR_TERM;
16686 #undef TEST_STRING
16687 #undef RESULT_STRING
16688 }
16689 void test_ixhtml10_ul_tag_with_css_008()
16690 {
16691 #define  TEST_STRING "<html><head>" \
16692                      "</head><body><ul type=\"circle\">あいう</ul></body></html>"
16693 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16694                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16695                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16696                        "<head></head><body><ul style=\"list-style-type:circle;\">あいう</ul></body></html>"
16697   char  *ret;
16698   char  *tmp;
16699   device_table spec;
16700   chxjconvrule_entry entry;
16701   cookie_t cookie;
16702   apr_size_t destlen;
16703   APR_INIT;
16704   chxj_serf_get = test_chxj_serf_get013;
16705   call_check = 0;
16706
16707   COOKIE_INIT(cookie);
16708
16709   SPEC_INIT(spec);
16710   destlen = sizeof(TEST_STRING)-1;
16711   entry.action |= CONVRULE_CSS_ON_BIT;
16712
16713   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16714   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16715   ret = chxj_rencoding(&r, ret, &destlen);
16716   CU_ASSERT(ret != NULL);
16717   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16718   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16719   CU_ASSERT(call_check == 0);
16720
16721   APR_TERM;
16722 #undef TEST_STRING
16723 #undef RESULT_STRING
16724 }
16725 void test_ixhtml10_ul_tag_with_css_009()
16726 {
16727 #define  TEST_STRING "<html><head>" \
16728                      "</head><body><ul type=\"square\">あいう</ul></body></html>"
16729 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16730                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16731                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16732                        "<head></head><body><ul style=\"list-style-type:square;\">あいう</ul></body></html>"
16733   char  *ret;
16734   char  *tmp;
16735   device_table spec;
16736   chxjconvrule_entry entry;
16737   cookie_t cookie;
16738   apr_size_t destlen;
16739   APR_INIT;
16740   chxj_serf_get = test_chxj_serf_get013;
16741   call_check = 0;
16742
16743   COOKIE_INIT(cookie);
16744
16745   SPEC_INIT(spec);
16746   destlen = sizeof(TEST_STRING)-1;
16747   entry.action |= CONVRULE_CSS_ON_BIT;
16748
16749   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16750   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16751   ret = chxj_rencoding(&r, ret, &destlen);
16752   CU_ASSERT(ret != NULL);
16753   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16754   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16755   CU_ASSERT(call_check == 0);
16756
16757   APR_TERM;
16758 #undef TEST_STRING
16759 #undef RESULT_STRING
16760 }
16761
16762
16763
16764 /*===========================================================================*/
16765 /* li tag with CSS                                                           */
16766 /*===========================================================================*/
16767 char *test_chxj_serf_get017(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
16768 {
16769   static char *css = "a:focus { display: none }\n"
16770                      "a:link  { display: none }\n"
16771                      "a       { display: none }\n"
16772                      "hr      { display: none }\n"
16773                      "a:visited { display:none }\n"
16774                      "li      { list-style-type: decimal }\n";
16775   *len = strlen(css);
16776   call_check = 1;
16777   return css;
16778 }
16779 void test_ixhtml10_li_tag_with_css_001()
16780 {
16781 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
16782                      "</head><body><ul><li>あいう</li><li>かきく</li></ul></body></html>"
16783 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16784                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16785                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16786                        "<head></head><body><ul><li style=\"list-style-type:decimal;\">あいう</li><li style=\"list-style-type:decimal;\">かきく</li></ul></body></html>"
16787   char  *ret;
16788   char  *tmp;
16789   device_table spec;
16790   chxjconvrule_entry entry;
16791   cookie_t cookie;
16792   apr_size_t destlen;
16793   APR_INIT;
16794   chxj_serf_get = test_chxj_serf_get017;
16795   call_check = 0;
16796
16797   COOKIE_INIT(cookie);
16798
16799   SPEC_INIT(spec);
16800   destlen = sizeof(TEST_STRING)-1;
16801   entry.action |= CONVRULE_CSS_ON_BIT;
16802
16803   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16804   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16805   ret = chxj_rencoding(&r, ret, &destlen);
16806   CU_ASSERT(ret != NULL);
16807   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16808   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16809   CU_ASSERT(call_check == 1);
16810
16811   APR_TERM;
16812 #undef TEST_STRING
16813 #undef RESULT_STRING
16814 }
16815 char *test_chxj_serf_get018(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
16816 {
16817   static char *css = "a:focus { display: none }\n"
16818                      "a:link  { display: none }\n"
16819                      "a       { display: none }\n"
16820                      "hr      { display: none }\n"
16821                      "a:visited { display:none }\n"
16822                      "li      { list-style-type: upper-alpha }\n";
16823   *len = strlen(css);
16824   call_check = 1;
16825   return css;
16826 }
16827 void test_ixhtml10_li_tag_with_css_002()
16828 {
16829 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
16830                      "</head><body><ul><li>あいう</li><li>かきく</li></ul></body></html>"
16831 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16832                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16833                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16834                        "<head></head><body><ul><li style=\"list-style-type:upper-alpha;\">あいう</li><li style=\"list-style-type:upper-alpha;\">かきく</li></ul></body></html>"
16835   char  *ret;
16836   char  *tmp;
16837   device_table spec;
16838   chxjconvrule_entry entry;
16839   cookie_t cookie;
16840   apr_size_t destlen;
16841   APR_INIT;
16842   chxj_serf_get = test_chxj_serf_get018;
16843   call_check = 0;
16844
16845   COOKIE_INIT(cookie);
16846
16847   SPEC_INIT(spec);
16848   destlen = sizeof(TEST_STRING)-1;
16849   entry.action |= CONVRULE_CSS_ON_BIT;
16850
16851   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16852   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16853   ret = chxj_rencoding(&r, ret, &destlen);
16854   CU_ASSERT(ret != NULL);
16855   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16856   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16857   CU_ASSERT(call_check == 1);
16858
16859   APR_TERM;
16860 #undef TEST_STRING
16861 #undef RESULT_STRING
16862 }
16863 char *test_chxj_serf_get019(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
16864 {
16865   static char *css = "a:focus { display: none }\n"
16866                      "a:link  { display: none }\n"
16867                      "a       { display: none }\n"
16868                      "hr      { display: none }\n"
16869                      "a:visited { display:none }\n"
16870                      "li      { list-style-type: lower-alpha }\n";
16871   *len = strlen(css);
16872   call_check = 1;
16873   return css;
16874 }
16875 void test_ixhtml10_li_tag_with_css_003()
16876 {
16877 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
16878                      "</head><body><ul><li>あいう</li><li>かきく</li></ul></body></html>"
16879 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16880                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16881                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16882                        "<head></head><body><ul><li style=\"list-style-type:lower-alpha;\">あいう</li><li style=\"list-style-type:lower-alpha;\">かきく</li></ul></body></html>"
16883   char  *ret;
16884   char  *tmp;
16885   device_table spec;
16886   chxjconvrule_entry entry;
16887   cookie_t cookie;
16888   apr_size_t destlen;
16889   APR_INIT;
16890   chxj_serf_get = test_chxj_serf_get019;
16891   call_check = 0;
16892
16893   COOKIE_INIT(cookie);
16894
16895   SPEC_INIT(spec);
16896   destlen = sizeof(TEST_STRING)-1;
16897   entry.action |= CONVRULE_CSS_ON_BIT;
16898
16899   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16900   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16901   ret = chxj_rencoding(&r, ret, &destlen);
16902   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
16903   fprintf(stderr, "actual:[%s]\n", ret);
16904   CU_ASSERT(ret != NULL);
16905   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16906   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16907   CU_ASSERT(call_check == 1);
16908
16909   APR_TERM;
16910 #undef TEST_STRING
16911 #undef RESULT_STRING
16912 }
16913 char *test_chxj_serf_get020(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
16914 {
16915   static char *css = "a:focus { display: none }\n"
16916                      "a:link  { display: none }\n"
16917                      "a       { display: none }\n"
16918                      "hr      { display: none }\n"
16919                      "a:visited { display:none }\n"
16920                      "li      { list-style-type: disc }\n";
16921   *len = strlen(css);
16922   call_check = 1;
16923   return css;
16924 }
16925 void test_ixhtml10_li_tag_with_css_004()
16926 {
16927 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
16928                      "</head><body><ul><li>あいう</li><li>かきく</li></ul></body></html>"
16929 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16930                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16931                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16932                        "<head></head><body><ul><li style=\"list-style-type:disc;\">あいう</li><li style=\"list-style-type:disc;\">かきく</li></ul></body></html>"
16933   char  *ret;
16934   char  *tmp;
16935   device_table spec;
16936   chxjconvrule_entry entry;
16937   cookie_t cookie;
16938   apr_size_t destlen;
16939   APR_INIT;
16940   chxj_serf_get = test_chxj_serf_get020;
16941   call_check = 0;
16942
16943   COOKIE_INIT(cookie);
16944
16945   SPEC_INIT(spec);
16946   destlen = sizeof(TEST_STRING)-1;
16947   entry.action |= CONVRULE_CSS_ON_BIT;
16948
16949   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
16950   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
16951   ret = chxj_rencoding(&r, ret, &destlen);
16952   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
16953   fprintf(stderr, "actual:[%s]\n", ret);
16954   CU_ASSERT(ret != NULL);
16955   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
16956   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
16957   CU_ASSERT(call_check == 1);
16958
16959   APR_TERM;
16960 #undef TEST_STRING
16961 #undef RESULT_STRING
16962 }
16963 char *test_chxj_serf_get021(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
16964 {
16965   static char *css = "a:focus { display: none }\n"
16966                      "a:link  { display: none }\n"
16967                      "a       { display: none }\n"
16968                      "hr      { display: none }\n"
16969                      "a:visited { display:none }\n"
16970                      "li      { list-style-type: circle }\n";
16971   *len = strlen(css);
16972   call_check = 1;
16973   return css;
16974 }
16975 void test_ixhtml10_li_tag_with_css_005()
16976 {
16977 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
16978                      "</head><body><ul><li>あいう</li><li>かきく</li></ul></body></html>"
16979 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
16980                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
16981                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
16982                        "<head></head><body><ul><li style=\"list-style-type:circle;\">あいう</li><li style=\"list-style-type:circle;\">かきく</li></ul></body></html>"
16983   char  *ret;
16984   char  *tmp;
16985   device_table spec;
16986   chxjconvrule_entry entry;
16987   cookie_t cookie;
16988   apr_size_t destlen;
16989   APR_INIT;
16990   chxj_serf_get = test_chxj_serf_get021;
16991   call_check = 0;
16992
16993   COOKIE_INIT(cookie);
16994
16995   SPEC_INIT(spec);
16996   destlen = sizeof(TEST_STRING)-1;
16997   entry.action |= CONVRULE_CSS_ON_BIT;
16998
16999   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17000   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17001   ret = chxj_rencoding(&r, ret, &destlen);
17002   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17003   fprintf(stderr, "actual:[%s]\n", ret);
17004   CU_ASSERT(ret != NULL);
17005   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17006   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17007   CU_ASSERT(call_check == 1);
17008
17009   APR_TERM;
17010 #undef TEST_STRING
17011 #undef RESULT_STRING
17012 }
17013 char *test_chxj_serf_get022(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
17014 {
17015   static char *css = "a:focus { display: none }\n"
17016                      "a:link  { display: none }\n"
17017                      "a       { display: none }\n"
17018                      "hr      { display: none }\n"
17019                      "a:visited { display:none }\n"
17020                      "li      { list-style-type: square }\n";
17021   *len = strlen(css);
17022   call_check = 1;
17023   return css;
17024 }
17025 void test_ixhtml10_li_tag_with_css_006()
17026 {
17027 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
17028                      "</head><body><ul><li>あいう</li><li>かきく</li></ul></body></html>"
17029 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17030                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17031                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17032                        "<head></head><body><ul><li style=\"list-style-type:square;\">あいう</li><li style=\"list-style-type:square;\">かきく</li></ul></body></html>"
17033   char  *ret;
17034   char  *tmp;
17035   device_table spec;
17036   chxjconvrule_entry entry;
17037   cookie_t cookie;
17038   apr_size_t destlen;
17039   APR_INIT;
17040   chxj_serf_get = test_chxj_serf_get022;
17041   call_check = 0;
17042
17043   COOKIE_INIT(cookie);
17044
17045   SPEC_INIT(spec);
17046   destlen = sizeof(TEST_STRING)-1;
17047   entry.action |= CONVRULE_CSS_ON_BIT;
17048
17049   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17050   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17051   ret = chxj_rencoding(&r, ret, &destlen);
17052   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17053   fprintf(stderr, "actual:[%s]\n", ret);
17054   CU_ASSERT(ret != NULL);
17055   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17056   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17057   CU_ASSERT(call_check == 1);
17058
17059   APR_TERM;
17060 #undef TEST_STRING
17061 #undef RESULT_STRING
17062 }
17063 void test_ixhtml10_li_tag_with_css_007()
17064 {
17065 #define  TEST_STRING "<html><head>" \
17066                      "</head><body><ul><li style=\"list-style-type: decimal\">あいう</li><li>かきく</li></ul></body></html>"
17067 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17068                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17069                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17070                        "<head></head><body><ul><li style=\"list-style-type:decimal;\">あいう</li><li>かきく</li></ul></body></html>"
17071   char  *ret;
17072   char  *tmp;
17073   device_table spec;
17074   chxjconvrule_entry entry;
17075   cookie_t cookie;
17076   apr_size_t destlen;
17077   APR_INIT;
17078   chxj_serf_get = test_chxj_serf_get022;
17079   call_check = 0;
17080
17081   COOKIE_INIT(cookie);
17082
17083   SPEC_INIT(spec);
17084   destlen = sizeof(TEST_STRING)-1;
17085   entry.action |= CONVRULE_CSS_ON_BIT;
17086
17087   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17088   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17089   ret = chxj_rencoding(&r, ret, &destlen);
17090   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17091   fprintf(stderr, "actual:[%s]\n", ret);
17092   CU_ASSERT(ret != NULL);
17093   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17094   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17095   CU_ASSERT(call_check == 0);
17096
17097   APR_TERM;
17098 #undef TEST_STRING
17099 #undef RESULT_STRING
17100 }
17101 void test_ixhtml10_li_tag_with_css_008()
17102 {
17103 #define  TEST_STRING "<html><head>" \
17104                      "</head><body><ul><li style=\"list-style-type: upper-alpha\">あいう</li><li>かきく</li></ul></body></html>"
17105 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17106                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17107                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17108                        "<head></head><body><ul><li style=\"list-style-type:upper-alpha;\">あいう</li><li>かきく</li></ul></body></html>"
17109   char  *ret;
17110   char  *tmp;
17111   device_table spec;
17112   chxjconvrule_entry entry;
17113   cookie_t cookie;
17114   apr_size_t destlen;
17115   APR_INIT;
17116   chxj_serf_get = test_chxj_serf_get022;
17117   call_check = 0;
17118
17119   COOKIE_INIT(cookie);
17120
17121   SPEC_INIT(spec);
17122   destlen = sizeof(TEST_STRING)-1;
17123   entry.action |= CONVRULE_CSS_ON_BIT;
17124
17125   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17126   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17127   ret = chxj_rencoding(&r, ret, &destlen);
17128   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17129   fprintf(stderr, "actual:[%s]\n", ret);
17130   CU_ASSERT(ret != NULL);
17131   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17132   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17133   CU_ASSERT(call_check == 0);
17134
17135   APR_TERM;
17136 #undef TEST_STRING
17137 #undef RESULT_STRING
17138 }
17139 void test_ixhtml10_li_tag_with_css_009()
17140 {
17141 #define  TEST_STRING "<html><head>" \
17142                      "</head><body><ul><li style=\"list-style-type: lower-alpha\">あいう</li><li>かきく</li></ul></body></html>"
17143 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17144                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17145                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17146                        "<head></head><body><ul><li style=\"list-style-type:lower-alpha;\">あいう</li><li>かきく</li></ul></body></html>"
17147   char  *ret;
17148   char  *tmp;
17149   device_table spec;
17150   chxjconvrule_entry entry;
17151   cookie_t cookie;
17152   apr_size_t destlen;
17153   APR_INIT;
17154   chxj_serf_get = test_chxj_serf_get022;
17155   call_check = 0;
17156
17157   COOKIE_INIT(cookie);
17158
17159   SPEC_INIT(spec);
17160   destlen = sizeof(TEST_STRING)-1;
17161   entry.action |= CONVRULE_CSS_ON_BIT;
17162
17163   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17164   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17165   ret = chxj_rencoding(&r, ret, &destlen);
17166   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17167   fprintf(stderr, "actual:[%s]\n", ret);
17168   CU_ASSERT(ret != NULL);
17169   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17170   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17171   CU_ASSERT(call_check == 0);
17172
17173   APR_TERM;
17174 #undef TEST_STRING
17175 #undef RESULT_STRING
17176 }
17177 void test_ixhtml10_li_tag_with_css_010()
17178 {
17179 #define  TEST_STRING "<html><head>" \
17180                      "</head><body><ul><li style=\"list-style-type: disc\">あいう</li><li>かきく</li></ul></body></html>"
17181 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17182                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17183                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17184                        "<head></head><body><ul><li style=\"list-style-type:disc;\">あいう</li><li>かきく</li></ul></body></html>"
17185   char  *ret;
17186   char  *tmp;
17187   device_table spec;
17188   chxjconvrule_entry entry;
17189   cookie_t cookie;
17190   apr_size_t destlen;
17191   APR_INIT;
17192   chxj_serf_get = test_chxj_serf_get022;
17193   call_check = 0;
17194
17195   COOKIE_INIT(cookie);
17196
17197   SPEC_INIT(spec);
17198   destlen = sizeof(TEST_STRING)-1;
17199   entry.action |= CONVRULE_CSS_ON_BIT;
17200
17201   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17202   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17203   ret = chxj_rencoding(&r, ret, &destlen);
17204   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17205   fprintf(stderr, "actual:[%s]\n", ret);
17206   CU_ASSERT(ret != NULL);
17207   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17208   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17209   CU_ASSERT(call_check == 0);
17210
17211   APR_TERM;
17212 #undef TEST_STRING
17213 #undef RESULT_STRING
17214 }
17215 void test_ixhtml10_li_tag_with_css_011()
17216 {
17217 #define  TEST_STRING "<html><head>" \
17218                      "</head><body><ul><li style=\"list-style-type: circle\">あいう</li><li>かきく</li></ul></body></html>"
17219 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17220                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17221                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17222                        "<head></head><body><ul><li style=\"list-style-type:circle;\">あいう</li><li>かきく</li></ul></body></html>"
17223   char  *ret;
17224   char  *tmp;
17225   device_table spec;
17226   chxjconvrule_entry entry;
17227   cookie_t cookie;
17228   apr_size_t destlen;
17229   APR_INIT;
17230   chxj_serf_get = test_chxj_serf_get022;
17231   call_check = 0;
17232
17233   COOKIE_INIT(cookie);
17234
17235   SPEC_INIT(spec);
17236   destlen = sizeof(TEST_STRING)-1;
17237   entry.action |= CONVRULE_CSS_ON_BIT;
17238
17239   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17240   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17241   ret = chxj_rencoding(&r, ret, &destlen);
17242   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17243   fprintf(stderr, "actual:[%s]\n", ret);
17244   CU_ASSERT(ret != NULL);
17245   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17246   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17247   CU_ASSERT(call_check == 0);
17248
17249   APR_TERM;
17250 #undef TEST_STRING
17251 #undef RESULT_STRING
17252 }
17253 void test_ixhtml10_li_tag_with_css_012()
17254 {
17255 #define  TEST_STRING "<html><head>" \
17256                      "</head><body><ul><li style=\"list-style-type: square\">あいう</li><li>かきく</li></ul></body></html>"
17257 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17258                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17259                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17260                        "<head></head><body><ul><li style=\"list-style-type:square;\">あいう</li><li>かきく</li></ul></body></html>"
17261   char  *ret;
17262   char  *tmp;
17263   device_table spec;
17264   chxjconvrule_entry entry;
17265   cookie_t cookie;
17266   apr_size_t destlen;
17267   APR_INIT;
17268   chxj_serf_get = test_chxj_serf_get022;
17269   call_check = 0;
17270
17271   COOKIE_INIT(cookie);
17272
17273   SPEC_INIT(spec);
17274   destlen = sizeof(TEST_STRING)-1;
17275   entry.action |= CONVRULE_CSS_ON_BIT;
17276
17277   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17278   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17279   ret = chxj_rencoding(&r, ret, &destlen);
17280   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17281   fprintf(stderr, "actual:[%s]\n", ret);
17282   CU_ASSERT(ret != NULL);
17283   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17284   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17285   CU_ASSERT(call_check == 0);
17286
17287   APR_TERM;
17288 #undef TEST_STRING
17289 #undef RESULT_STRING
17290 }
17291
17292
17293
17294
17295 /*===========================================================================*/
17296 /* ol tag with CSS                                                           */
17297 /*===========================================================================*/
17298 char *test_chxj_serf_get030(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
17299 {
17300   static char *css = "a:focus { display: none }\n"
17301                      "a:link  { display: none }\n"
17302                      "a       { display: none }\n"
17303                      "hr      { display: none }\n"
17304                      "a:visited { display:none }\n"
17305                      "ol      { list-style-type: decimal }\n";
17306   *len = strlen(css);
17307   call_check = 1;
17308   return css;
17309 }
17310 void test_ixhtml10_ol_tag_with_css_001()
17311 {
17312 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
17313                      "</head><body><ol><li>あいう</li><li>かきく</li></ul></body></html>"
17314 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17315                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17316                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17317                        "<head></head><body><ol style=\"list-style-type:decimal;\"><li style=\"list-style-type:decimal;\">あいう</li><li style=\"list-style-type:decimal;\">かきく</li></ol></body></html>"
17318   char  *ret;
17319   char  *tmp;
17320   device_table spec;
17321   chxjconvrule_entry entry;
17322   cookie_t cookie;
17323   apr_size_t destlen;
17324   APR_INIT;
17325   chxj_serf_get = test_chxj_serf_get030;
17326   call_check = 0;
17327
17328   COOKIE_INIT(cookie);
17329
17330   SPEC_INIT(spec);
17331   destlen = sizeof(TEST_STRING)-1;
17332   entry.action |= CONVRULE_CSS_ON_BIT;
17333
17334   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17335   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17336   ret = chxj_rencoding(&r, ret, &destlen);
17337   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17338   fprintf(stderr, "actual:[%s]\n", ret);
17339   CU_ASSERT(ret != NULL);
17340   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17341   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17342   CU_ASSERT(call_check == 1);
17343
17344   APR_TERM;
17345 #undef TEST_STRING
17346 #undef RESULT_STRING
17347 }
17348 char *test_chxj_serf_get031(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
17349 {
17350   static char *css = "a:focus { display: none }\n"
17351                      "a:link  { display: none }\n"
17352                      "a       { display: none }\n"
17353                      "hr      { display: none }\n"
17354                      "a:visited { display:none }\n"
17355                      "ol      { list-style-type: lower-alpha }\n";
17356   *len = strlen(css);
17357   call_check = 1;
17358   return css;
17359 }
17360 void test_ixhtml10_ol_tag_with_css_002()
17361 {
17362 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
17363                      "</head><body><ol><li>あいう</li><li>かきく</li></ul></body></html>"
17364 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17365                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17366                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17367                        "<head></head><body><ol style=\"list-style-type:lower-alpha;\"><li style=\"list-style-type:lower-alpha;\">あいう</li><li style=\"list-style-type:lower-alpha;\">かきく</li></ol></body></html>"
17368   char  *ret;
17369   char  *tmp;
17370   device_table spec;
17371   chxjconvrule_entry entry;
17372   cookie_t cookie;
17373   apr_size_t destlen;
17374   APR_INIT;
17375   chxj_serf_get = test_chxj_serf_get031;
17376   call_check = 0;
17377
17378   COOKIE_INIT(cookie);
17379
17380   SPEC_INIT(spec);
17381   destlen = sizeof(TEST_STRING)-1;
17382   entry.action |= CONVRULE_CSS_ON_BIT;
17383
17384   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17385   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17386   ret = chxj_rencoding(&r, ret, &destlen);
17387   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17388   fprintf(stderr, "actual:[%s]\n", ret);
17389   CU_ASSERT(ret != NULL);
17390   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17391   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17392   CU_ASSERT(call_check == 1);
17393
17394   APR_TERM;
17395 #undef TEST_STRING
17396 #undef RESULT_STRING
17397 }
17398 char *test_chxj_serf_get032(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
17399 {
17400   static char *css = "a:focus { display: none }\n"
17401                      "a:link  { display: none }\n"
17402                      "a       { display: none }\n"
17403                      "hr      { display: none }\n"
17404                      "a:visited { display:none }\n"
17405                      "ol      { list-style-type: upper-alpha }\n";
17406   *len = strlen(css);
17407   call_check = 1;
17408   return css;
17409 }
17410 void test_ixhtml10_ol_tag_with_css_003()
17411 {
17412 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
17413                      "</head><body><ol><li>あいう</li><li>かきく</li></ul></body></html>"
17414 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17415                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17416                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17417                        "<head></head><body><ol style=\"list-style-type:upper-alpha;\"><li style=\"list-style-type:upper-alpha;\">あいう</li><li style=\"list-style-type:upper-alpha;\">かきく</li></ol></body></html>"
17418   char  *ret;
17419   char  *tmp;
17420   device_table spec;
17421   chxjconvrule_entry entry;
17422   cookie_t cookie;
17423   apr_size_t destlen;
17424   APR_INIT;
17425   chxj_serf_get = test_chxj_serf_get032;
17426   call_check = 0;
17427
17428   COOKIE_INIT(cookie);
17429
17430   SPEC_INIT(spec);
17431   destlen = sizeof(TEST_STRING)-1;
17432   entry.action |= CONVRULE_CSS_ON_BIT;
17433
17434   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17435   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17436   ret = chxj_rencoding(&r, ret, &destlen);
17437   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17438   fprintf(stderr, "actual:[%s]\n", ret);
17439   CU_ASSERT(ret != NULL);
17440   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17441   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17442   CU_ASSERT(call_check == 1);
17443
17444   APR_TERM;
17445 #undef TEST_STRING
17446 #undef RESULT_STRING
17447 }
17448 void test_ixhtml10_ol_tag_with_css_004()
17449 {
17450 #define  TEST_STRING "<html><head>" \
17451                      "</head><body><ol style=\"list-style-type:decimal\"><li>あいう</li><li>かきく</li></ul></body></html>"
17452 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17453                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17454                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17455                        "<head></head><body><ol style=\"list-style-type:decimal;\"><li style=\"list-style-type:decimal;\">あいう</li><li style=\"list-style-type:decimal;\">かきく</li></ol></body></html>"
17456   char  *ret;
17457   char  *tmp;
17458   device_table spec;
17459   chxjconvrule_entry entry;
17460   cookie_t cookie;
17461   apr_size_t destlen;
17462   APR_INIT;
17463   chxj_serf_get = test_chxj_serf_get032;
17464   call_check = 0;
17465
17466   COOKIE_INIT(cookie);
17467
17468   SPEC_INIT(spec);
17469   destlen = sizeof(TEST_STRING)-1;
17470   entry.action |= CONVRULE_CSS_ON_BIT;
17471
17472   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17473   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17474   ret = chxj_rencoding(&r, ret, &destlen);
17475   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17476   fprintf(stderr, "actual:[%s]\n", ret);
17477   CU_ASSERT(ret != NULL);
17478   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17479   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17480   CU_ASSERT(call_check == 0);
17481
17482   APR_TERM;
17483 #undef TEST_STRING
17484 #undef RESULT_STRING
17485 }
17486 void test_ixhtml10_ol_tag_with_css_005()
17487 {
17488 #define  TEST_STRING "<html><head>" \
17489                      "</head><body><ol style=\"list-style-type:lower-alpha\"><li>あいう</li><li>かきく</li></ul></body></html>"
17490 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17491                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17492                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17493                        "<head></head><body><ol style=\"list-style-type:lower-alpha;\"><li style=\"list-style-type:lower-alpha;\">あいう</li><li style=\"list-style-type:lower-alpha;\">かきく</li></ol></body></html>"
17494   char  *ret;
17495   char  *tmp;
17496   device_table spec;
17497   chxjconvrule_entry entry;
17498   cookie_t cookie;
17499   apr_size_t destlen;
17500   APR_INIT;
17501   chxj_serf_get = test_chxj_serf_get032;
17502   call_check = 0;
17503
17504   COOKIE_INIT(cookie);
17505
17506   SPEC_INIT(spec);
17507   destlen = sizeof(TEST_STRING)-1;
17508   entry.action |= CONVRULE_CSS_ON_BIT;
17509
17510   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17511   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17512   ret = chxj_rencoding(&r, ret, &destlen);
17513   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17514   fprintf(stderr, "actual:[%s]\n", ret);
17515   CU_ASSERT(ret != NULL);
17516   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17517   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17518   CU_ASSERT(call_check == 0);
17519
17520   APR_TERM;
17521 #undef TEST_STRING
17522 #undef RESULT_STRING
17523 }
17524 void test_ixhtml10_ol_tag_with_css_006()
17525 {
17526 #define  TEST_STRING "<html><head>" \
17527                      "</head><body><ol style=\"list-style-type:upper-alpha\"><li>あいう</li><li>かきく</li></ul></body></html>"
17528 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17529                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17530                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17531                        "<head></head><body><ol style=\"list-style-type:upper-alpha;\"><li style=\"list-style-type:upper-alpha;\">あいう</li><li style=\"list-style-type:upper-alpha;\">かきく</li></ol></body></html>"
17532   char  *ret;
17533   char  *tmp;
17534   device_table spec;
17535   chxjconvrule_entry entry;
17536   cookie_t cookie;
17537   apr_size_t destlen;
17538   APR_INIT;
17539   chxj_serf_get = test_chxj_serf_get032;
17540   call_check = 0;
17541
17542   COOKIE_INIT(cookie);
17543
17544   SPEC_INIT(spec);
17545   destlen = sizeof(TEST_STRING)-1;
17546   entry.action |= CONVRULE_CSS_ON_BIT;
17547
17548   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17549   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17550   ret = chxj_rencoding(&r, ret, &destlen);
17551   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17552   fprintf(stderr, "actual:[%s]\n", ret);
17553   CU_ASSERT(ret != NULL);
17554   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17555   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17556   CU_ASSERT(call_check == 0);
17557
17558   APR_TERM;
17559 #undef TEST_STRING
17560 #undef RESULT_STRING
17561 }
17562
17563
17564 /*===========================================================================*/
17565 /* h1 tag with CSS                                                           */
17566 /*===========================================================================*/
17567 char *test_chxj_serf_get040(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
17568 {
17569   static char *css = "a:focus { display: none }\n"
17570                      "a:link  { display: none }\n"
17571                      "a       { display: none }\n"
17572                      "hr      { display: none }\n"
17573                      "a:visited { display:none }\n"
17574                      "h1      { text-align: right }\n";
17575   *len = strlen(css);
17576   call_check = 1;
17577   return css;
17578 }
17579 void test_ixhtml10_h1_tag_with_css_001()
17580 {
17581 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
17582                      "</head><body><h1>あいう</h1></body></html>"
17583 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17584                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17585                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17586                        "<head></head><body><h1 style=\"text-align:right;\">あいう</h1></body></html>"
17587   char  *ret;
17588   char  *tmp;
17589   device_table spec;
17590   chxjconvrule_entry entry;
17591   cookie_t cookie;
17592   apr_size_t destlen;
17593   APR_INIT;
17594   chxj_serf_get = test_chxj_serf_get040;
17595   call_check = 0;
17596
17597   COOKIE_INIT(cookie);
17598
17599   SPEC_INIT(spec);
17600   destlen = sizeof(TEST_STRING)-1;
17601   entry.action |= CONVRULE_CSS_ON_BIT;
17602
17603   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17604   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17605   ret = chxj_rencoding(&r, ret, &destlen);
17606   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17607   fprintf(stderr, "actual:[%s]\n", ret);
17608   CU_ASSERT(ret != NULL);
17609   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17610   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17611   CU_ASSERT(call_check == 1);
17612
17613   APR_TERM;
17614 #undef TEST_STRING
17615 #undef RESULT_STRING
17616 }
17617 char *test_chxj_serf_get041(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
17618 {
17619   static char *css = "a:focus { display: none }\n"
17620                      "a:link  { display: none }\n"
17621                      "a       { display: none }\n"
17622                      "hr      { display: none }\n"
17623                      "a:visited { display:none }\n"
17624                      "h1      { text-align: center }\n";
17625   *len = strlen(css);
17626   call_check = 1;
17627   return css;
17628 }
17629 void test_ixhtml10_h1_tag_with_css_002()
17630 {
17631 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
17632                      "</head><body><h1>あいう</h1></body></html>"
17633 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17634                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17635                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17636                        "<head></head><body><h1 style=\"text-align:center;\">あいう</h1></body></html>"
17637   char  *ret;
17638   char  *tmp;
17639   device_table spec;
17640   chxjconvrule_entry entry;
17641   cookie_t cookie;
17642   apr_size_t destlen;
17643   APR_INIT;
17644   chxj_serf_get = test_chxj_serf_get041;
17645   call_check = 0;
17646
17647   COOKIE_INIT(cookie);
17648
17649   SPEC_INIT(spec);
17650   destlen = sizeof(TEST_STRING)-1;
17651   entry.action |= CONVRULE_CSS_ON_BIT;
17652
17653   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17654   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17655   ret = chxj_rencoding(&r, ret, &destlen);
17656   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17657   fprintf(stderr, "actual:[%s]\n", ret);
17658   CU_ASSERT(ret != NULL);
17659   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17660   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17661   CU_ASSERT(call_check == 1);
17662
17663   APR_TERM;
17664 #undef TEST_STRING
17665 #undef RESULT_STRING
17666 }
17667 char *test_chxj_serf_get042(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
17668 {
17669   static char *css = "a:focus { display: none }\n"
17670                      "a:link  { display: none }\n"
17671                      "a       { display: none }\n"
17672                      "hr      { display: none }\n"
17673                      "a:visited { display:none }\n"
17674                      "h1      { text-align: right }\n";
17675   *len = strlen(css);
17676   call_check = 1;
17677   return css;
17678 }
17679 void test_ixhtml10_h1_tag_with_css_003()
17680 {
17681 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
17682                      "</head><body><h1>あいう</h1></body></html>"
17683 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17684                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17685                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17686                        "<head></head><body><h1 style=\"text-align:right;\">あいう</h1></body></html>"
17687   char  *ret;
17688   char  *tmp;
17689   device_table spec;
17690   chxjconvrule_entry entry;
17691   cookie_t cookie;
17692   apr_size_t destlen;
17693   APR_INIT;
17694   chxj_serf_get = test_chxj_serf_get042;
17695   call_check = 0;
17696
17697   COOKIE_INIT(cookie);
17698
17699   SPEC_INIT(spec);
17700   destlen = sizeof(TEST_STRING)-1;
17701   entry.action |= CONVRULE_CSS_ON_BIT;
17702
17703   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17704   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17705   ret = chxj_rencoding(&r, ret, &destlen);
17706   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17707   fprintf(stderr, "actual:[%s]\n", ret);
17708   CU_ASSERT(ret != NULL);
17709   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17710   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17711   CU_ASSERT(call_check == 1);
17712
17713   APR_TERM;
17714 #undef TEST_STRING
17715 #undef RESULT_STRING
17716 }
17717 void test_ixhtml10_h1_tag_with_css_004()
17718 {
17719 #define  TEST_STRING "<html><head>" \
17720                      "</head><body><h1 style=\"text-align: left\">あいう</h1></body></html>"
17721 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17722                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17723                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17724                        "<head></head><body><h1 style=\"text-align:left;\">あいう</h1></body></html>"
17725   char  *ret;
17726   char  *tmp;
17727   device_table spec;
17728   chxjconvrule_entry entry;
17729   cookie_t cookie;
17730   apr_size_t destlen;
17731   APR_INIT;
17732   chxj_serf_get = test_chxj_serf_get042;
17733   call_check = 0;
17734
17735   COOKIE_INIT(cookie);
17736
17737   SPEC_INIT(spec);
17738   destlen = sizeof(TEST_STRING)-1;
17739   entry.action |= CONVRULE_CSS_ON_BIT;
17740
17741   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17742   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17743   ret = chxj_rencoding(&r, ret, &destlen);
17744   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17745   fprintf(stderr, "actual:[%s]\n", ret);
17746   CU_ASSERT(ret != NULL);
17747   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17748   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17749   CU_ASSERT(call_check == 0);
17750
17751   APR_TERM;
17752 #undef TEST_STRING
17753 #undef RESULT_STRING
17754 }
17755 void test_ixhtml10_h1_tag_with_css_005()
17756 {
17757 #define  TEST_STRING "<html><head>" \
17758                      "</head><body><h1 style=\"text-align: center\">あいう</h1></body></html>"
17759 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17760                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17761                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17762                        "<head></head><body><h1 style=\"text-align:center;\">あいう</h1></body></html>"
17763   char  *ret;
17764   char  *tmp;
17765   device_table spec;
17766   chxjconvrule_entry entry;
17767   cookie_t cookie;
17768   apr_size_t destlen;
17769   APR_INIT;
17770   chxj_serf_get = test_chxj_serf_get042;
17771   call_check = 0;
17772
17773   COOKIE_INIT(cookie);
17774
17775   SPEC_INIT(spec);
17776   destlen = sizeof(TEST_STRING)-1;
17777   entry.action |= CONVRULE_CSS_ON_BIT;
17778
17779   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17780   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17781   ret = chxj_rencoding(&r, ret, &destlen);
17782   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17783   fprintf(stderr, "actual:[%s]\n", ret);
17784   CU_ASSERT(ret != NULL);
17785   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17786   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17787   CU_ASSERT(call_check == 0);
17788
17789   APR_TERM;
17790 #undef TEST_STRING
17791 #undef RESULT_STRING
17792 }
17793 void test_ixhtml10_h1_tag_with_css_006()
17794 {
17795 #define  TEST_STRING "<html><head>" \
17796                      "</head><body><h1 style=\"text-align: right\">あいう</h1></body></html>"
17797 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17798                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17799                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17800                        "<head></head><body><h1 style=\"text-align:right;\">あいう</h1></body></html>"
17801   char  *ret;
17802   char  *tmp;
17803   device_table spec;
17804   chxjconvrule_entry entry;
17805   cookie_t cookie;
17806   apr_size_t destlen;
17807   APR_INIT;
17808   chxj_serf_get = test_chxj_serf_get042;
17809   call_check = 0;
17810
17811   COOKIE_INIT(cookie);
17812
17813   SPEC_INIT(spec);
17814   destlen = sizeof(TEST_STRING)-1;
17815   entry.action |= CONVRULE_CSS_ON_BIT;
17816
17817   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17818   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17819   ret = chxj_rencoding(&r, ret, &destlen);
17820   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17821   fprintf(stderr, "actual:[%s]\n", ret);
17822   CU_ASSERT(ret != NULL);
17823   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17824   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17825   CU_ASSERT(call_check == 0);
17826
17827   APR_TERM;
17828 #undef TEST_STRING
17829 #undef RESULT_STRING
17830 }
17831
17832
17833
17834 /*===========================================================================*/
17835 /* h2 tag with CSS                                                           */
17836 /*===========================================================================*/
17837 char *test_chxj_serf_get043(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
17838 {
17839   static char *css = "a:focus { display: none }\n"
17840                      "a:link  { display: none }\n"
17841                      "a       { display: none }\n"
17842                      "hr      { display: none }\n"
17843                      "a:visited { display:none }\n"
17844                      "h2      { text-align: right }\n";
17845   *len = strlen(css);
17846   call_check = 1;
17847   return css;
17848 }
17849 void test_ixhtml10_h2_tag_with_css_001()
17850 {
17851 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
17852                      "</head><body><h2>あいう</h2></body></html>"
17853 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17854                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17855                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17856                        "<head></head><body><h2 style=\"text-align:right;\">あいう</h2></body></html>"
17857   char  *ret;
17858   char  *tmp;
17859   device_table spec;
17860   chxjconvrule_entry entry;
17861   cookie_t cookie;
17862   apr_size_t destlen;
17863   APR_INIT;
17864   chxj_serf_get = test_chxj_serf_get043;
17865   call_check = 0;
17866
17867   COOKIE_INIT(cookie);
17868
17869   SPEC_INIT(spec);
17870   destlen = sizeof(TEST_STRING)-1;
17871   entry.action |= CONVRULE_CSS_ON_BIT;
17872
17873   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17874   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17875   ret = chxj_rencoding(&r, ret, &destlen);
17876   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17877   fprintf(stderr, "actual:[%s]\n", ret);
17878   CU_ASSERT(ret != NULL);
17879   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17880   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17881   CU_ASSERT(call_check == 1);
17882
17883   APR_TERM;
17884 #undef TEST_STRING
17885 #undef RESULT_STRING
17886 }
17887 char *test_chxj_serf_get044(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
17888 {
17889   static char *css = "a:focus { display: none }\n"
17890                      "a:link  { display: none }\n"
17891                      "a       { display: none }\n"
17892                      "hr      { display: none }\n"
17893                      "a:visited { display:none }\n"
17894                      "h2      { text-align: center }\n";
17895   *len = strlen(css);
17896   call_check = 1;
17897   return css;
17898 }
17899 void test_ixhtml10_h2_tag_with_css_002()
17900 {
17901 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
17902                      "</head><body><h2>あいう</h2></body></html>"
17903 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17904                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17905                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17906                        "<head></head><body><h2 style=\"text-align:center;\">あいう</h2></body></html>"
17907   char  *ret;
17908   char  *tmp;
17909   device_table spec;
17910   chxjconvrule_entry entry;
17911   cookie_t cookie;
17912   apr_size_t destlen;
17913   APR_INIT;
17914   chxj_serf_get = test_chxj_serf_get044;
17915   call_check = 0;
17916
17917   COOKIE_INIT(cookie);
17918
17919   SPEC_INIT(spec);
17920   destlen = sizeof(TEST_STRING)-1;
17921   entry.action |= CONVRULE_CSS_ON_BIT;
17922
17923   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17924   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17925   ret = chxj_rencoding(&r, ret, &destlen);
17926   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17927   fprintf(stderr, "actual:[%s]\n", ret);
17928   CU_ASSERT(ret != NULL);
17929   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17930   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17931   CU_ASSERT(call_check == 1);
17932
17933   APR_TERM;
17934 #undef TEST_STRING
17935 #undef RESULT_STRING
17936 }
17937 char *test_chxj_serf_get045(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
17938 {
17939   static char *css = "a:focus { display: none }\n"
17940                      "a:link  { display: none }\n"
17941                      "a       { display: none }\n"
17942                      "hr      { display: none }\n"
17943                      "a:visited { display:none }\n"
17944                      "h2      { text-align: right }\n";
17945   *len = strlen(css);
17946   call_check = 1;
17947   return css;
17948 }
17949 void test_ixhtml10_h2_tag_with_css_003()
17950 {
17951 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
17952                      "</head><body><h2>あいう</h2></body></html>"
17953 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17954                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17955                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17956                        "<head></head><body><h2 style=\"text-align:right;\">あいう</h2></body></html>"
17957   char  *ret;
17958   char  *tmp;
17959   device_table spec;
17960   chxjconvrule_entry entry;
17961   cookie_t cookie;
17962   apr_size_t destlen;
17963   APR_INIT;
17964   chxj_serf_get = test_chxj_serf_get045;
17965   call_check = 0;
17966
17967   COOKIE_INIT(cookie);
17968
17969   SPEC_INIT(spec);
17970   destlen = sizeof(TEST_STRING)-1;
17971   entry.action |= CONVRULE_CSS_ON_BIT;
17972
17973   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
17974   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
17975   ret = chxj_rencoding(&r, ret, &destlen);
17976   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
17977   fprintf(stderr, "actual:[%s]\n", ret);
17978   CU_ASSERT(ret != NULL);
17979   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
17980   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
17981   CU_ASSERT(call_check == 1);
17982
17983   APR_TERM;
17984 #undef TEST_STRING
17985 #undef RESULT_STRING
17986 }
17987 void test_ixhtml10_h2_tag_with_css_004()
17988 {
17989 #define  TEST_STRING "<html><head>" \
17990                      "</head><body><h2 style=\"text-align: left\">あいう</h2></body></html>"
17991 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
17992                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
17993                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
17994                        "<head></head><body><h2 style=\"text-align:left;\">あいう</h2></body></html>"
17995   char  *ret;
17996   char  *tmp;
17997   device_table spec;
17998   chxjconvrule_entry entry;
17999   cookie_t cookie;
18000   apr_size_t destlen;
18001   APR_INIT;
18002   chxj_serf_get = test_chxj_serf_get045;
18003   call_check = 0;
18004
18005   COOKIE_INIT(cookie);
18006
18007   SPEC_INIT(spec);
18008   destlen = sizeof(TEST_STRING)-1;
18009   entry.action |= CONVRULE_CSS_ON_BIT;
18010
18011   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18012   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18013   ret = chxj_rencoding(&r, ret, &destlen);
18014   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18015   fprintf(stderr, "actual:[%s]\n", ret);
18016   CU_ASSERT(ret != NULL);
18017   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18018   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18019   CU_ASSERT(call_check == 0);
18020
18021   APR_TERM;
18022 #undef TEST_STRING
18023 #undef RESULT_STRING
18024 }
18025 void test_ixhtml10_h2_tag_with_css_005()
18026 {
18027 #define  TEST_STRING "<html><head>" \
18028                      "</head><body><h2 style=\"text-align: center\">あいう</h2></body></html>"
18029 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18030                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18031                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18032                        "<head></head><body><h2 style=\"text-align:center;\">あいう</h2></body></html>"
18033   char  *ret;
18034   char  *tmp;
18035   device_table spec;
18036   chxjconvrule_entry entry;
18037   cookie_t cookie;
18038   apr_size_t destlen;
18039   APR_INIT;
18040   chxj_serf_get = test_chxj_serf_get045;
18041   call_check = 0;
18042
18043   COOKIE_INIT(cookie);
18044
18045   SPEC_INIT(spec);
18046   destlen = sizeof(TEST_STRING)-1;
18047   entry.action |= CONVRULE_CSS_ON_BIT;
18048
18049   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18050   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18051   ret = chxj_rencoding(&r, ret, &destlen);
18052   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18053   fprintf(stderr, "actual:[%s]\n", ret);
18054   CU_ASSERT(ret != NULL);
18055   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18056   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18057   CU_ASSERT(call_check == 0);
18058
18059   APR_TERM;
18060 #undef TEST_STRING
18061 #undef RESULT_STRING
18062 }
18063 void test_ixhtml10_h2_tag_with_css_006()
18064 {
18065 #define  TEST_STRING "<html><head>" \
18066                      "</head><body><h2 style=\"text-align: right\">あいう</h2></body></html>"
18067 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18068                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18069                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18070                        "<head></head><body><h2 style=\"text-align:right;\">あいう</h2></body></html>"
18071   char  *ret;
18072   char  *tmp;
18073   device_table spec;
18074   chxjconvrule_entry entry;
18075   cookie_t cookie;
18076   apr_size_t destlen;
18077   APR_INIT;
18078   chxj_serf_get = test_chxj_serf_get045;
18079   call_check = 0;
18080
18081   COOKIE_INIT(cookie);
18082
18083   SPEC_INIT(spec);
18084   destlen = sizeof(TEST_STRING)-1;
18085   entry.action |= CONVRULE_CSS_ON_BIT;
18086
18087   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18088   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18089   ret = chxj_rencoding(&r, ret, &destlen);
18090   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18091   fprintf(stderr, "actual:[%s]\n", ret);
18092   CU_ASSERT(ret != NULL);
18093   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18094   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18095   CU_ASSERT(call_check == 0);
18096
18097   APR_TERM;
18098 #undef TEST_STRING
18099 #undef RESULT_STRING
18100 }
18101
18102
18103
18104 /*===========================================================================*/
18105 /* h3 tag with CSS                                                           */
18106 /*===========================================================================*/
18107 char *test_chxj_serf_get046(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
18108 {
18109   static char *css = "a:focus { display: none }\n"
18110                      "a:link  { display: none }\n"
18111                      "a       { display: none }\n"
18112                      "hr      { display: none }\n"
18113                      "a:visited { display:none }\n"
18114                      "h3      { text-align: right }\n";
18115   *len = strlen(css);
18116   call_check = 1;
18117   return css;
18118 }
18119 void test_ixhtml10_h3_tag_with_css_001()
18120 {
18121 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
18122                      "</head><body><h3>あいう</h3></body></html>"
18123 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18124                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18125                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18126                        "<head></head><body><h3 style=\"text-align:right;\">あいう</h3></body></html>"
18127   char  *ret;
18128   char  *tmp;
18129   device_table spec;
18130   chxjconvrule_entry entry;
18131   cookie_t cookie;
18132   apr_size_t destlen;
18133   APR_INIT;
18134   chxj_serf_get = test_chxj_serf_get046;
18135   call_check = 0;
18136
18137   COOKIE_INIT(cookie);
18138
18139   SPEC_INIT(spec);
18140   destlen = sizeof(TEST_STRING)-1;
18141   entry.action |= CONVRULE_CSS_ON_BIT;
18142
18143   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18144   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18145   ret = chxj_rencoding(&r, ret, &destlen);
18146   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18147   fprintf(stderr, "actual:[%s]\n", ret);
18148   CU_ASSERT(ret != NULL);
18149   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18150   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18151   CU_ASSERT(call_check == 1);
18152
18153   APR_TERM;
18154 #undef TEST_STRING
18155 #undef RESULT_STRING
18156 }
18157 char *test_chxj_serf_get047(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
18158 {
18159   static char *css = "a:focus { display: none }\n"
18160                      "a:link  { display: none }\n"
18161                      "a       { display: none }\n"
18162                      "hr      { display: none }\n"
18163                      "a:visited { display:none }\n"
18164                      "h3      { text-align: center }\n";
18165   *len = strlen(css);
18166   call_check = 1;
18167   return css;
18168 }
18169 void test_ixhtml10_h3_tag_with_css_002()
18170 {
18171 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
18172                      "</head><body><h3>あいう</h3></body></html>"
18173 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18174                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18175                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18176                        "<head></head><body><h3 style=\"text-align:center;\">あいう</h3></body></html>"
18177   char  *ret;
18178   char  *tmp;
18179   device_table spec;
18180   chxjconvrule_entry entry;
18181   cookie_t cookie;
18182   apr_size_t destlen;
18183   APR_INIT;
18184   chxj_serf_get = test_chxj_serf_get047;
18185   call_check = 0;
18186
18187   COOKIE_INIT(cookie);
18188
18189   SPEC_INIT(spec);
18190   destlen = sizeof(TEST_STRING)-1;
18191   entry.action |= CONVRULE_CSS_ON_BIT;
18192
18193   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18194   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18195   ret = chxj_rencoding(&r, ret, &destlen);
18196   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18197   fprintf(stderr, "actual:[%s]\n", ret);
18198   CU_ASSERT(ret != NULL);
18199   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18200   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18201   CU_ASSERT(call_check == 1);
18202
18203   APR_TERM;
18204 #undef TEST_STRING
18205 #undef RESULT_STRING
18206 }
18207 char *test_chxj_serf_get048(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
18208 {
18209   static char *css = "a:focus { display: none }\n"
18210                      "a:link  { display: none }\n"
18211                      "a       { display: none }\n"
18212                      "hr      { display: none }\n"
18213                      "a:visited { display:none }\n"
18214                      "h3      { text-align: right }\n";
18215   *len = strlen(css);
18216   call_check = 1;
18217   return css;
18218 }
18219 void test_ixhtml10_h3_tag_with_css_003()
18220 {
18221 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
18222                      "</head><body><h3>あいう</h3></body></html>"
18223 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18224                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18225                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18226                        "<head></head><body><h3 style=\"text-align:right;\">あいう</h3></body></html>"
18227   char  *ret;
18228   char  *tmp;
18229   device_table spec;
18230   chxjconvrule_entry entry;
18231   cookie_t cookie;
18232   apr_size_t destlen;
18233   APR_INIT;
18234   chxj_serf_get = test_chxj_serf_get048;
18235   call_check = 0;
18236
18237   COOKIE_INIT(cookie);
18238
18239   SPEC_INIT(spec);
18240   destlen = sizeof(TEST_STRING)-1;
18241   entry.action |= CONVRULE_CSS_ON_BIT;
18242
18243   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18244   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18245   ret = chxj_rencoding(&r, ret, &destlen);
18246   CU_ASSERT(ret != NULL);
18247   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18248   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18249   CU_ASSERT(call_check == 1);
18250
18251   APR_TERM;
18252 #undef TEST_STRING
18253 #undef RESULT_STRING
18254 }
18255 void test_ixhtml10_h3_tag_with_css_004()
18256 {
18257 #define  TEST_STRING "<html><head>" \
18258                      "</head><body><h3 style=\"text-align: left\">あいう</h3></body></html>"
18259 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18260                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18261                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18262                        "<head></head><body><h3 style=\"text-align:left;\">あいう</h3></body></html>"
18263   char  *ret;
18264   char  *tmp;
18265   device_table spec;
18266   chxjconvrule_entry entry;
18267   cookie_t cookie;
18268   apr_size_t destlen;
18269   APR_INIT;
18270   chxj_serf_get = test_chxj_serf_get048;
18271   call_check = 0;
18272
18273   COOKIE_INIT(cookie);
18274
18275   SPEC_INIT(spec);
18276   destlen = sizeof(TEST_STRING)-1;
18277   entry.action |= CONVRULE_CSS_ON_BIT;
18278
18279   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18280   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18281   ret = chxj_rencoding(&r, ret, &destlen);
18282   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18283   fprintf(stderr, "actual:[%s]\n", ret);
18284   CU_ASSERT(ret != NULL);
18285   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18286   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18287   CU_ASSERT(call_check == 0);
18288
18289   APR_TERM;
18290 #undef TEST_STRING
18291 #undef RESULT_STRING
18292 }
18293 void test_ixhtml10_h3_tag_with_css_005()
18294 {
18295 #define  TEST_STRING "<html><head>" \
18296                      "</head><body><h3 style=\"text-align: center\">あいう</h3></body></html>"
18297 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18298                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18299                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18300                        "<head></head><body><h3 style=\"text-align:center;\">あいう</h3></body></html>"
18301   char  *ret;
18302   char  *tmp;
18303   device_table spec;
18304   chxjconvrule_entry entry;
18305   cookie_t cookie;
18306   apr_size_t destlen;
18307   APR_INIT;
18308   chxj_serf_get = test_chxj_serf_get048;
18309   call_check = 0;
18310
18311   COOKIE_INIT(cookie);
18312
18313   SPEC_INIT(spec);
18314   destlen = sizeof(TEST_STRING)-1;
18315   entry.action |= CONVRULE_CSS_ON_BIT;
18316
18317   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18318   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18319   ret = chxj_rencoding(&r, ret, &destlen);
18320   fprintf(stderr, "actual:[%s]\n", ret);
18321   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18322   CU_ASSERT(ret != NULL);
18323   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18324   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18325   CU_ASSERT(call_check == 0);
18326
18327   APR_TERM;
18328 #undef TEST_STRING
18329 #undef RESULT_STRING
18330 }
18331 void test_ixhtml10_h3_tag_with_css_006()
18332 {
18333 #define  TEST_STRING "<html><head>" \
18334                      "</head><body><h3 style=\"text-align: right\">あいう</h3></body></html>"
18335 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18336                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18337                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18338                        "<head></head><body><h3 style=\"text-align:right;\">あいう</h3></body></html>"
18339   char  *ret;
18340   char  *tmp;
18341   device_table spec;
18342   chxjconvrule_entry entry;
18343   cookie_t cookie;
18344   apr_size_t destlen;
18345   APR_INIT;
18346   chxj_serf_get = test_chxj_serf_get048;
18347   call_check = 0;
18348
18349   COOKIE_INIT(cookie);
18350
18351   SPEC_INIT(spec);
18352   destlen = sizeof(TEST_STRING)-1;
18353   entry.action |= CONVRULE_CSS_ON_BIT;
18354
18355   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18356   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18357   ret = chxj_rencoding(&r, ret, &destlen);
18358   fprintf(stderr, "actual:[%s]\n", ret);
18359   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18360   CU_ASSERT(ret != NULL);
18361   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18362   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18363   CU_ASSERT(call_check == 0);
18364
18365   APR_TERM;
18366 #undef TEST_STRING
18367 #undef RESULT_STRING
18368 }
18369
18370
18371
18372 /*===========================================================================*/
18373 /* h4 tag with CSS                                                           */
18374 /*===========================================================================*/
18375 char *test_chxj_serf_get049(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
18376 {
18377   static char *css = "a:focus { display: none }\n"
18378                      "a:link  { display: none }\n"
18379                      "a       { display: none }\n"
18380                      "hr      { display: none }\n"
18381                      "a:visited { display:none }\n"
18382                      "h4      { text-align: right }\n";
18383   *len = strlen(css);
18384   call_check = 1;
18385   return css;
18386 }
18387 void test_ixhtml10_h4_tag_with_css_001()
18388 {
18389 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
18390                      "</head><body><h4>あいう</h4></body></html>"
18391 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18392                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18393                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18394                        "<head></head><body><h4 style=\"text-align:right;\">あいう</h4></body></html>"
18395   char  *ret;
18396   char  *tmp;
18397   device_table spec;
18398   chxjconvrule_entry entry;
18399   cookie_t cookie;
18400   apr_size_t destlen;
18401   APR_INIT;
18402   chxj_serf_get = test_chxj_serf_get049;
18403   call_check = 0;
18404
18405   COOKIE_INIT(cookie);
18406
18407   SPEC_INIT(spec);
18408   destlen = sizeof(TEST_STRING)-1;
18409   entry.action |= CONVRULE_CSS_ON_BIT;
18410
18411   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18412   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18413   ret = chxj_rencoding(&r, ret, &destlen);
18414   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18415   fprintf(stderr, "actual:[%s]\n", ret);
18416   CU_ASSERT(ret != NULL);
18417   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18418   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18419   CU_ASSERT(call_check == 1);
18420
18421   APR_TERM;
18422 #undef TEST_STRING
18423 #undef RESULT_STRING
18424 }
18425 char *test_chxj_serf_get050(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
18426 {
18427   static char *css = "a:focus { display: none }\n"
18428                      "a:link  { display: none }\n"
18429                      "a       { display: none }\n"
18430                      "hr      { display: none }\n"
18431                      "a:visited { display:none }\n"
18432                      "h4      { text-align: center }\n";
18433   *len = strlen(css);
18434   call_check = 1;
18435   return css;
18436 }
18437 void test_ixhtml10_h4_tag_with_css_002()
18438 {
18439 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
18440                      "</head><body><h4>あいう</h4></body></html>"
18441 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18442                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18443                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18444                        "<head></head><body><h4 style=\"text-align:center;\">あいう</h4></body></html>"
18445   char  *ret;
18446   char  *tmp;
18447   device_table spec;
18448   chxjconvrule_entry entry;
18449   cookie_t cookie;
18450   apr_size_t destlen;
18451   APR_INIT;
18452   chxj_serf_get = test_chxj_serf_get050;
18453   call_check = 0;
18454
18455   COOKIE_INIT(cookie);
18456
18457   SPEC_INIT(spec);
18458   destlen = sizeof(TEST_STRING)-1;
18459   entry.action |= CONVRULE_CSS_ON_BIT;
18460
18461   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18462   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18463   ret = chxj_rencoding(&r, ret, &destlen);
18464   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18465   fprintf(stderr, "actual:[%s]\n", ret);
18466   CU_ASSERT(ret != NULL);
18467   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18468   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18469   CU_ASSERT(call_check == 1);
18470
18471   APR_TERM;
18472 #undef TEST_STRING
18473 #undef RESULT_STRING
18474 }
18475 char *test_chxj_serf_get051(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
18476 {
18477   static char *css = "a:focus { display: none }\n"
18478                      "a:link  { display: none }\n"
18479                      "a       { display: none }\n"
18480                      "hr      { display: none }\n"
18481                      "a:visited { display:none }\n"
18482                      "h4      { text-align: right }\n";
18483   *len = strlen(css);
18484   call_check = 1;
18485   return css;
18486 }
18487 void test_ixhtml10_h4_tag_with_css_003()
18488 {
18489 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
18490                      "</head><body><h4>あいう</h4></body></html>"
18491 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18492                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18493                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18494                        "<head></head><body><h4 style=\"text-align:right;\">あいう</h4></body></html>"
18495   char  *ret;
18496   char  *tmp;
18497   device_table spec;
18498   chxjconvrule_entry entry;
18499   cookie_t cookie;
18500   apr_size_t destlen;
18501   APR_INIT;
18502   chxj_serf_get = test_chxj_serf_get051;
18503   call_check = 0;
18504
18505   COOKIE_INIT(cookie);
18506
18507   SPEC_INIT(spec);
18508   destlen = sizeof(TEST_STRING)-1;
18509   entry.action |= CONVRULE_CSS_ON_BIT;
18510
18511   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18512   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18513   ret = chxj_rencoding(&r, ret, &destlen);
18514   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18515   fprintf(stderr, "actual:[%s]\n", ret);
18516   CU_ASSERT(ret != NULL);
18517   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18518   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18519   CU_ASSERT(call_check == 1);
18520
18521   APR_TERM;
18522 #undef TEST_STRING
18523 #undef RESULT_STRING
18524 }
18525 void test_ixhtml10_h4_tag_with_css_004()
18526 {
18527 #define  TEST_STRING "<html><head>" \
18528                      "</head><body><h4 style=\"text-align: left\">あいう</h4></body></html>"
18529 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18530                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18531                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18532                        "<head></head><body><h4 style=\"text-align:left;\">あいう</h4></body></html>"
18533   char  *ret;
18534   char  *tmp;
18535   device_table spec;
18536   chxjconvrule_entry entry;
18537   cookie_t cookie;
18538   apr_size_t destlen;
18539   APR_INIT;
18540   chxj_serf_get = test_chxj_serf_get051;
18541   call_check = 0;
18542
18543   COOKIE_INIT(cookie);
18544
18545   SPEC_INIT(spec);
18546   destlen = sizeof(TEST_STRING)-1;
18547   entry.action |= CONVRULE_CSS_ON_BIT;
18548
18549   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18550   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18551   ret = chxj_rencoding(&r, ret, &destlen);
18552   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18553   fprintf(stderr, "actual:[%s]\n", ret);
18554   CU_ASSERT(ret != NULL);
18555   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18556   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18557   CU_ASSERT(call_check == 0);
18558
18559   APR_TERM;
18560 #undef TEST_STRING
18561 #undef RESULT_STRING
18562 }
18563 void test_ixhtml10_h4_tag_with_css_005()
18564 {
18565 #define  TEST_STRING "<html><head>" \
18566                      "</head><body><h4 style=\"text-align: center\">あいう</h4></body></html>"
18567 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18568                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18569                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18570                        "<head></head><body><h4 style=\"text-align:center;\">あいう</h4></body></html>"
18571   char  *ret;
18572   char  *tmp;
18573   device_table spec;
18574   chxjconvrule_entry entry;
18575   cookie_t cookie;
18576   apr_size_t destlen;
18577   APR_INIT;
18578   chxj_serf_get = test_chxj_serf_get051;
18579   call_check = 0;
18580
18581   COOKIE_INIT(cookie);
18582
18583   SPEC_INIT(spec);
18584   destlen = sizeof(TEST_STRING)-1;
18585   entry.action |= CONVRULE_CSS_ON_BIT;
18586
18587   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18588   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18589   ret = chxj_rencoding(&r, ret, &destlen);
18590   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18591   fprintf(stderr, "actual:[%s]\n", ret);
18592   CU_ASSERT(ret != NULL);
18593   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18594   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18595   CU_ASSERT(call_check == 0);
18596
18597   APR_TERM;
18598 #undef TEST_STRING
18599 #undef RESULT_STRING
18600 }
18601 void test_ixhtml10_h4_tag_with_css_006()
18602 {
18603 #define  TEST_STRING "<html><head>" \
18604                      "</head><body><h4 style=\"text-align: right\">あいう</h4></body></html>"
18605 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18606                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18607                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18608                        "<head></head><body><h4 style=\"text-align:right;\">あいう</h4></body></html>"
18609   char  *ret;
18610   char  *tmp;
18611   device_table spec;
18612   chxjconvrule_entry entry;
18613   cookie_t cookie;
18614   apr_size_t destlen;
18615   APR_INIT;
18616   chxj_serf_get = test_chxj_serf_get051;
18617   call_check = 0;
18618
18619   COOKIE_INIT(cookie);
18620
18621   SPEC_INIT(spec);
18622   destlen = sizeof(TEST_STRING)-1;
18623   entry.action |= CONVRULE_CSS_ON_BIT;
18624
18625   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18626   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18627   ret = chxj_rencoding(&r, ret, &destlen);
18628   fprintf(stderr, "actual:[%s]\n", ret);
18629   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18630   CU_ASSERT(ret != NULL);
18631   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18632   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18633   CU_ASSERT(call_check == 0);
18634
18635   APR_TERM;
18636 #undef TEST_STRING
18637 #undef RESULT_STRING
18638 }
18639
18640
18641 /*===========================================================================*/
18642 /* h5 tag with CSS                                                           */
18643 /*===========================================================================*/
18644 char *test_chxj_serf_get052(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
18645 {
18646   static char *css = "a:focus { display: none }\n"
18647                      "a:link  { display: none }\n"
18648                      "a       { display: none }\n"
18649                      "hr      { display: none }\n"
18650                      "a:visited { display:none }\n"
18651                      "h5      { text-align: right }\n";
18652   *len = strlen(css);
18653   call_check = 1;
18654   return css;
18655 }
18656 void test_ixhtml10_h5_tag_with_css_001()
18657 {
18658 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
18659                      "</head><body><h5>あいう</h5></body></html>"
18660 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18661                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18662                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18663                        "<head></head><body><h5 style=\"text-align:right;\">あいう</h5></body></html>"
18664   char  *ret;
18665   char  *tmp;
18666   device_table spec;
18667   chxjconvrule_entry entry;
18668   cookie_t cookie;
18669   apr_size_t destlen;
18670   APR_INIT;
18671   chxj_serf_get = test_chxj_serf_get052;
18672   call_check = 0;
18673
18674   COOKIE_INIT(cookie);
18675
18676   SPEC_INIT(spec);
18677   destlen = sizeof(TEST_STRING)-1;
18678   entry.action |= CONVRULE_CSS_ON_BIT;
18679
18680   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18681   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18682   ret = chxj_rencoding(&r, ret, &destlen);
18683   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18684   fprintf(stderr, "actual:[%s]\n", ret);
18685   CU_ASSERT(ret != NULL);
18686   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18687   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18688   CU_ASSERT(call_check == 1);
18689
18690   APR_TERM;
18691 #undef TEST_STRING
18692 #undef RESULT_STRING
18693 }
18694 char *test_chxj_serf_get053(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
18695 {
18696   static char *css = "a:focus { display: none }\n"
18697                      "a:link  { display: none }\n"
18698                      "a       { display: none }\n"
18699                      "hr      { display: none }\n"
18700                      "a:visited { display:none }\n"
18701                      "h5      { text-align: center }\n";
18702   *len = strlen(css);
18703   call_check = 1;
18704   return css;
18705 }
18706 void test_ixhtml10_h5_tag_with_css_002()
18707 {
18708 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
18709                      "</head><body><h5>あいう</h5></body></html>"
18710 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18711                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18712                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18713                        "<head></head><body><h5 style=\"text-align:center;\">あいう</h5></body></html>"
18714   char  *ret;
18715   char  *tmp;
18716   device_table spec;
18717   chxjconvrule_entry entry;
18718   cookie_t cookie;
18719   apr_size_t destlen;
18720   APR_INIT;
18721   chxj_serf_get = test_chxj_serf_get053;
18722   call_check = 0;
18723
18724   COOKIE_INIT(cookie);
18725
18726   SPEC_INIT(spec);
18727   destlen = sizeof(TEST_STRING)-1;
18728   entry.action |= CONVRULE_CSS_ON_BIT;
18729
18730   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18731   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18732   ret = chxj_rencoding(&r, ret, &destlen);
18733   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18734   fprintf(stderr, "actual:[%s]\n", ret);
18735   CU_ASSERT(ret != NULL);
18736   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18737   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18738   CU_ASSERT(call_check == 1);
18739
18740   APR_TERM;
18741 #undef TEST_STRING
18742 #undef RESULT_STRING
18743 }
18744 char *test_chxj_serf_get054(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
18745 {
18746   static char *css = "a:focus { display: none }\n"
18747                      "a:link  { display: none }\n"
18748                      "a       { display: none }\n"
18749                      "hr      { display: none }\n"
18750                      "a:visited { display:none }\n"
18751                      "h5      { text-align: right }\n";
18752   *len = strlen(css);
18753   call_check = 1;
18754   return css;
18755 }
18756 void test_ixhtml10_h5_tag_with_css_003()
18757 {
18758 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
18759                      "</head><body><h5>あいう</h5></body></html>"
18760 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18761                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18762                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18763                        "<head></head><body><h5 style=\"text-align:right;\">あいう</h5></body></html>"
18764   char  *ret;
18765   char  *tmp;
18766   device_table spec;
18767   chxjconvrule_entry entry;
18768   cookie_t cookie;
18769   apr_size_t destlen;
18770   APR_INIT;
18771   chxj_serf_get = test_chxj_serf_get054;
18772   call_check = 0;
18773
18774   COOKIE_INIT(cookie);
18775
18776   SPEC_INIT(spec);
18777   destlen = sizeof(TEST_STRING)-1;
18778   entry.action |= CONVRULE_CSS_ON_BIT;
18779
18780   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18781   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18782   ret = chxj_rencoding(&r, ret, &destlen);
18783   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18784   fprintf(stderr, "actual:[%s]\n", ret);
18785   CU_ASSERT(ret != NULL);
18786   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18787   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18788   CU_ASSERT(call_check == 1);
18789
18790   APR_TERM;
18791 #undef TEST_STRING
18792 #undef RESULT_STRING
18793 }
18794 void test_ixhtml10_h5_tag_with_css_004()
18795 {
18796 #define  TEST_STRING "<html><head>" \
18797                      "</head><body><h5 style=\"text-align: left\">あいう</h5></body></html>"
18798 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18799                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18800                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18801                        "<head></head><body><h5 style=\"text-align:left;\">あいう</h5></body></html>"
18802   char  *ret;
18803   char  *tmp;
18804   device_table spec;
18805   chxjconvrule_entry entry;
18806   cookie_t cookie;
18807   apr_size_t destlen;
18808   APR_INIT;
18809   chxj_serf_get = test_chxj_serf_get054;
18810   call_check = 0;
18811
18812   COOKIE_INIT(cookie);
18813
18814   SPEC_INIT(spec);
18815   destlen = sizeof(TEST_STRING)-1;
18816   entry.action |= CONVRULE_CSS_ON_BIT;
18817
18818   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18819   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18820   ret = chxj_rencoding(&r, ret, &destlen);
18821   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18822   fprintf(stderr, "actual:[%s]\n", ret);
18823   CU_ASSERT(ret != NULL);
18824   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18825   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18826   CU_ASSERT(call_check == 0);
18827
18828   APR_TERM;
18829 #undef TEST_STRING
18830 #undef RESULT_STRING
18831 }
18832 void test_ixhtml10_h5_tag_with_css_005()
18833 {
18834 #define  TEST_STRING "<html><head>" \
18835                      "</head><body><h5 style=\"text-align: center\">あいう</h5></body></html>"
18836 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18837                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18838                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18839                        "<head></head><body><h5 style=\"text-align:center;\">あいう</h5></body></html>"
18840   char  *ret;
18841   char  *tmp;
18842   device_table spec;
18843   chxjconvrule_entry entry;
18844   cookie_t cookie;
18845   apr_size_t destlen;
18846   APR_INIT;
18847   chxj_serf_get = test_chxj_serf_get054;
18848   call_check = 0;
18849
18850   COOKIE_INIT(cookie);
18851
18852   SPEC_INIT(spec);
18853   destlen = sizeof(TEST_STRING)-1;
18854   entry.action |= CONVRULE_CSS_ON_BIT;
18855
18856   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18857   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18858   ret = chxj_rencoding(&r, ret, &destlen);
18859   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18860   fprintf(stderr, "actual:[%s]\n", ret);
18861   CU_ASSERT(ret != NULL);
18862   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18863   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18864   CU_ASSERT(call_check == 0);
18865
18866   APR_TERM;
18867 #undef TEST_STRING
18868 #undef RESULT_STRING
18869 }
18870 void test_ixhtml10_h5_tag_with_css_006()
18871 {
18872 #define  TEST_STRING "<html><head>" \
18873                      "</head><body><h5 style=\"text-align: right\">あいう</h5></body></html>"
18874 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18875                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18876                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18877                        "<head></head><body><h5 style=\"text-align:right;\">あいう</h5></body></html>"
18878   char  *ret;
18879   char  *tmp;
18880   device_table spec;
18881   chxjconvrule_entry entry;
18882   cookie_t cookie;
18883   apr_size_t destlen;
18884   APR_INIT;
18885   chxj_serf_get = test_chxj_serf_get054;
18886   call_check = 0;
18887
18888   COOKIE_INIT(cookie);
18889
18890   SPEC_INIT(spec);
18891   destlen = sizeof(TEST_STRING)-1;
18892   entry.action |= CONVRULE_CSS_ON_BIT;
18893
18894   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18895   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18896   ret = chxj_rencoding(&r, ret, &destlen);
18897   fprintf(stderr, "actual:[%s]\n", ret);
18898   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18899   CU_ASSERT(ret != NULL);
18900   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18901   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18902   CU_ASSERT(call_check == 0);
18903
18904   APR_TERM;
18905 #undef TEST_STRING
18906 #undef RESULT_STRING
18907 }
18908
18909
18910
18911
18912 /*===========================================================================*/
18913 /* h6 tag with CSS                                                           */
18914 /*===========================================================================*/
18915 char *test_chxj_serf_get055(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
18916 {
18917   static char *css = "a:focus { display: none }\n"
18918                      "a:link  { display: none }\n"
18919                      "a       { display: none }\n"
18920                      "hr      { display: none }\n"
18921                      "a:visited { display:none }\n"
18922                      "h6      { text-align: right }\n";
18923   *len = strlen(css);
18924   call_check = 1;
18925   return css;
18926 }
18927 void test_ixhtml10_h6_tag_with_css_001()
18928 {
18929 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
18930                      "</head><body><h6>あいう</h6></body></html>"
18931 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18932                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18933                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18934                        "<head></head><body><h6 style=\"text-align:right;\">あいう</h6></body></html>"
18935   char  *ret;
18936   char  *tmp;
18937   device_table spec;
18938   chxjconvrule_entry entry;
18939   cookie_t cookie;
18940   apr_size_t destlen;
18941   APR_INIT;
18942   chxj_serf_get = test_chxj_serf_get055;
18943   call_check = 0;
18944
18945   COOKIE_INIT(cookie);
18946
18947   SPEC_INIT(spec);
18948   destlen = sizeof(TEST_STRING)-1;
18949   entry.action |= CONVRULE_CSS_ON_BIT;
18950
18951   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
18952   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
18953   ret = chxj_rencoding(&r, ret, &destlen);
18954   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
18955   fprintf(stderr, "actual:[%s]\n", ret);
18956   CU_ASSERT(ret != NULL);
18957   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
18958   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
18959   CU_ASSERT(call_check == 1);
18960
18961   APR_TERM;
18962 #undef TEST_STRING
18963 #undef RESULT_STRING
18964 }
18965 char *test_chxj_serf_get056(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
18966 {
18967   static char *css = "a:focus { display: none }\n"
18968                      "a:link  { display: none }\n"
18969                      "a       { display: none }\n"
18970                      "hr      { display: none }\n"
18971                      "a:visited { display:none }\n"
18972                      "h6      { text-align: center }\n";
18973   *len = strlen(css);
18974   call_check = 1;
18975   return css;
18976 }
18977 void test_ixhtml10_h6_tag_with_css_002()
18978 {
18979 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
18980                      "</head><body><h6>あいう</h6></body></html>"
18981 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
18982                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
18983                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
18984                        "<head></head><body><h6 style=\"text-align:center;\">あいう</h6></body></html>"
18985   char  *ret;
18986   char  *tmp;
18987   device_table spec;
18988   chxjconvrule_entry entry;
18989   cookie_t cookie;
18990   apr_size_t destlen;
18991   APR_INIT;
18992   chxj_serf_get = test_chxj_serf_get056;
18993   call_check = 0;
18994
18995   COOKIE_INIT(cookie);
18996
18997   SPEC_INIT(spec);
18998   destlen = sizeof(TEST_STRING)-1;
18999   entry.action |= CONVRULE_CSS_ON_BIT;
19000
19001   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19002   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19003   ret = chxj_rencoding(&r, ret, &destlen);
19004   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19005   fprintf(stderr, "actual:[%s]\n", ret);
19006   CU_ASSERT(ret != NULL);
19007   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19008   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19009   CU_ASSERT(call_check == 1);
19010
19011   APR_TERM;
19012 #undef TEST_STRING
19013 #undef RESULT_STRING
19014 }
19015 char *test_chxj_serf_get057(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
19016 {
19017   static char *css = "a:focus { display: none }\n"
19018                      "a:link  { display: none }\n"
19019                      "a       { display: none }\n"
19020                      "hr      { display: none }\n"
19021                      "a:visited { display:none }\n"
19022                      "h6      { text-align: right }\n";
19023   *len = strlen(css);
19024   call_check = 1;
19025   return css;
19026 }
19027 void test_ixhtml10_h6_tag_with_css_003()
19028 {
19029 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
19030                      "</head><body><h6>あいう</h6></body></html>"
19031 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19032                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19033                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19034                        "<head></head><body><h6 style=\"text-align:right;\">あいう</h6></body></html>"
19035   char  *ret;
19036   char  *tmp;
19037   device_table spec;
19038   chxjconvrule_entry entry;
19039   cookie_t cookie;
19040   apr_size_t destlen;
19041   APR_INIT;
19042   chxj_serf_get = test_chxj_serf_get057;
19043   call_check = 0;
19044
19045   COOKIE_INIT(cookie);
19046
19047   SPEC_INIT(spec);
19048   destlen = sizeof(TEST_STRING)-1;
19049   entry.action |= CONVRULE_CSS_ON_BIT;
19050
19051   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19052   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19053   ret = chxj_rencoding(&r, ret, &destlen);
19054   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19055   fprintf(stderr, "actual:[%s]\n", ret);
19056   CU_ASSERT(ret != NULL);
19057   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19058   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19059   CU_ASSERT(call_check == 1);
19060
19061   APR_TERM;
19062 #undef TEST_STRING
19063 #undef RESULT_STRING
19064 }
19065 void test_ixhtml10_h6_tag_with_css_004()
19066 {
19067 #define  TEST_STRING "<html><head>" \
19068                      "</head><body><h6 style=\"text-align: left\">あいう</h6></body></html>"
19069 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19070                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19071                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19072                        "<head></head><body><h6 style=\"text-align:left;\">あいう</h6></body></html>"
19073   char  *ret;
19074   char  *tmp;
19075   device_table spec;
19076   chxjconvrule_entry entry;
19077   cookie_t cookie;
19078   apr_size_t destlen;
19079   APR_INIT;
19080   chxj_serf_get = test_chxj_serf_get057;
19081   call_check = 0;
19082
19083   COOKIE_INIT(cookie);
19084
19085   SPEC_INIT(spec);
19086   destlen = sizeof(TEST_STRING)-1;
19087   entry.action |= CONVRULE_CSS_ON_BIT;
19088
19089   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19090   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19091   ret = chxj_rencoding(&r, ret, &destlen);
19092   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19093   fprintf(stderr, "actual:[%s]\n", ret);
19094   CU_ASSERT(ret != NULL);
19095   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19096   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19097   CU_ASSERT(call_check == 0);
19098
19099   APR_TERM;
19100 #undef TEST_STRING
19101 #undef RESULT_STRING
19102 }
19103 void test_ixhtml10_h6_tag_with_css_005()
19104 {
19105 #define  TEST_STRING "<html><head>" \
19106                      "</head><body><h6 style=\"text-align: center\">あいう</h6></body></html>"
19107 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19108                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19109                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19110                        "<head></head><body><h6 style=\"text-align:center;\">あいう</h6></body></html>"
19111   char  *ret;
19112   char  *tmp;
19113   device_table spec;
19114   chxjconvrule_entry entry;
19115   cookie_t cookie;
19116   apr_size_t destlen;
19117   APR_INIT;
19118   chxj_serf_get = test_chxj_serf_get057;
19119   call_check = 0;
19120
19121   COOKIE_INIT(cookie);
19122
19123   SPEC_INIT(spec);
19124   destlen = sizeof(TEST_STRING)-1;
19125   entry.action |= CONVRULE_CSS_ON_BIT;
19126
19127   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19128   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19129   ret = chxj_rencoding(&r, ret, &destlen);
19130   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19131   fprintf(stderr, "actual:[%s]\n", ret);
19132   CU_ASSERT(ret != NULL);
19133   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19134   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19135   CU_ASSERT(call_check == 0);
19136
19137   APR_TERM;
19138 #undef TEST_STRING
19139 #undef RESULT_STRING
19140 }
19141 void test_ixhtml10_h6_tag_with_css_006()
19142 {
19143 #define  TEST_STRING "<html><head>" \
19144                      "</head><body><h6 style=\"text-align: right\">あいう</h6></body></html>"
19145 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19146                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19147                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19148                        "<head></head><body><h6 style=\"text-align:right;\">あいう</h6></body></html>"
19149   char  *ret;
19150   char  *tmp;
19151   device_table spec;
19152   chxjconvrule_entry entry;
19153   cookie_t cookie;
19154   apr_size_t destlen;
19155   APR_INIT;
19156   chxj_serf_get = test_chxj_serf_get057;
19157   call_check = 0;
19158
19159   COOKIE_INIT(cookie);
19160
19161   SPEC_INIT(spec);
19162   destlen = sizeof(TEST_STRING)-1;
19163   entry.action |= CONVRULE_CSS_ON_BIT;
19164
19165   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19166   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19167   ret = chxj_rencoding(&r, ret, &destlen);
19168   fprintf(stderr, "actual:[%s]\n", ret);
19169   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19170   CU_ASSERT(ret != NULL);
19171   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19172   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19173   CU_ASSERT(call_check == 0);
19174
19175   APR_TERM;
19176 #undef TEST_STRING
19177 #undef RESULT_STRING
19178 }
19179
19180
19181
19182 /*===========================================================================*/
19183 /* body tag with CSS                                                         */
19184 /*===========================================================================*/
19185 char *test_chxj_serf_get058(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
19186 {
19187   static char *css = "a:focus { display: none }\n"
19188                      "a:link  { display: none }\n"
19189                      "a       { display: none }\n"
19190                      "hr      { display: none }\n"
19191                      "a:visited { display:none }\n"
19192                      "body    { color:#ff0000 }\n";
19193   *len = strlen(css);
19194   call_check = 1;
19195   return css;
19196 }
19197 void test_ixhtml10_body_tag_with_css_001()
19198 {
19199 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
19200                      "</head><body>あいう</body></html>"
19201 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19202                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19203                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19204                        "<head></head><body style=\"color:#ff0000;\">あいう</body></html>"
19205   char  *ret;
19206   char  *tmp;
19207   device_table spec;
19208   chxjconvrule_entry entry;
19209   cookie_t cookie;
19210   apr_size_t destlen;
19211   APR_INIT;
19212   chxj_serf_get = test_chxj_serf_get058;
19213   call_check = 0;
19214
19215   COOKIE_INIT(cookie);
19216
19217   SPEC_INIT(spec);
19218   destlen = sizeof(TEST_STRING)-1;
19219   entry.action |= CONVRULE_CSS_ON_BIT;
19220
19221   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19222   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19223   ret = chxj_rencoding(&r, ret, &destlen);
19224   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19225   fprintf(stderr, "actual:[%s]\n", ret);
19226   CU_ASSERT(ret != NULL);
19227   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19228   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19229   CU_ASSERT(call_check == 1);
19230
19231   APR_TERM;
19232 #undef TEST_STRING
19233 #undef RESULT_STRING
19234 }
19235
19236
19237 char *test_chxj_serf_get059(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
19238 {
19239   static char *css = "a:focus { display: none }\n"
19240                      "a:link  { display: none }\n"
19241                      "a       { display: none }\n"
19242                      "hr      { display: none }\n"
19243                      "a:visited { display:none }\n"
19244                      "body    { background-color:#ff0000 }\n";
19245   *len = strlen(css);
19246   call_check = 1;
19247   return css;
19248 }
19249 void test_ixhtml10_body_tag_with_css_002()
19250 {
19251 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
19252                      "</head><body>あいう</body></html>"
19253 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19254                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19255                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19256                        "<head></head><body style=\"background-color:#ff0000;\">あいう</body></html>"
19257   char  *ret;
19258   char  *tmp;
19259   device_table spec;
19260   chxjconvrule_entry entry;
19261   cookie_t cookie;
19262   apr_size_t destlen;
19263   APR_INIT;
19264   chxj_serf_get = test_chxj_serf_get059;
19265   call_check = 0;
19266
19267   COOKIE_INIT(cookie);
19268
19269   SPEC_INIT(spec);
19270   destlen = sizeof(TEST_STRING)-1;
19271   entry.action |= CONVRULE_CSS_ON_BIT;
19272
19273   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19274   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19275   ret = chxj_rencoding(&r, ret, &destlen);
19276   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19277   fprintf(stderr, "actual:[%s]\n", ret);
19278   CU_ASSERT(ret != NULL);
19279   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19280   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19281   CU_ASSERT(call_check == 1);
19282
19283   APR_TERM;
19284 #undef TEST_STRING
19285 #undef RESULT_STRING
19286 }
19287
19288 void test_ixhtml10_body_tag_with_css_003()
19289 {
19290 #define  TEST_STRING "<html><head>" \
19291                      "</head><body style=\"color:#ffff00\">あいう</body></html>"
19292 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19293                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19294                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19295                        "<head></head><body style=\"color:#ffff00;\">あいう</body></html>"
19296   char  *ret;
19297   char  *tmp;
19298   device_table spec;
19299   chxjconvrule_entry entry;
19300   cookie_t cookie;
19301   apr_size_t destlen;
19302   APR_INIT;
19303   chxj_serf_get = test_chxj_serf_get059;
19304   call_check = 0;
19305
19306   COOKIE_INIT(cookie);
19307
19308   SPEC_INIT(spec);
19309   destlen = sizeof(TEST_STRING)-1;
19310   entry.action |= CONVRULE_CSS_ON_BIT;
19311
19312   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19313   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19314   ret = chxj_rencoding(&r, ret, &destlen);
19315   fprintf(stderr, "actual:[%s]\n", ret);
19316   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19317   CU_ASSERT(ret != NULL);
19318   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19319   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19320   CU_ASSERT(call_check == 0);
19321
19322   APR_TERM;
19323 #undef TEST_STRING
19324 #undef RESULT_STRING
19325 }
19326 void test_ixhtml10_body_tag_with_css_004()
19327 {
19328 #define  TEST_STRING "<html><head>" \
19329                      "</head><body style=\"background-color:#ffff00\">あいう</body></html>"
19330 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19331                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19332                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19333                        "<head></head><body style=\"background-color:#ffff00;\">あいう</body></html>"
19334   char  *ret;
19335   char  *tmp;
19336   device_table spec;
19337   chxjconvrule_entry entry;
19338   cookie_t cookie;
19339   apr_size_t destlen;
19340   APR_INIT;
19341   chxj_serf_get = test_chxj_serf_get059;
19342   call_check = 0;
19343
19344   COOKIE_INIT(cookie);
19345
19346   SPEC_INIT(spec);
19347   destlen = sizeof(TEST_STRING)-1;
19348   entry.action |= CONVRULE_CSS_ON_BIT;
19349
19350   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19351   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19352   ret = chxj_rencoding(&r, ret, &destlen);
19353   fprintf(stderr, "actual:[%s]\n", ret);
19354   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19355   CU_ASSERT(ret != NULL);
19356   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19357   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19358   CU_ASSERT(call_check == 0);
19359
19360   APR_TERM;
19361 #undef TEST_STRING
19362 #undef RESULT_STRING
19363 }
19364
19365
19366 /*===========================================================================*/
19367 /* font tag with CSS                                                         */
19368 /*===========================================================================*/
19369 char *test_chxj_serf_get065(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
19370 {
19371   static char *css = "a:focus { display: none }\n"
19372                      "a:link  { display: none }\n"
19373                      "a       { display: none }\n"
19374                      "hr      { display: none }\n"
19375                      "font    { color:#ff0000 }\n";
19376   *len = strlen(css);
19377   call_check = 1;
19378   return css;
19379 }
19380 void test_ixhtml10_font_tag_with_css_001()
19381 {
19382 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
19383                      "</head><font>あいう</font></html>"
19384 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19385                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19386                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19387                        "<head></head><span style=\"color:#ff0000;\">あいう</span></html>"
19388   char  *ret;
19389   char  *tmp;
19390   device_table spec;
19391   chxjconvrule_entry entry;
19392   cookie_t cookie;
19393   apr_size_t destlen;
19394   APR_INIT;
19395   chxj_serf_get = test_chxj_serf_get065;
19396   call_check = 0;
19397
19398   COOKIE_INIT(cookie);
19399
19400   SPEC_INIT(spec);
19401   destlen = sizeof(TEST_STRING)-1;
19402   entry.action |= CONVRULE_CSS_ON_BIT;
19403
19404   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19405   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19406   ret = chxj_rencoding(&r, ret, &destlen);
19407   fprintf(stderr, "actual:[%s]\n", ret);
19408   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19409   CU_ASSERT(ret != NULL);
19410   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19411   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19412   CU_ASSERT(call_check == 1);
19413
19414   APR_TERM;
19415 #undef TEST_STRING
19416 #undef RESULT_STRING
19417 }
19418 void test_ixhtml10_font_tag_with_css_002()
19419 {
19420 #define  TEST_STRING "<html><head>" \
19421                      "</head><font style=\"color:#ff0000;\">あいう</font></html>"
19422 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19423                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19424                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19425                        "<head></head><span style=\"color:#ff0000;\">あいう</span></html>"
19426   char  *ret;
19427   char  *tmp;
19428   device_table spec;
19429   chxjconvrule_entry entry;
19430   cookie_t cookie;
19431   apr_size_t destlen;
19432   APR_INIT;
19433   chxj_serf_get = test_chxj_serf_get065;
19434   call_check = 0;
19435
19436   COOKIE_INIT(cookie);
19437
19438   SPEC_INIT(spec);
19439   destlen = sizeof(TEST_STRING)-1;
19440   entry.action |= CONVRULE_CSS_ON_BIT;
19441
19442   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19443   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19444   ret = chxj_rencoding(&r, ret, &destlen);
19445   fprintf(stderr, "actual:[%s]\n", ret);
19446   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19447   CU_ASSERT(ret != NULL);
19448   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19449   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19450   CU_ASSERT(call_check == 0);
19451
19452   APR_TERM;
19453 #undef TEST_STRING
19454 #undef RESULT_STRING
19455 }
19456 char *test_chxj_serf_get066(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
19457 {
19458   static char *css = "a:focus { display: none }\n"
19459                      "a:link  { display: none }\n"
19460                      "a       { display: none }\n"
19461                      "hr      { display: none }\n"
19462                      "font    { font-size:xx-small }\n";
19463   *len = strlen(css);
19464   call_check = 1;
19465   return css;
19466 }
19467 void test_ixhtml10_font_tag_with_css_003()
19468 {
19469 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
19470                      "</head><font>あいう</font></html>"
19471 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19472                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19473                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19474                        "<head></head><span style=\"font-size:xx-small;\">あいう</span></html>"
19475   char  *ret;
19476   char  *tmp;
19477   device_table spec;
19478   chxjconvrule_entry entry;
19479   cookie_t cookie;
19480   apr_size_t destlen;
19481   APR_INIT;
19482   chxj_serf_get = test_chxj_serf_get066;
19483   call_check = 0;
19484
19485   COOKIE_INIT(cookie);
19486
19487   SPEC_INIT(spec);
19488   destlen = sizeof(TEST_STRING)-1;
19489   entry.action |= CONVRULE_CSS_ON_BIT;
19490
19491   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19492   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19493   ret = chxj_rencoding(&r, ret, &destlen);
19494   fprintf(stderr, "actual:[%s]\n", ret);
19495   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19496   CU_ASSERT(ret != NULL);
19497   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19498   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19499   CU_ASSERT(call_check == 1);
19500
19501   APR_TERM;
19502 #undef TEST_STRING
19503 #undef RESULT_STRING
19504 }
19505 char *test_chxj_serf_get067(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
19506 {
19507   static char *css = "a:focus { display: none }\n"
19508                      "a:link  { display: none }\n"
19509                      "a       { display: none }\n"
19510                      "hr      { display: none }\n"
19511                      "font    { font-size:x-small }\n";
19512   *len = strlen(css);
19513   call_check = 1;
19514   return css;
19515 }
19516 void test_ixhtml10_font_tag_with_css_004()
19517 {
19518 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
19519                      "</head><font>あいう</font></html>"
19520 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19521                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19522                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19523                        "<head></head><span style=\"font-size:x-small;\">あいう</span></html>"
19524   char  *ret;
19525   char  *tmp;
19526   device_table spec;
19527   chxjconvrule_entry entry;
19528   cookie_t cookie;
19529   apr_size_t destlen;
19530   APR_INIT;
19531   chxj_serf_get = test_chxj_serf_get067;
19532   call_check = 0;
19533
19534   COOKIE_INIT(cookie);
19535
19536   SPEC_INIT(spec);
19537   destlen = sizeof(TEST_STRING)-1;
19538   entry.action |= CONVRULE_CSS_ON_BIT;
19539
19540   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19541   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19542   ret = chxj_rencoding(&r, ret, &destlen);
19543   fprintf(stderr, "actual:[%s]\n", ret);
19544   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19545   CU_ASSERT(ret != NULL);
19546   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19547   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19548   CU_ASSERT(call_check == 1);
19549
19550   APR_TERM;
19551 #undef TEST_STRING
19552 #undef RESULT_STRING
19553 }
19554 char *test_chxj_serf_get068(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
19555 {
19556   static char *css = "a:focus { display: none }\n"
19557                      "a:link  { display: none }\n"
19558                      "a       { display: none }\n"
19559                      "hr      { display: none }\n"
19560                      "font    { font-size:small }\n";
19561   *len = strlen(css);
19562   call_check = 1;
19563   return css;
19564 }
19565 void test_ixhtml10_font_tag_with_css_005()
19566 {
19567 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
19568                      "</head><font>あいう</font></html>"
19569 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19570                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19571                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19572                        "<head></head><span style=\"font-size:small;\">あいう</span></html>"
19573   char  *ret;
19574   char  *tmp;
19575   device_table spec;
19576   chxjconvrule_entry entry;
19577   cookie_t cookie;
19578   apr_size_t destlen;
19579   APR_INIT;
19580   chxj_serf_get = test_chxj_serf_get068;
19581   call_check = 0;
19582
19583   COOKIE_INIT(cookie);
19584
19585   SPEC_INIT(spec);
19586   destlen = sizeof(TEST_STRING)-1;
19587   entry.action |= CONVRULE_CSS_ON_BIT;
19588
19589   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19590   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19591   ret = chxj_rencoding(&r, ret, &destlen);
19592   fprintf(stderr, "actual:[%s]\n", ret);
19593   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19594   CU_ASSERT(ret != NULL);
19595   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19596   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19597   CU_ASSERT(call_check == 1);
19598
19599   APR_TERM;
19600 #undef TEST_STRING
19601 #undef RESULT_STRING
19602 }
19603 char *test_chxj_serf_get069(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
19604 {
19605   static char *css = "a:focus { display: none }\n"
19606                      "a:link  { display: none }\n"
19607                      "a       { display: none }\n"
19608                      "hr      { display: none }\n"
19609                      "font    { font-size:medium }\n";
19610   *len = strlen(css);
19611   call_check = 1;
19612   return css;
19613 }
19614 void test_ixhtml10_font_tag_with_css_006()
19615 {
19616 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
19617                      "</head><font>あいう</font></html>"
19618 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19619                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19620                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19621                        "<head></head><span style=\"font-size:medium;\">あいう</span></html>"
19622   char  *ret;
19623   char  *tmp;
19624   device_table spec;
19625   chxjconvrule_entry entry;
19626   cookie_t cookie;
19627   apr_size_t destlen;
19628   APR_INIT;
19629   chxj_serf_get = test_chxj_serf_get069;
19630   call_check = 0;
19631
19632   COOKIE_INIT(cookie);
19633
19634   SPEC_INIT(spec);
19635   destlen = sizeof(TEST_STRING)-1;
19636   entry.action |= CONVRULE_CSS_ON_BIT;
19637
19638   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19639   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19640   ret = chxj_rencoding(&r, ret, &destlen);
19641   fprintf(stderr, "actual:[%s]\n", ret);
19642   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19643   CU_ASSERT(ret != NULL);
19644   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19645   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19646   CU_ASSERT(call_check == 1);
19647
19648   APR_TERM;
19649 #undef TEST_STRING
19650 #undef RESULT_STRING
19651 }
19652
19653 char *test_chxj_serf_get070(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
19654 {
19655   static char *css = "a:focus { display: none }\n"
19656                      "a:link  { display: none }\n"
19657                      "a       { display: none }\n"
19658                      "hr      { display: none }\n"
19659                      "font    { font-size:large }\n";
19660   *len = strlen(css);
19661   call_check = 1;
19662   return css;
19663 }
19664 void test_ixhtml10_font_tag_with_css_007()
19665 {
19666 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
19667                      "</head><font>あいう</font></html>"
19668 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19669                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19670                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19671                        "<head></head><span style=\"font-size:large;\">あいう</span></html>"
19672   char  *ret;
19673   char  *tmp;
19674   device_table spec;
19675   chxjconvrule_entry entry;
19676   cookie_t cookie;
19677   apr_size_t destlen;
19678   APR_INIT;
19679   chxj_serf_get = test_chxj_serf_get070;
19680   call_check = 0;
19681
19682   COOKIE_INIT(cookie);
19683
19684   SPEC_INIT(spec);
19685   destlen = sizeof(TEST_STRING)-1;
19686   entry.action |= CONVRULE_CSS_ON_BIT;
19687
19688   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19689   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19690   ret = chxj_rencoding(&r, ret, &destlen);
19691   fprintf(stderr, "actual:[%s]\n", ret);
19692   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19693   CU_ASSERT(ret != NULL);
19694   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19695   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19696   CU_ASSERT(call_check == 1);
19697
19698   APR_TERM;
19699 #undef TEST_STRING
19700 #undef RESULT_STRING
19701 }
19702
19703 char *test_chxj_serf_get071(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
19704 {
19705   static char *css = "a:focus { display: none }\n"
19706                      "a:link  { display: none }\n"
19707                      "a       { display: none }\n"
19708                      "hr      { display: none }\n"
19709                      "font    { font-size:x-large }\n";
19710   *len = strlen(css);
19711   call_check = 1;
19712   return css;
19713 }
19714 void test_ixhtml10_font_tag_with_css_008()
19715 {
19716 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
19717                      "</head><font>あいう</font></html>"
19718 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19719                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19720                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19721                        "<head></head><span style=\"font-size:x-large;\">あいう</span></html>"
19722   char  *ret;
19723   char  *tmp;
19724   device_table spec;
19725   chxjconvrule_entry entry;
19726   cookie_t cookie;
19727   apr_size_t destlen;
19728   APR_INIT;
19729   chxj_serf_get = test_chxj_serf_get071;
19730   call_check = 0;
19731
19732   COOKIE_INIT(cookie);
19733
19734   SPEC_INIT(spec);
19735   destlen = sizeof(TEST_STRING)-1;
19736   entry.action |= CONVRULE_CSS_ON_BIT;
19737
19738   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19739   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19740   ret = chxj_rencoding(&r, ret, &destlen);
19741   fprintf(stderr, "actual:[%s]\n", ret);
19742   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19743   CU_ASSERT(ret != NULL);
19744   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19745   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19746   CU_ASSERT(call_check == 1);
19747
19748   APR_TERM;
19749 #undef TEST_STRING
19750 #undef RESULT_STRING
19751 }
19752
19753 char *test_chxj_serf_get072(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
19754 {
19755   static char *css = "a:focus { display: none }\n"
19756                      "a:link  { display: none }\n"
19757                      "a       { display: none }\n"
19758                      "hr      { display: none }\n"
19759                      "font    { font-size:xx-large }\n";
19760   *len = strlen(css);
19761   call_check = 1;
19762   return css;
19763 }
19764 void test_ixhtml10_font_tag_with_css_009()
19765 {
19766 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
19767                      "</head><font>あいう</font></html>"
19768 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19769                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19770                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19771                        "<head></head><span style=\"font-size:xx-large;\">あいう</span></html>"
19772   char  *ret;
19773   char  *tmp;
19774   device_table spec;
19775   chxjconvrule_entry entry;
19776   cookie_t cookie;
19777   apr_size_t destlen;
19778   APR_INIT;
19779   chxj_serf_get = test_chxj_serf_get072;
19780   call_check = 0;
19781
19782   COOKIE_INIT(cookie);
19783
19784   SPEC_INIT(spec);
19785   destlen = sizeof(TEST_STRING)-1;
19786   entry.action |= CONVRULE_CSS_ON_BIT;
19787
19788   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19789   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19790   ret = chxj_rencoding(&r, ret, &destlen);
19791   fprintf(stderr, "actual:[%s]\n", ret);
19792   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19793   CU_ASSERT(ret != NULL);
19794   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19795   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19796   CU_ASSERT(call_check == 1);
19797
19798   APR_TERM;
19799 #undef TEST_STRING
19800 #undef RESULT_STRING
19801 }
19802 void test_ixhtml10_font_tag_with_css_010()
19803 {
19804 #define  TEST_STRING "<html><head>" \
19805                      "</head><font style=\"font-size:xx-small;\">あいう</font></html>"
19806 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19807                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19808                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19809                        "<head></head><span style=\"font-size:xx-small;\">あいう</span></html>"
19810   char  *ret;
19811   char  *tmp;
19812   device_table spec;
19813   chxjconvrule_entry entry;
19814   cookie_t cookie;
19815   apr_size_t destlen;
19816   APR_INIT;
19817   chxj_serf_get = test_chxj_serf_get072;
19818   call_check = 0;
19819
19820   COOKIE_INIT(cookie);
19821
19822   SPEC_INIT(spec);
19823   destlen = sizeof(TEST_STRING)-1;
19824   entry.action |= CONVRULE_CSS_ON_BIT;
19825
19826   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19827   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19828   ret = chxj_rencoding(&r, ret, &destlen);
19829   fprintf(stderr, "actual:[%s]\n", ret);
19830   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19831   CU_ASSERT(ret != NULL);
19832   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19833   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19834   CU_ASSERT(call_check == 0);
19835
19836   APR_TERM;
19837 #undef TEST_STRING
19838 #undef RESULT_STRING
19839 }
19840 void test_ixhtml10_font_tag_with_css_011()
19841 {
19842 #define  TEST_STRING "<html><head>" \
19843                      "</head><font style=\"font-size:x-small;\">あいう</font></html>"
19844 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19845                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19846                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19847                        "<head></head><span style=\"font-size:x-small;\">あいう</span></html>"
19848   char  *ret;
19849   char  *tmp;
19850   device_table spec;
19851   chxjconvrule_entry entry;
19852   cookie_t cookie;
19853   apr_size_t destlen;
19854   APR_INIT;
19855   chxj_serf_get = test_chxj_serf_get072;
19856   call_check = 0;
19857
19858   COOKIE_INIT(cookie);
19859
19860   SPEC_INIT(spec);
19861   destlen = sizeof(TEST_STRING)-1;
19862   entry.action |= CONVRULE_CSS_ON_BIT;
19863
19864   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19865   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19866   ret = chxj_rencoding(&r, ret, &destlen);
19867   fprintf(stderr, "actual:[%s]\n", ret);
19868   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19869   CU_ASSERT(ret != NULL);
19870   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19871   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19872   CU_ASSERT(call_check == 0);
19873
19874   APR_TERM;
19875 #undef TEST_STRING
19876 #undef RESULT_STRING
19877 }
19878 void test_ixhtml10_font_tag_with_css_012()
19879 {
19880 #define  TEST_STRING "<html><head>" \
19881                      "</head><font style=\"font-size:small;\">あいう</font></html>"
19882 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19883                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19884                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19885                        "<head></head><span style=\"font-size:small;\">あいう</span></html>"
19886   char  *ret;
19887   char  *tmp;
19888   device_table spec;
19889   chxjconvrule_entry entry;
19890   cookie_t cookie;
19891   apr_size_t destlen;
19892   APR_INIT;
19893   chxj_serf_get = test_chxj_serf_get072;
19894   call_check = 0;
19895
19896   COOKIE_INIT(cookie);
19897
19898   SPEC_INIT(spec);
19899   destlen = sizeof(TEST_STRING)-1;
19900   entry.action |= CONVRULE_CSS_ON_BIT;
19901
19902   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19903   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19904   ret = chxj_rencoding(&r, ret, &destlen);
19905   fprintf(stderr, "actual:[%s]\n", ret);
19906   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19907   CU_ASSERT(ret != NULL);
19908   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19909   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19910   CU_ASSERT(call_check == 0);
19911
19912   APR_TERM;
19913 #undef TEST_STRING
19914 #undef RESULT_STRING
19915 }
19916 void test_ixhtml10_font_tag_with_css_013()
19917 {
19918 #define  TEST_STRING "<html><head>" \
19919                      "</head><font style=\"font-size:medium;\">あいう</font></html>"
19920 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19921                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19922                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19923                        "<head></head><span style=\"font-size:medium;\">あいう</span></html>"
19924   char  *ret;
19925   char  *tmp;
19926   device_table spec;
19927   chxjconvrule_entry entry;
19928   cookie_t cookie;
19929   apr_size_t destlen;
19930   APR_INIT;
19931   chxj_serf_get = test_chxj_serf_get072;
19932   call_check = 0;
19933
19934   COOKIE_INIT(cookie);
19935
19936   SPEC_INIT(spec);
19937   destlen = sizeof(TEST_STRING)-1;
19938   entry.action |= CONVRULE_CSS_ON_BIT;
19939
19940   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19941   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19942   ret = chxj_rencoding(&r, ret, &destlen);
19943   fprintf(stderr, "actual:[%s]\n", ret);
19944   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19945   CU_ASSERT(ret != NULL);
19946   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19947   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19948   CU_ASSERT(call_check == 0);
19949
19950   APR_TERM;
19951 #undef TEST_STRING
19952 #undef RESULT_STRING
19953 }
19954 void test_ixhtml10_font_tag_with_css_014()
19955 {
19956 #define  TEST_STRING "<html><head>" \
19957                      "</head><font style=\"font-size:large;\">あいう</font></html>"
19958 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19959                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19960                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19961                        "<head></head><span style=\"font-size:large;\">あいう</span></html>"
19962   char  *ret;
19963   char  *tmp;
19964   device_table spec;
19965   chxjconvrule_entry entry;
19966   cookie_t cookie;
19967   apr_size_t destlen;
19968   APR_INIT;
19969   chxj_serf_get = test_chxj_serf_get072;
19970   call_check = 0;
19971
19972   COOKIE_INIT(cookie);
19973
19974   SPEC_INIT(spec);
19975   destlen = sizeof(TEST_STRING)-1;
19976   entry.action |= CONVRULE_CSS_ON_BIT;
19977
19978   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
19979   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
19980   ret = chxj_rencoding(&r, ret, &destlen);
19981   fprintf(stderr, "actual:[%s]\n", ret);
19982   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
19983   CU_ASSERT(ret != NULL);
19984   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
19985   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
19986   CU_ASSERT(call_check == 0);
19987
19988   APR_TERM;
19989 #undef TEST_STRING
19990 #undef RESULT_STRING
19991 }
19992 void test_ixhtml10_font_tag_with_css_015()
19993 {
19994 #define  TEST_STRING "<html><head>" \
19995                      "</head><font style=\"font-size:x-large;\">あいう</font></html>"
19996 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
19997                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
19998                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
19999                        "<head></head><span style=\"font-size:x-large;\">あいう</span></html>"
20000   char  *ret;
20001   char  *tmp;
20002   device_table spec;
20003   chxjconvrule_entry entry;
20004   cookie_t cookie;
20005   apr_size_t destlen;
20006   APR_INIT;
20007   chxj_serf_get = test_chxj_serf_get072;
20008   call_check = 0;
20009
20010   COOKIE_INIT(cookie);
20011
20012   SPEC_INIT(spec);
20013   destlen = sizeof(TEST_STRING)-1;
20014   entry.action |= CONVRULE_CSS_ON_BIT;
20015
20016   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20017   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20018   ret = chxj_rencoding(&r, ret, &destlen);
20019   fprintf(stderr, "actual:[%s]\n", ret);
20020   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20021   CU_ASSERT(ret != NULL);
20022   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20023   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20024   CU_ASSERT(call_check == 0);
20025
20026   APR_TERM;
20027 #undef TEST_STRING
20028 #undef RESULT_STRING
20029 }
20030 void test_ixhtml10_font_tag_with_css_016()
20031 {
20032 #define  TEST_STRING "<html><head>" \
20033                      "</head><font style=\"font-size:xx-large;\">あいう</font></html>"
20034 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20035                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20036                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20037                        "<head></head><span style=\"font-size:xx-large;\">あいう</span></html>"
20038   char  *ret;
20039   char  *tmp;
20040   device_table spec;
20041   chxjconvrule_entry entry;
20042   cookie_t cookie;
20043   apr_size_t destlen;
20044   APR_INIT;
20045   chxj_serf_get = test_chxj_serf_get072;
20046   call_check = 0;
20047
20048   COOKIE_INIT(cookie);
20049
20050   SPEC_INIT(spec);
20051   destlen = sizeof(TEST_STRING)-1;
20052   entry.action |= CONVRULE_CSS_ON_BIT;
20053
20054   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20055   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20056   ret = chxj_rencoding(&r, ret, &destlen);
20057   fprintf(stderr, "actual:[%s]\n", ret);
20058   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20059   CU_ASSERT(ret != NULL);
20060   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20061   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20062   CU_ASSERT(call_check == 0);
20063
20064   APR_TERM;
20065 #undef TEST_STRING
20066 #undef RESULT_STRING
20067 }
20068
20069
20070
20071 /*===========================================================================*/
20072 /* form tag with CSS                                                         */
20073 /*===========================================================================*/
20074 char *test_chxj_serf_get073(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
20075 {
20076   static char *css = "a:focus { display: none }\n"
20077                      "a:link  { display: none }\n"
20078                      "a       { display: none }\n"
20079                      "hr      { display: none }\n"
20080                      "form    { color:#ff0000 }\n";
20081   *len = strlen(css);
20082   call_check = 1;
20083   return css;
20084 }
20085 void test_ixhtml10_form_tag_with_css_001()
20086 {
20087 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
20088                      "</head><form>あいう</form></html>"
20089 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20090                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20091                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20092                        "<head></head><form><div style=\"color:#ff0000;\">あいう</div></form></html>"
20093   char  *ret;
20094   char  *tmp;
20095   device_table spec;
20096   chxjconvrule_entry entry;
20097   cookie_t cookie;
20098   apr_size_t destlen;
20099   APR_INIT;
20100   chxj_serf_get = test_chxj_serf_get073;
20101   call_check = 0;
20102
20103   COOKIE_INIT(cookie);
20104
20105   SPEC_INIT(spec);
20106   destlen = sizeof(TEST_STRING)-1;
20107   entry.action |= CONVRULE_CSS_ON_BIT;
20108
20109   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20110   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20111   ret = chxj_rencoding(&r, ret, &destlen);
20112   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20113   fprintf(stderr, "actual:[%s]\n", ret);
20114   CU_ASSERT(ret != NULL);
20115   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20116   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20117   CU_ASSERT(call_check == 1);
20118
20119   APR_TERM;
20120 #undef TEST_STRING
20121 #undef RESULT_STRING
20122 }
20123 void test_ixhtml10_form_tag_with_css_002()
20124 {
20125 #define  TEST_STRING "<html><head>" \
20126                      "</head><form style=\"color:#ff0000\">あいう</form></html>"
20127 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20128                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20129                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20130                        "<head></head><form><div style=\"color:#ff0000;\">あいう</div></form></html>"
20131   char  *ret;
20132   char  *tmp;
20133   device_table spec;
20134   chxjconvrule_entry entry;
20135   cookie_t cookie;
20136   apr_size_t destlen;
20137   APR_INIT;
20138   chxj_serf_get = test_chxj_serf_get073;
20139   call_check = 0;
20140
20141   COOKIE_INIT(cookie);
20142
20143   SPEC_INIT(spec);
20144   destlen = sizeof(TEST_STRING)-1;
20145   entry.action |= CONVRULE_CSS_ON_BIT;
20146
20147   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20148   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20149   ret = chxj_rencoding(&r, ret, &destlen);
20150   fprintf(stderr, "actual:[%s]\n", ret);
20151   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20152   CU_ASSERT(ret != NULL);
20153   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20154   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20155   CU_ASSERT(call_check == 0);
20156
20157   APR_TERM;
20158 #undef TEST_STRING
20159 #undef RESULT_STRING
20160 }
20161
20162 char *test_chxj_serf_get074(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
20163 {
20164   static char *css = "a:focus { display: none }\n"
20165                      "a:link  { display: none }\n"
20166                      "a       { display: none }\n"
20167                      "hr      { display: none }\n"
20168                      "form    { text-align:left }\n";
20169   *len = strlen(css);
20170   call_check = 1;
20171   return css;
20172 }
20173 void test_ixhtml10_form_tag_with_css_003()
20174 {
20175 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
20176                      "</head><form>あいう</form></html>"
20177 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20178                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20179                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20180                        "<head></head><form><div style=\"text-align:left;\">あいう</div></form></html>"
20181   char  *ret;
20182   char  *tmp;
20183   device_table spec;
20184   chxjconvrule_entry entry;
20185   cookie_t cookie;
20186   apr_size_t destlen;
20187   APR_INIT;
20188   chxj_serf_get = test_chxj_serf_get074;
20189   call_check = 0;
20190
20191   COOKIE_INIT(cookie);
20192
20193   SPEC_INIT(spec);
20194   destlen = sizeof(TEST_STRING)-1;
20195   entry.action |= CONVRULE_CSS_ON_BIT;
20196
20197   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20198   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20199   ret = chxj_rencoding(&r, ret, &destlen);
20200   fprintf(stderr, "actual:[%s]\n", ret);
20201   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20202   CU_ASSERT(ret != NULL);
20203   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20204   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20205   CU_ASSERT(call_check == 1);
20206
20207   APR_TERM;
20208 #undef TEST_STRING
20209 #undef RESULT_STRING
20210 }
20211 void test_ixhtml10_form_tag_with_css_004()
20212 {
20213 #define  TEST_STRING "<html><head>" \
20214                      "</head><form style=\"text-align:left\">あいう</form></html>"
20215 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20216                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20217                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20218                        "<head></head><form><div style=\"text-align:left;\">あいう</div></form></html>"
20219   char  *ret;
20220   char  *tmp;
20221   device_table spec;
20222   chxjconvrule_entry entry;
20223   cookie_t cookie;
20224   apr_size_t destlen;
20225   APR_INIT;
20226   chxj_serf_get = test_chxj_serf_get074;
20227   call_check = 0;
20228
20229   COOKIE_INIT(cookie);
20230
20231   SPEC_INIT(spec);
20232   destlen = sizeof(TEST_STRING)-1;
20233   entry.action |= CONVRULE_CSS_ON_BIT;
20234
20235   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20236   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20237   ret = chxj_rencoding(&r, ret, &destlen);
20238   fprintf(stderr, "actual:[%s]\n", ret);
20239   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20240   CU_ASSERT(ret != NULL);
20241   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20242   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20243   CU_ASSERT(call_check == 0);
20244
20245   APR_TERM;
20246 #undef TEST_STRING
20247 #undef RESULT_STRING
20248 }
20249
20250 char *test_chxj_serf_get075(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
20251 {
20252   static char *css = "a:focus { display: none }\n"
20253                      "a:link  { display: none }\n"
20254                      "a       { display: none }\n"
20255                      "hr      { display: none }\n"
20256                      "form    { text-align:center }\n";
20257   *len = strlen(css);
20258   call_check = 1;
20259   return css;
20260 }
20261 void test_ixhtml10_form_tag_with_css_005()
20262 {
20263 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
20264                      "</head><form>あいう</form></html>"
20265 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20266                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20267                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20268                        "<head></head><form><div style=\"text-align:center;\">あいう</div></form></html>"
20269   char  *ret;
20270   char  *tmp;
20271   device_table spec;
20272   chxjconvrule_entry entry;
20273   cookie_t cookie;
20274   apr_size_t destlen;
20275   APR_INIT;
20276   chxj_serf_get = test_chxj_serf_get075;
20277   call_check = 0;
20278
20279   COOKIE_INIT(cookie);
20280
20281   SPEC_INIT(spec);
20282   destlen = sizeof(TEST_STRING)-1;
20283   entry.action |= CONVRULE_CSS_ON_BIT;
20284
20285   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20286   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20287   ret = chxj_rencoding(&r, ret, &destlen);
20288   fprintf(stderr, "actual:[%s]\n", ret);
20289   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20290   CU_ASSERT(ret != NULL);
20291   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20292   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20293   CU_ASSERT(call_check == 1);
20294
20295   APR_TERM;
20296 #undef TEST_STRING
20297 #undef RESULT_STRING
20298 }
20299 void test_ixhtml10_form_tag_with_css_006()
20300 {
20301 #define  TEST_STRING "<html><head>" \
20302                      "</head><form style=\"text-align:center\">あいう</form></html>"
20303 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20304                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20305                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20306                        "<head></head><form><div style=\"text-align:center;\">あいう</div></form></html>"
20307   char  *ret;
20308   char  *tmp;
20309   device_table spec;
20310   chxjconvrule_entry entry;
20311   cookie_t cookie;
20312   apr_size_t destlen;
20313   APR_INIT;
20314   chxj_serf_get = test_chxj_serf_get075;
20315   call_check = 0;
20316
20317   COOKIE_INIT(cookie);
20318
20319   SPEC_INIT(spec);
20320   destlen = sizeof(TEST_STRING)-1;
20321   entry.action |= CONVRULE_CSS_ON_BIT;
20322
20323   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20324   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20325   ret = chxj_rencoding(&r, ret, &destlen);
20326   fprintf(stderr, "actual:[%s]\n", ret);
20327   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20328   CU_ASSERT(ret != NULL);
20329   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20330   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20331   CU_ASSERT(call_check == 0);
20332
20333   APR_TERM;
20334 #undef TEST_STRING
20335 #undef RESULT_STRING
20336 }
20337
20338 char *test_chxj_serf_get076(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
20339 {
20340   static char *css = "a:focus { display: none }\n"
20341                      "a:link  { display: none }\n"
20342                      "a       { display: none }\n"
20343                      "hr      { display: none }\n"
20344                      "form    { text-align:right }\n";
20345   *len = strlen(css);
20346   call_check = 1;
20347   return css;
20348 }
20349 void test_ixhtml10_form_tag_with_css_007()
20350 {
20351 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
20352                      "</head><form>あいう</form></html>"
20353 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20354                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20355                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20356                        "<head></head><form><div style=\"text-align:right;\">あいう</div></form></html>"
20357   char  *ret;
20358   char  *tmp;
20359   device_table spec;
20360   chxjconvrule_entry entry;
20361   cookie_t cookie;
20362   apr_size_t destlen;
20363   APR_INIT;
20364   chxj_serf_get = test_chxj_serf_get076;
20365   call_check = 0;
20366
20367   COOKIE_INIT(cookie);
20368
20369   SPEC_INIT(spec);
20370   destlen = sizeof(TEST_STRING)-1;
20371   entry.action |= CONVRULE_CSS_ON_BIT;
20372
20373   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20374   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20375   ret = chxj_rencoding(&r, ret, &destlen);
20376   fprintf(stderr, "actual:[%s]\n", ret);
20377   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20378   CU_ASSERT(ret != NULL);
20379   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20380   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20381   CU_ASSERT(call_check == 1);
20382
20383   APR_TERM;
20384 #undef TEST_STRING
20385 #undef RESULT_STRING
20386 }
20387 void test_ixhtml10_form_tag_with_css_008()
20388 {
20389 #define  TEST_STRING "<html><head>" \
20390                      "</head><form style=\"text-align:right\">あいう</form></html>"
20391 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20392                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20393                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20394                        "<head></head><form><div style=\"text-align:right;\">あいう</div></form></html>"
20395   char  *ret;
20396   char  *tmp;
20397   device_table spec;
20398   chxjconvrule_entry entry;
20399   cookie_t cookie;
20400   apr_size_t destlen;
20401   APR_INIT;
20402   chxj_serf_get = test_chxj_serf_get076;
20403   call_check = 0;
20404
20405   COOKIE_INIT(cookie);
20406
20407   SPEC_INIT(spec);
20408   destlen = sizeof(TEST_STRING)-1;
20409   entry.action |= CONVRULE_CSS_ON_BIT;
20410
20411   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20412   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20413   ret = chxj_rencoding(&r, ret, &destlen);
20414   fprintf(stderr, "actual:[%s]\n", ret);
20415   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20416   CU_ASSERT(ret != NULL);
20417   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20418   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20419   CU_ASSERT(call_check == 0);
20420
20421   APR_TERM;
20422 #undef TEST_STRING
20423 #undef RESULT_STRING
20424 }
20425
20426
20427
20428 /*===========================================================================*/
20429 /* input tag with CSS                                                        */
20430 /*===========================================================================*/
20431 char *test_chxj_serf_get080(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
20432 {
20433   static char *css = "a:focus { display: none }\n"
20434                      "a:link  { display: none }\n"
20435                      "a       { display: none }\n"
20436                      "hr      { display: none }\n"
20437                      "input   { -wap-input-format: &quot;*&lt;ja:h&gt;&quot; }\n";
20438   *len = strlen(css);
20439   call_check = 1;
20440   return css;
20441 }
20442 void test_ixhtml10_input_tag_with_css_001()
20443 {
20444 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
20445                      "</head><form><input type=\"text\"></form></html>"
20446 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20447                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20448                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20449                        "<head></head><form><input type=\"text\" style=\"-wap-input-format:&quot;*&lt;ja:h&gt;&quot;;\" /></form></html>"
20450   char  *ret;
20451   char  *tmp;
20452   device_table spec;
20453   chxjconvrule_entry entry;
20454   cookie_t cookie;
20455   apr_size_t destlen;
20456   APR_INIT;
20457   chxj_serf_get = test_chxj_serf_get080;
20458   call_check = 0;
20459
20460   COOKIE_INIT(cookie);
20461
20462   SPEC_INIT(spec);
20463   destlen = sizeof(TEST_STRING)-1;
20464   entry.action |= CONVRULE_CSS_ON_BIT;
20465
20466   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20467   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20468   ret = chxj_rencoding(&r, ret, &destlen);
20469   fprintf(stderr, "actual:[%s]\n", ret);
20470   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20471   CU_ASSERT(ret != NULL);
20472   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20473   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20474   CU_ASSERT(call_check == 1);
20475
20476   APR_TERM;
20477 #undef TEST_STRING
20478 #undef RESULT_STRING
20479 }
20480 void test_ixhtml10_input_tag_with_css_002()
20481 {
20482 #define  TEST_STRING "<html><head>" \
20483                      "</head><form><input type=\"text\" style=\"-wap-input-format: &quot;*&lt;ja:h&gt;&quot;\"></form></html>"
20484 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20485                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20486                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20487                        "<head></head><form><input type=\"text\" style=\"-wap-input-format:&quot;*&lt;ja:h&gt;&quot;;\" /></form></html>"
20488   char  *ret;
20489   char  *tmp;
20490   device_table spec;
20491   chxjconvrule_entry entry;
20492   cookie_t cookie;
20493   apr_size_t destlen;
20494   APR_INIT;
20495   chxj_serf_get = test_chxj_serf_get080;
20496   call_check = 0;
20497
20498   COOKIE_INIT(cookie);
20499
20500   SPEC_INIT(spec);
20501   destlen = sizeof(TEST_STRING)-1;
20502   entry.action |= CONVRULE_CSS_ON_BIT;
20503
20504   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20505   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20506   ret = chxj_rencoding(&r, ret, &destlen);
20507   fprintf(stderr, "actual:[%s]\n", ret);
20508   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20509   CU_ASSERT(ret != NULL);
20510   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20511   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20512   CU_ASSERT(call_check == 0);
20513
20514   APR_TERM;
20515 #undef TEST_STRING
20516 #undef RESULT_STRING
20517 }
20518 char *test_chxj_serf_get081(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
20519 {
20520   static char *css = "a:focus { display: none }\n"
20521                      "a:link  { display: none }\n"
20522                      "a       { display: none }\n"
20523                      "hr      { display: none }\n"
20524                      "input   { -wap-input-format: &quot;*&lt;ja:hk&gt;&quot; }\n";
20525   *len = strlen(css);
20526   call_check = 1;
20527   return css;
20528 }
20529 void test_ixhtml10_input_tag_with_css_003()
20530 {
20531 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
20532                      "</head><form><input type=\"text\"></form></html>"
20533 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20534                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20535                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20536                        "<head></head><form><input type=\"text\" style=\"-wap-input-format:&quot;*&lt;ja:hk&gt;&quot;;\" /></form></html>"
20537   char  *ret;
20538   char  *tmp;
20539   device_table spec;
20540   chxjconvrule_entry entry;
20541   cookie_t cookie;
20542   apr_size_t destlen;
20543   APR_INIT;
20544   chxj_serf_get = test_chxj_serf_get081;
20545   call_check = 0;
20546
20547   COOKIE_INIT(cookie);
20548
20549   SPEC_INIT(spec);
20550   destlen = sizeof(TEST_STRING)-1;
20551   entry.action |= CONVRULE_CSS_ON_BIT;
20552
20553   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20554   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20555   ret = chxj_rencoding(&r, ret, &destlen);
20556   fprintf(stderr, "actual:[%s]\n", ret);
20557   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20558   CU_ASSERT(ret != NULL);
20559   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20560   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20561   CU_ASSERT(call_check == 1);
20562
20563   APR_TERM;
20564 #undef TEST_STRING
20565 #undef RESULT_STRING
20566 }
20567 void test_ixhtml10_input_tag_with_css_004()
20568 {
20569 #define  TEST_STRING "<html><head>" \
20570                      "</head><form><input type=\"text\" style=\"-wap-input-format: &quot;*&lt;ja:hk&gt;&quot;\"></form></html>"
20571 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20572                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20573                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20574                        "<head></head><form><input type=\"text\" style=\"-wap-input-format:&quot;*&lt;ja:hk&gt;&quot;;\" /></form></html>"
20575   char  *ret;
20576   char  *tmp;
20577   device_table spec;
20578   chxjconvrule_entry entry;
20579   cookie_t cookie;
20580   apr_size_t destlen;
20581   APR_INIT;
20582   chxj_serf_get = test_chxj_serf_get081;
20583   call_check = 0;
20584
20585   COOKIE_INIT(cookie);
20586
20587   SPEC_INIT(spec);
20588   destlen = sizeof(TEST_STRING)-1;
20589   entry.action |= CONVRULE_CSS_ON_BIT;
20590
20591   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20592   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20593   ret = chxj_rencoding(&r, ret, &destlen);
20594   fprintf(stderr, "actual:[%s]\n", ret);
20595   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20596   CU_ASSERT(ret != NULL);
20597   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20598   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20599   CU_ASSERT(call_check == 0);
20600
20601   APR_TERM;
20602 #undef TEST_STRING
20603 #undef RESULT_STRING
20604 }
20605 char *test_chxj_serf_get082(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
20606 {
20607   static char *css = "a:focus { display: none }\n"
20608                      "a:link  { display: none }\n"
20609                      "a       { display: none }\n"
20610                      "hr      { display: none }\n"
20611                      "input   { -wap-input-format: &quot;*&lt;ja:en&gt;&quot; }\n";
20612   *len = strlen(css);
20613   call_check = 1;
20614   return css;
20615 }
20616 void test_ixhtml10_input_tag_with_css_005()
20617 {
20618 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
20619                      "</head><form><input type=\"text\"></form></html>"
20620 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20621                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20622                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20623                        "<head></head><form><input type=\"text\" style=\"-wap-input-format:&quot;*&lt;ja:en&gt;&quot;;\" /></form></html>"
20624   char  *ret;
20625   char  *tmp;
20626   device_table spec;
20627   chxjconvrule_entry entry;
20628   cookie_t cookie;
20629   apr_size_t destlen;
20630   APR_INIT;
20631   chxj_serf_get = test_chxj_serf_get082;
20632   call_check = 0;
20633
20634   COOKIE_INIT(cookie);
20635
20636   SPEC_INIT(spec);
20637   destlen = sizeof(TEST_STRING)-1;
20638   entry.action |= CONVRULE_CSS_ON_BIT;
20639
20640   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20641   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20642   ret = chxj_rencoding(&r, ret, &destlen);
20643   fprintf(stderr, "actual:[%s]\n", ret);
20644   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20645   CU_ASSERT(ret != NULL);
20646   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20647   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20648   CU_ASSERT(call_check == 1);
20649
20650   APR_TERM;
20651 #undef TEST_STRING
20652 #undef RESULT_STRING
20653 }
20654 void test_ixhtml10_input_tag_with_css_006()
20655 {
20656 #define  TEST_STRING "<html><head>" \
20657                      "</head><form><input type=\"text\" style=\"-wap-input-format: &quot;*&lt;ja:en&gt;&quot;\"></form></html>"
20658 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20659                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20660                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20661                        "<head></head><form><input type=\"text\" style=\"-wap-input-format:&quot;*&lt;ja:en&gt;&quot;;\" /></form></html>"
20662   char  *ret;
20663   char  *tmp;
20664   device_table spec;
20665   chxjconvrule_entry entry;
20666   cookie_t cookie;
20667   apr_size_t destlen;
20668   APR_INIT;
20669   chxj_serf_get = test_chxj_serf_get082;
20670   call_check = 0;
20671
20672   COOKIE_INIT(cookie);
20673
20674   SPEC_INIT(spec);
20675   destlen = sizeof(TEST_STRING)-1;
20676   entry.action |= CONVRULE_CSS_ON_BIT;
20677
20678   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20679   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20680   ret = chxj_rencoding(&r, ret, &destlen);
20681   fprintf(stderr, "actual:[%s]\n", ret);
20682   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20683   CU_ASSERT(ret != NULL);
20684   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20685   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20686   CU_ASSERT(call_check == 0);
20687
20688   APR_TERM;
20689 #undef TEST_STRING
20690 #undef RESULT_STRING
20691 }
20692 char *test_chxj_serf_get083(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
20693 {
20694   static char *css = "a:focus { display: none }\n"
20695                      "a:link  { display: none }\n"
20696                      "a       { display: none }\n"
20697                      "hr      { display: none }\n"
20698                      "input   { -wap-input-format: &quot;*&lt;ja:n&gt;&quot;; }\n";
20699   *len = strlen(css);
20700   call_check = 1;
20701   return css;
20702 }
20703 void test_ixhtml10_input_tag_with_css_007()
20704 {
20705 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
20706                      "</head><form><input type=\"text\"></form></html>"
20707 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20708                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20709                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20710                        "<head></head><form><input type=\"text\" style=\"-wap-input-format:&quot;*&lt;ja:n&gt;&quot;;\" /></form></html>"
20711   char  *ret;
20712   char  *tmp;
20713   device_table spec;
20714   chxjconvrule_entry entry;
20715   cookie_t cookie;
20716   apr_size_t destlen;
20717   APR_INIT;
20718   chxj_serf_get = test_chxj_serf_get083;
20719   call_check = 0;
20720
20721   COOKIE_INIT(cookie);
20722
20723   SPEC_INIT(spec);
20724   destlen = sizeof(TEST_STRING)-1;
20725   entry.action |= CONVRULE_CSS_ON_BIT;
20726
20727   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20728   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20729   ret = chxj_rencoding(&r, ret, &destlen);
20730   fprintf(stderr, "actual:[%s]\n", ret);
20731   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20732   CU_ASSERT(ret != NULL);
20733   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20734   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20735   CU_ASSERT(call_check == 1);
20736
20737   APR_TERM;
20738 #undef TEST_STRING
20739 #undef RESULT_STRING
20740 }
20741 void test_ixhtml10_input_tag_with_css_008()
20742 {
20743 #define  TEST_STRING "<html><head>" \
20744                      "</head><form><input type=\"text\" style=\"-wap-input-format: &quot;*&lt;ja:n&gt;&quot;;\"></form></html>"
20745 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20746                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20747                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20748                        "<head></head><form><input type=\"text\" style=\"-wap-input-format:&quot;*&lt;ja:n&gt;&quot;;\" /></form></html>"
20749   char  *ret;
20750   char  *tmp;
20751   device_table spec;
20752   chxjconvrule_entry entry;
20753   cookie_t cookie;
20754   apr_size_t destlen;
20755   APR_INIT;
20756   chxj_serf_get = test_chxj_serf_get083;
20757   call_check = 0;
20758
20759   COOKIE_INIT(cookie);
20760
20761   SPEC_INIT(spec);
20762   destlen = sizeof(TEST_STRING)-1;
20763   entry.action |= CONVRULE_CSS_ON_BIT;
20764
20765   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20766   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20767   ret = chxj_rencoding(&r, ret, &destlen);
20768   fprintf(stderr, "actual:[%s]\n", ret);
20769   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20770   CU_ASSERT(ret != NULL);
20771   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20772   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20773   CU_ASSERT(call_check == 0);
20774
20775   APR_TERM;
20776 #undef TEST_STRING
20777 #undef RESULT_STRING
20778 }
20779
20780
20781 /*===========================================================================*/
20782 /* center tag with CSS                                                       */
20783 /*===========================================================================*/
20784 char *test_chxj_serf_get090(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
20785 {
20786   static char *css = "a:focus { display: none }\n"
20787                      "a:link  { display: none }\n"
20788                      "a       { display: none }\n"
20789                      "hr      { display: none }\n"
20790                      "center  { color:rgb(100%,0%,100%)}\n";
20791   *len = strlen(css);
20792   call_check = 1;
20793   return css;
20794 }
20795 void test_ixhtml10_center_tag_with_css_001()
20796 {
20797 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
20798                      "</head><body><center>あいうえお</center></body></html>"
20799 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20800                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20801                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20802                        "<head></head><body><div style=\"text-align:center;color:#ff00ff;\">あいうえお</div></body></html>"
20803   char  *ret;
20804   char  *tmp;
20805   device_table spec;
20806   chxjconvrule_entry entry;
20807   cookie_t cookie;
20808   apr_size_t destlen;
20809   APR_INIT;
20810   chxj_serf_get = test_chxj_serf_get090;
20811   call_check = 0;
20812
20813   COOKIE_INIT(cookie);
20814
20815   SPEC_INIT(spec);
20816   destlen = sizeof(TEST_STRING)-1;
20817   entry.action |= CONVRULE_CSS_ON_BIT;
20818
20819   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20820   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20821   ret = chxj_rencoding(&r, ret, &destlen);
20822   fprintf(stderr, "actual:[%s]\n", ret);
20823   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20824   CU_ASSERT(ret != NULL);
20825   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20826   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20827   CU_ASSERT(call_check == 1);
20828
20829   APR_TERM;
20830 #undef TEST_STRING
20831 #undef RESULT_STRING
20832 }
20833 void test_ixhtml10_center_tag_with_css_002()
20834 {
20835 #define  TEST_STRING "<html><head>" \
20836                      "</head><body><center style=\"color:#ff0000\">あいうえお</center></body></html>"
20837 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20838                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20839                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20840                        "<head></head><body><div style=\"text-align:center;color:#ff0000;\">あいうえお</div></body></html>"
20841   char  *ret;
20842   char  *tmp;
20843   device_table spec;
20844   chxjconvrule_entry entry;
20845   cookie_t cookie;
20846   apr_size_t destlen;
20847   APR_INIT;
20848   chxj_serf_get = test_chxj_serf_get090;
20849   call_check = 0;
20850
20851   COOKIE_INIT(cookie);
20852
20853   SPEC_INIT(spec);
20854   destlen = sizeof(TEST_STRING)-1;
20855   entry.action |= CONVRULE_CSS_ON_BIT;
20856
20857   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20858   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20859   ret = chxj_rencoding(&r, ret, &destlen);
20860   fprintf(stderr, "actual:[%s]\n", ret);
20861   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20862   CU_ASSERT(ret != NULL);
20863   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20864   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20865   CU_ASSERT(call_check == 0);
20866
20867   APR_TERM;
20868 #undef TEST_STRING
20869 #undef RESULT_STRING
20870 }
20871 char *test_chxj_serf_get091(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
20872 {
20873   static char *css = "a:focus { display: none }\n"
20874                      "a:link  { display: none }\n"
20875                      "a       { display: none }\n"
20876                      "hr      { display: none }\n"
20877                      "center  { font-size:xx-small}\n";
20878   *len = strlen(css);
20879   call_check = 1;
20880   return css;
20881 }
20882 void test_ixhtml10_center_tag_with_css_003()
20883 {
20884 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
20885                      "</head><body><center>あいうえお</center></body></html>"
20886 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20887                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20888                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20889                        "<head></head><body><div style=\"text-align:center;font-size:xx-small;\">あいうえお</div></body></html>"
20890   char  *ret;
20891   char  *tmp;
20892   device_table spec;
20893   chxjconvrule_entry entry;
20894   cookie_t cookie;
20895   apr_size_t destlen;
20896   APR_INIT;
20897   chxj_serf_get = test_chxj_serf_get091;
20898   call_check = 0;
20899
20900   COOKIE_INIT(cookie);
20901
20902   SPEC_INIT(spec);
20903   destlen = sizeof(TEST_STRING)-1;
20904   entry.action |= CONVRULE_CSS_ON_BIT;
20905
20906   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20907   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20908   ret = chxj_rencoding(&r, ret, &destlen);
20909   fprintf(stderr, "actual:[%s]\n", ret);
20910   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20911   CU_ASSERT(ret != NULL);
20912   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20913   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20914   CU_ASSERT(call_check == 1);
20915
20916   APR_TERM;
20917 #undef TEST_STRING
20918 #undef RESULT_STRING
20919 }
20920 void test_ixhtml10_center_tag_with_css_004()
20921 {
20922 #define  TEST_STRING "<html><head>" \
20923                      "</head><body><center style=\"font-size:xx-small\">あいうえお</center></body></html>"
20924 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20925                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20926                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20927                        "<head></head><body><div style=\"text-align:center;font-size:xx-small;\">あいうえお</div></body></html>"
20928   char  *ret;
20929   char  *tmp;
20930   device_table spec;
20931   chxjconvrule_entry entry;
20932   cookie_t cookie;
20933   apr_size_t destlen;
20934   APR_INIT;
20935   chxj_serf_get = test_chxj_serf_get091;
20936   call_check = 0;
20937
20938   COOKIE_INIT(cookie);
20939
20940   SPEC_INIT(spec);
20941   destlen = sizeof(TEST_STRING)-1;
20942   entry.action |= CONVRULE_CSS_ON_BIT;
20943
20944   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20945   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20946   ret = chxj_rencoding(&r, ret, &destlen);
20947   fprintf(stderr, "actual:[%s]\n", ret);
20948   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20949   CU_ASSERT(ret != NULL);
20950   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
20951   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
20952   CU_ASSERT(call_check == 0);
20953
20954   APR_TERM;
20955 #undef TEST_STRING
20956 #undef RESULT_STRING
20957 }
20958
20959 char *test_chxj_serf_get092(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
20960 {
20961   static char *css = "a:focus { display: none }\n"
20962                      "a:link  { display: none }\n"
20963                      "a       { display: none }\n"
20964                      "hr      { display: none }\n"
20965                      "center  { font-size:x-small}\n";
20966   *len = strlen(css);
20967   call_check = 1;
20968   return css;
20969 }
20970 void test_ixhtml10_center_tag_with_css_005()
20971 {
20972 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
20973                      "</head><body><center>あいうえお</center></body></html>"
20974 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
20975                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
20976                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
20977                        "<head></head><body><div style=\"text-align:center;font-size:x-small;\">あいうえお</div></body></html>"
20978   char  *ret;
20979   char  *tmp;
20980   device_table spec;
20981   chxjconvrule_entry entry;
20982   cookie_t cookie;
20983   apr_size_t destlen;
20984   APR_INIT;
20985   chxj_serf_get = test_chxj_serf_get092;
20986   call_check = 0;
20987
20988   COOKIE_INIT(cookie);
20989
20990   SPEC_INIT(spec);
20991   destlen = sizeof(TEST_STRING)-1;
20992   entry.action |= CONVRULE_CSS_ON_BIT;
20993
20994   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
20995   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
20996   ret = chxj_rencoding(&r, ret, &destlen);
20997   fprintf(stderr, "actual:[%s]\n", ret);
20998   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
20999   CU_ASSERT(ret != NULL);
21000   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21001   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21002   CU_ASSERT(call_check == 1);
21003
21004   APR_TERM;
21005 #undef TEST_STRING
21006 #undef RESULT_STRING
21007 }
21008 void test_ixhtml10_center_tag_with_css_006()
21009 {
21010 #define  TEST_STRING "<html><head>" \
21011                      "</head><body><center style=\"font-size:x-small\">あいうえお</center></body></html>"
21012 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21013                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21014                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21015                        "<head></head><body><div style=\"text-align:center;font-size:x-small;\">あいうえお</div></body></html>"
21016   char  *ret;
21017   char  *tmp;
21018   device_table spec;
21019   chxjconvrule_entry entry;
21020   cookie_t cookie;
21021   apr_size_t destlen;
21022   APR_INIT;
21023   chxj_serf_get = test_chxj_serf_get092;
21024   call_check = 0;
21025
21026   COOKIE_INIT(cookie);
21027
21028   SPEC_INIT(spec);
21029   destlen = sizeof(TEST_STRING)-1;
21030   entry.action |= CONVRULE_CSS_ON_BIT;
21031
21032   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21033   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21034   ret = chxj_rencoding(&r, ret, &destlen);
21035   fprintf(stderr, "actual:[%s]\n", ret);
21036   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21037   CU_ASSERT(ret != NULL);
21038   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21039   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21040   CU_ASSERT(call_check == 0);
21041
21042   APR_TERM;
21043 #undef TEST_STRING
21044 #undef RESULT_STRING
21045 }
21046
21047 char *test_chxj_serf_get093(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
21048 {
21049   static char *css = "a:focus { display: none }\n"
21050                      "a:link  { display: none }\n"
21051                      "a       { display: none }\n"
21052                      "hr      { display: none }\n"
21053                      "center  { font-size:small}\n";
21054   *len = strlen(css);
21055   call_check = 1;
21056   return css;
21057 }
21058 void test_ixhtml10_center_tag_with_css_007()
21059 {
21060 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
21061                      "</head><body><center>あいうえお</center></body></html>"
21062 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21063                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21064                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21065                        "<head></head><body><div style=\"text-align:center;font-size:small;\">あいうえお</div></body></html>"
21066   char  *ret;
21067   char  *tmp;
21068   device_table spec;
21069   chxjconvrule_entry entry;
21070   cookie_t cookie;
21071   apr_size_t destlen;
21072   APR_INIT;
21073   chxj_serf_get = test_chxj_serf_get093;
21074   call_check = 0;
21075
21076   COOKIE_INIT(cookie);
21077
21078   SPEC_INIT(spec);
21079   destlen = sizeof(TEST_STRING)-1;
21080   entry.action |= CONVRULE_CSS_ON_BIT;
21081
21082   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21083   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21084   ret = chxj_rencoding(&r, ret, &destlen);
21085   fprintf(stderr, "actual:[%s]\n", ret);
21086   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21087   CU_ASSERT(ret != NULL);
21088   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21089   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21090   CU_ASSERT(call_check == 1);
21091
21092   APR_TERM;
21093 #undef TEST_STRING
21094 #undef RESULT_STRING
21095 }
21096 void test_ixhtml10_center_tag_with_css_008()
21097 {
21098 #define  TEST_STRING "<html><head>" \
21099                      "</head><body><center style=\"font-size:small\">あいうえお</center></body></html>"
21100 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21101                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21102                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21103                        "<head></head><body><div style=\"text-align:center;font-size:small;\">あいうえお</div></body></html>"
21104   char  *ret;
21105   char  *tmp;
21106   device_table spec;
21107   chxjconvrule_entry entry;
21108   cookie_t cookie;
21109   apr_size_t destlen;
21110   APR_INIT;
21111   chxj_serf_get = test_chxj_serf_get093;
21112   call_check = 0;
21113
21114   COOKIE_INIT(cookie);
21115
21116   SPEC_INIT(spec);
21117   destlen = sizeof(TEST_STRING)-1;
21118   entry.action |= CONVRULE_CSS_ON_BIT;
21119
21120   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21121   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21122   ret = chxj_rencoding(&r, ret, &destlen);
21123   fprintf(stderr, "actual:[%s]\n", ret);
21124   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21125   CU_ASSERT(ret != NULL);
21126   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21127   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21128   CU_ASSERT(call_check == 0);
21129
21130   APR_TERM;
21131 #undef TEST_STRING
21132 #undef RESULT_STRING
21133 }
21134
21135 char *test_chxj_serf_get094(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
21136 {
21137   static char *css = "a:focus { display: none }\n"
21138                      "a:link  { display: none }\n"
21139                      "a       { display: none }\n"
21140                      "hr      { display: none }\n"
21141                      "center  { font-size:medium}\n";
21142   *len = strlen(css);
21143   call_check = 1;
21144   return css;
21145 }
21146 void test_ixhtml10_center_tag_with_css_009()
21147 {
21148 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
21149                      "</head><body><center>あいうえお</center></body></html>"
21150 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21151                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21152                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21153                        "<head></head><body><div style=\"text-align:center;font-size:medium;\">あいうえお</div></body></html>"
21154   char  *ret;
21155   char  *tmp;
21156   device_table spec;
21157   chxjconvrule_entry entry;
21158   cookie_t cookie;
21159   apr_size_t destlen;
21160   APR_INIT;
21161   chxj_serf_get = test_chxj_serf_get094;
21162   call_check = 0;
21163
21164   COOKIE_INIT(cookie);
21165
21166   SPEC_INIT(spec);
21167   destlen = sizeof(TEST_STRING)-1;
21168   entry.action |= CONVRULE_CSS_ON_BIT;
21169
21170   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21171   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21172   ret = chxj_rencoding(&r, ret, &destlen);
21173   fprintf(stderr, "actual:[%s]\n", ret);
21174   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21175   CU_ASSERT(ret != NULL);
21176   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21177   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21178   CU_ASSERT(call_check == 1);
21179
21180   APR_TERM;
21181 #undef TEST_STRING
21182 #undef RESULT_STRING
21183 }
21184 void test_ixhtml10_center_tag_with_css_010()
21185 {
21186 #define  TEST_STRING "<html><head>" \
21187                      "</head><body><center style=\"font-size:medium\">あいうえお</center></body></html>"
21188 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21189                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21190                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21191                        "<head></head><body><div style=\"text-align:center;font-size:medium;\">あいうえお</div></body></html>"
21192   char  *ret;
21193   char  *tmp;
21194   device_table spec;
21195   chxjconvrule_entry entry;
21196   cookie_t cookie;
21197   apr_size_t destlen;
21198   APR_INIT;
21199   chxj_serf_get = test_chxj_serf_get094;
21200   call_check = 0;
21201
21202   COOKIE_INIT(cookie);
21203
21204   SPEC_INIT(spec);
21205   destlen = sizeof(TEST_STRING)-1;
21206   entry.action |= CONVRULE_CSS_ON_BIT;
21207
21208   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21209   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21210   ret = chxj_rencoding(&r, ret, &destlen);
21211   fprintf(stderr, "actual:[%s]\n", ret);
21212   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21213   CU_ASSERT(ret != NULL);
21214   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21215   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21216   CU_ASSERT(call_check == 0);
21217
21218   APR_TERM;
21219 #undef TEST_STRING
21220 #undef RESULT_STRING
21221 }
21222
21223 char *test_chxj_serf_get095(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
21224 {
21225   static char *css = "a:focus { display: none }\n"
21226                      "a:link  { display: none }\n"
21227                      "a       { display: none }\n"
21228                      "hr      { display: none }\n"
21229                      "center  { font-size:large}\n";
21230   *len = strlen(css);
21231   call_check = 1;
21232   return css;
21233 }
21234 void test_ixhtml10_center_tag_with_css_011()
21235 {
21236 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
21237                      "</head><body><center>あいうえお</center></body></html>"
21238 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21239                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21240                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21241                        "<head></head><body><div style=\"text-align:center;font-size:large;\">あいうえお</div></body></html>"
21242   char  *ret;
21243   char  *tmp;
21244   device_table spec;
21245   chxjconvrule_entry entry;
21246   cookie_t cookie;
21247   apr_size_t destlen;
21248   APR_INIT;
21249   chxj_serf_get = test_chxj_serf_get095;
21250   call_check = 0;
21251
21252   COOKIE_INIT(cookie);
21253
21254   SPEC_INIT(spec);
21255   destlen = sizeof(TEST_STRING)-1;
21256   entry.action |= CONVRULE_CSS_ON_BIT;
21257
21258   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21259   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21260   ret = chxj_rencoding(&r, ret, &destlen);
21261   fprintf(stderr, "actual:[%s]\n", ret);
21262   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21263   CU_ASSERT(ret != NULL);
21264   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21265   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21266   CU_ASSERT(call_check == 1);
21267
21268   APR_TERM;
21269 #undef TEST_STRING
21270 #undef RESULT_STRING
21271 }
21272 void test_ixhtml10_center_tag_with_css_012()
21273 {
21274 #define  TEST_STRING "<html><head>" \
21275                      "</head><body><center style=\"font-size:large\">あいうえお</center></body></html>"
21276 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21277                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21278                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21279                        "<head></head><body><div style=\"text-align:center;font-size:large;\">あいうえお</div></body></html>"
21280   char  *ret;
21281   char  *tmp;
21282   device_table spec;
21283   chxjconvrule_entry entry;
21284   cookie_t cookie;
21285   apr_size_t destlen;
21286   APR_INIT;
21287   chxj_serf_get = test_chxj_serf_get095;
21288   call_check = 0;
21289
21290   COOKIE_INIT(cookie);
21291
21292   SPEC_INIT(spec);
21293   destlen = sizeof(TEST_STRING)-1;
21294   entry.action |= CONVRULE_CSS_ON_BIT;
21295
21296   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21297   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21298   ret = chxj_rencoding(&r, ret, &destlen);
21299   fprintf(stderr, "actual:[%s]\n", ret);
21300   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21301   CU_ASSERT(ret != NULL);
21302   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21303   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21304   CU_ASSERT(call_check == 0);
21305
21306   APR_TERM;
21307 #undef TEST_STRING
21308 #undef RESULT_STRING
21309 }
21310
21311 char *test_chxj_serf_get096(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
21312 {
21313   static char *css = "a:focus { display: none }\n"
21314                      "a:link  { display: none }\n"
21315                      "a       { display: none }\n"
21316                      "hr      { display: none }\n"
21317                      "center  { font-size:x-large}\n";
21318   *len = strlen(css);
21319   call_check = 1;
21320   return css;
21321 }
21322 void test_ixhtml10_center_tag_with_css_013()
21323 {
21324 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
21325                      "</head><body><center>あいうえお</center></body></html>"
21326 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21327                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21328                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21329                        "<head></head><body><div style=\"text-align:center;font-size:x-large;\">あいうえお</div></body></html>"
21330   char  *ret;
21331   char  *tmp;
21332   device_table spec;
21333   chxjconvrule_entry entry;
21334   cookie_t cookie;
21335   apr_size_t destlen;
21336   APR_INIT;
21337   chxj_serf_get = test_chxj_serf_get096;
21338   call_check = 0;
21339
21340   COOKIE_INIT(cookie);
21341
21342   SPEC_INIT(spec);
21343   destlen = sizeof(TEST_STRING)-1;
21344   entry.action |= CONVRULE_CSS_ON_BIT;
21345
21346   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21347   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21348   ret = chxj_rencoding(&r, ret, &destlen);
21349   fprintf(stderr, "actual:[%s]\n", ret);
21350   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21351   CU_ASSERT(ret != NULL);
21352   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21353   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21354   CU_ASSERT(call_check == 1);
21355
21356   APR_TERM;
21357 #undef TEST_STRING
21358 #undef RESULT_STRING
21359 }
21360 void test_ixhtml10_center_tag_with_css_014()
21361 {
21362 #define  TEST_STRING "<html><head>" \
21363                      "</head><body><center style=\"font-size:x-large\">あいうえお</center></body></html>"
21364 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21365                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21366                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21367                        "<head></head><body><div style=\"text-align:center;font-size:x-large;\">あいうえお</div></body></html>"
21368   char  *ret;
21369   char  *tmp;
21370   device_table spec;
21371   chxjconvrule_entry entry;
21372   cookie_t cookie;
21373   apr_size_t destlen;
21374   APR_INIT;
21375   chxj_serf_get = test_chxj_serf_get096;
21376   call_check = 0;
21377
21378   COOKIE_INIT(cookie);
21379
21380   SPEC_INIT(spec);
21381   destlen = sizeof(TEST_STRING)-1;
21382   entry.action |= CONVRULE_CSS_ON_BIT;
21383
21384   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21385   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21386   ret = chxj_rencoding(&r, ret, &destlen);
21387   fprintf(stderr, "actual:[%s]\n", ret);
21388   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21389   CU_ASSERT(ret != NULL);
21390   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21391   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21392   CU_ASSERT(call_check == 0);
21393
21394   APR_TERM;
21395 #undef TEST_STRING
21396 #undef RESULT_STRING
21397 }
21398
21399 char *test_chxj_serf_get097(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
21400 {
21401   static char *css = "a:focus { display: none }\n"
21402                      "a:link  { display: none }\n"
21403                      "a       { display: none }\n"
21404                      "hr      { display: none }\n"
21405                      "center  { font-size:xx-large}\n";
21406   *len = strlen(css);
21407   call_check = 1;
21408   return css;
21409 }
21410 void test_ixhtml10_center_tag_with_css_015()
21411 {
21412 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
21413                      "</head><body><center>あいうえお</center></body></html>"
21414 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21415                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21416                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21417                        "<head></head><body><div style=\"text-align:center;font-size:xx-large;\">あいうえお</div></body></html>"
21418   char  *ret;
21419   char  *tmp;
21420   device_table spec;
21421   chxjconvrule_entry entry;
21422   cookie_t cookie;
21423   apr_size_t destlen;
21424   APR_INIT;
21425   chxj_serf_get = test_chxj_serf_get097;
21426   call_check = 0;
21427
21428   COOKIE_INIT(cookie);
21429
21430   SPEC_INIT(spec);
21431   destlen = sizeof(TEST_STRING)-1;
21432   entry.action |= CONVRULE_CSS_ON_BIT;
21433
21434   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21435   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21436   ret = chxj_rencoding(&r, ret, &destlen);
21437   fprintf(stderr, "actual:[%s]\n", ret);
21438   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21439   CU_ASSERT(ret != NULL);
21440   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21441   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21442   CU_ASSERT(call_check == 1);
21443
21444   APR_TERM;
21445 #undef TEST_STRING
21446 #undef RESULT_STRING
21447 }
21448 void test_ixhtml10_center_tag_with_css_016()
21449 {
21450 #define  TEST_STRING "<html><head>" \
21451                      "</head><body><center style=\"font-size:xx-large\">あいうえお</center></body></html>"
21452 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21453                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21454                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21455                        "<head></head><body><div style=\"text-align:center;font-size:xx-large;\">あいうえお</div></body></html>"
21456   char  *ret;
21457   char  *tmp;
21458   device_table spec;
21459   chxjconvrule_entry entry;
21460   cookie_t cookie;
21461   apr_size_t destlen;
21462   APR_INIT;
21463   chxj_serf_get = test_chxj_serf_get097;
21464   call_check = 0;
21465
21466   COOKIE_INIT(cookie);
21467
21468   SPEC_INIT(spec);
21469   destlen = sizeof(TEST_STRING)-1;
21470   entry.action |= CONVRULE_CSS_ON_BIT;
21471
21472   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21473   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21474   ret = chxj_rencoding(&r, ret, &destlen);
21475   fprintf(stderr, "actual:[%s]\n", ret);
21476   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21477   CU_ASSERT(ret != NULL);
21478   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21479   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21480   CU_ASSERT(call_check == 0);
21481
21482   APR_TERM;
21483 #undef TEST_STRING
21484 #undef RESULT_STRING
21485 }
21486
21487
21488
21489 /*===========================================================================*/
21490 /* hr tag with CSS                                                           */
21491 /*===========================================================================*/
21492 char *test_chxj_serf_get100(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
21493 {
21494   static char *css = "a:focus { display: none }\n"
21495                      "a:link  { display: none }\n"
21496                      "a       { display: none }\n"
21497                      "hr      { display: none }\n"
21498                      "a:visited { display:none }\n"
21499                      "hr      { border-style:solid }\n";
21500   *len = strlen(css);
21501   call_check = 1;
21502   return css;
21503 }
21504 void test_ixhtml10_hr_tag_with_css_001()
21505 {
21506 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
21507                      "</head><body><hr>あいう</body></html>"
21508 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21509                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21510                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21511                        "<head></head><body><hr style=\"border-style:solid;\" />あいう</body></html>"
21512   char  *ret;
21513   char  *tmp;
21514   device_table spec;
21515   chxjconvrule_entry entry;
21516   cookie_t cookie;
21517   apr_size_t destlen;
21518   APR_INIT;
21519   chxj_serf_get = test_chxj_serf_get100;
21520   call_check = 0;
21521
21522   COOKIE_INIT(cookie);
21523
21524   SPEC_INIT(spec);
21525   destlen = sizeof(TEST_STRING)-1;
21526   entry.action |= CONVRULE_CSS_ON_BIT;
21527
21528   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21529   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21530   ret = chxj_rencoding(&r, ret, &destlen);
21531   fprintf(stderr, "actual:[%s]\n", ret);
21532   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21533   CU_ASSERT(ret != NULL);
21534   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21535   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21536   CU_ASSERT(call_check == 1);
21537
21538   APR_TERM;
21539 #undef TEST_STRING
21540 #undef RESULT_STRING
21541 }
21542 void test_ixhtml10_hr_tag_with_css_002()
21543 {
21544 #define  TEST_STRING "<html><head>" \
21545                      "</head><body><hr style=\"border-style:solid\">あいう</body></html>"
21546 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21547                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21548                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21549                        "<head></head><body><hr style=\"border-style:solid;\" />あいう</body></html>"
21550   char  *ret;
21551   char  *tmp;
21552   device_table spec;
21553   chxjconvrule_entry entry;
21554   cookie_t cookie;
21555   apr_size_t destlen;
21556   APR_INIT;
21557   chxj_serf_get = test_chxj_serf_get100;
21558   call_check = 0;
21559
21560   COOKIE_INIT(cookie);
21561
21562   SPEC_INIT(spec);
21563   destlen = sizeof(TEST_STRING)-1;
21564   entry.action |= CONVRULE_CSS_ON_BIT;
21565
21566   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21567   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21568   ret = chxj_rencoding(&r, ret, &destlen);
21569   fprintf(stderr, "actual:[%s]\n", ret);
21570   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21571   CU_ASSERT(ret != NULL);
21572   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21573   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21574   CU_ASSERT(call_check == 0);
21575
21576   APR_TERM;
21577 #undef TEST_STRING
21578 #undef RESULT_STRING
21579 }
21580
21581
21582 char *test_chxj_serf_get101(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
21583 {
21584   static char *css = "a:focus { display: none }\n"
21585                      "a:link  { display: none }\n"
21586                      "a       { display: none }\n"
21587                      "hr      { display: none }\n"
21588                      "a:visited { display:none }\n"
21589                      "hr      { height:10px }\n";
21590   *len = strlen(css);
21591   call_check = 1;
21592   return css;
21593 }
21594 void test_ixhtml10_hr_tag_with_css_003()
21595 {
21596 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
21597                      "</head><body><hr>あいう</body></html>"
21598 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21599                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21600                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21601                        "<head></head><body><hr style=\"height:10px;\" />あいう</body></html>"
21602   char  *ret;
21603   char  *tmp;
21604   device_table spec;
21605   chxjconvrule_entry entry;
21606   cookie_t cookie;
21607   apr_size_t destlen;
21608   APR_INIT;
21609   chxj_serf_get = test_chxj_serf_get101;
21610   call_check = 0;
21611
21612   COOKIE_INIT(cookie);
21613
21614   SPEC_INIT(spec);
21615   destlen = sizeof(TEST_STRING)-1;
21616   entry.action |= CONVRULE_CSS_ON_BIT;
21617
21618   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21619   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21620   ret = chxj_rencoding(&r, ret, &destlen);
21621   fprintf(stderr, "actual:[%s]\n", ret);
21622   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21623   CU_ASSERT(ret != NULL);
21624   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21625   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21626   CU_ASSERT(call_check == 1);
21627
21628   APR_TERM;
21629 #undef TEST_STRING
21630 #undef RESULT_STRING
21631 }
21632 void test_ixhtml10_hr_tag_with_css_004()
21633 {
21634 #define  TEST_STRING "<html><head>" \
21635                      "</head><body><hr style=\"height:10px\">あいう</body></html>"
21636 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21637                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21638                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21639                        "<head></head><body><hr style=\"height:10px;\" />あいう</body></html>"
21640   char  *ret;
21641   char  *tmp;
21642   device_table spec;
21643   chxjconvrule_entry entry;
21644   cookie_t cookie;
21645   apr_size_t destlen;
21646   APR_INIT;
21647   chxj_serf_get = test_chxj_serf_get101;
21648   call_check = 0;
21649
21650   COOKIE_INIT(cookie);
21651
21652   SPEC_INIT(spec);
21653   destlen = sizeof(TEST_STRING)-1;
21654   entry.action |= CONVRULE_CSS_ON_BIT;
21655
21656   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21657   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21658   ret = chxj_rencoding(&r, ret, &destlen);
21659   fprintf(stderr, "actual:[%s]\n", ret);
21660   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21661   CU_ASSERT(ret != NULL);
21662   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21663   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21664   CU_ASSERT(call_check == 0);
21665
21666   APR_TERM;
21667 #undef TEST_STRING
21668 #undef RESULT_STRING
21669 }
21670
21671 char *test_chxj_serf_get102(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
21672 {
21673   static char *css = "a:focus { display: none }\n"
21674                      "a:link  { display: none }\n"
21675                      "a       { display: none }\n"
21676                      "hr      { display: none }\n"
21677                      "a:visited { display:none }\n"
21678                      "hr      { width:10px }\n";
21679   *len = strlen(css);
21680   call_check = 1;
21681   return css;
21682 }
21683 void test_ixhtml10_hr_tag_with_css_005()
21684 {
21685 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
21686                      "</head><body><hr>あいう</body></html>"
21687 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21688                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21689                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21690                        "<head></head><body><hr style=\"width:10px;\" />あいう</body></html>"
21691   char  *ret;
21692   char  *tmp;
21693   device_table spec;
21694   chxjconvrule_entry entry;
21695   cookie_t cookie;
21696   apr_size_t destlen;
21697   APR_INIT;
21698   chxj_serf_get = test_chxj_serf_get102;
21699   call_check = 0;
21700
21701   COOKIE_INIT(cookie);
21702
21703   SPEC_INIT(spec);
21704   destlen = sizeof(TEST_STRING)-1;
21705   entry.action |= CONVRULE_CSS_ON_BIT;
21706
21707   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21708   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21709   ret = chxj_rencoding(&r, ret, &destlen);
21710   fprintf(stderr, "actual:[%s]\n", ret);
21711   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21712   CU_ASSERT(ret != NULL);
21713   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21714   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21715   CU_ASSERT(call_check == 1);
21716
21717   APR_TERM;
21718 #undef TEST_STRING
21719 #undef RESULT_STRING
21720 }
21721 void test_ixhtml10_hr_tag_with_css_006()
21722 {
21723 #define  TEST_STRING "<html><head>" \
21724                      "</head><body><hr style=\"width:10px\">あいう</body></html>"
21725 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21726                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21727                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21728                        "<head></head><body><hr style=\"width:10px;\" />あいう</body></html>"
21729   char  *ret;
21730   char  *tmp;
21731   device_table spec;
21732   chxjconvrule_entry entry;
21733   cookie_t cookie;
21734   apr_size_t destlen;
21735   APR_INIT;
21736   chxj_serf_get = test_chxj_serf_get102;
21737   call_check = 0;
21738
21739   COOKIE_INIT(cookie);
21740
21741   SPEC_INIT(spec);
21742   destlen = sizeof(TEST_STRING)-1;
21743   entry.action |= CONVRULE_CSS_ON_BIT;
21744
21745   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21746   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21747   ret = chxj_rencoding(&r, ret, &destlen);
21748   fprintf(stderr, "actual:[%s]\n", ret);
21749   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21750   CU_ASSERT(ret != NULL);
21751   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21752   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21753   CU_ASSERT(call_check == 0);
21754
21755   APR_TERM;
21756 #undef TEST_STRING
21757 #undef RESULT_STRING
21758 }
21759
21760 char *test_chxj_serf_get103(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
21761 {
21762   static char *css = "a:focus { display: none }\n"
21763                      "a:link  { display: none }\n"
21764                      "a       { display: none }\n"
21765                      "hr      { display: none }\n"
21766                      "a:visited { display:none }\n"
21767                      "hr      { width:80% }\n";
21768   *len = strlen(css);
21769   call_check = 1;
21770   return css;
21771 }
21772 void test_ixhtml10_hr_tag_with_css_007()
21773 {
21774 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
21775                      "</head><body><hr>あいう</body></html>"
21776 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21777                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21778                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21779                        "<head></head><body><hr style=\"width:80%;\" />あいう</body></html>"
21780   char  *ret;
21781   char  *tmp;
21782   device_table spec;
21783   chxjconvrule_entry entry;
21784   cookie_t cookie;
21785   apr_size_t destlen;
21786   APR_INIT;
21787   chxj_serf_get = test_chxj_serf_get103;
21788   call_check = 0;
21789
21790   COOKIE_INIT(cookie);
21791
21792   SPEC_INIT(spec);
21793   destlen = sizeof(TEST_STRING)-1;
21794   entry.action |= CONVRULE_CSS_ON_BIT;
21795
21796   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21797   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21798   ret = chxj_rencoding(&r, ret, &destlen);
21799   fprintf(stderr, "actual:[%s]\n", ret);
21800   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21801   CU_ASSERT(ret != NULL);
21802   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21803   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21804   CU_ASSERT(call_check == 1);
21805
21806   APR_TERM;
21807 #undef TEST_STRING
21808 #undef RESULT_STRING
21809 }
21810 void test_ixhtml10_hr_tag_with_css_008()
21811 {
21812 #define  TEST_STRING "<html><head>" \
21813                      "</head><body><hr style=\"width:10%\">あいう</body></html>"
21814 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21815                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21816                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21817                        "<head></head><body><hr style=\"width:10%;\" />あいう</body></html>"
21818   char  *ret;
21819   char  *tmp;
21820   device_table spec;
21821   chxjconvrule_entry entry;
21822   cookie_t cookie;
21823   apr_size_t destlen;
21824   APR_INIT;
21825   chxj_serf_get = test_chxj_serf_get103;
21826   call_check = 0;
21827
21828   COOKIE_INIT(cookie);
21829
21830   SPEC_INIT(spec);
21831   destlen = sizeof(TEST_STRING)-1;
21832   entry.action |= CONVRULE_CSS_ON_BIT;
21833
21834   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21835   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21836   ret = chxj_rencoding(&r, ret, &destlen);
21837   fprintf(stderr, "actual:[%s]\n", ret);
21838   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21839   CU_ASSERT(ret != NULL);
21840   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21841   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21842   CU_ASSERT(call_check == 0);
21843
21844   APR_TERM;
21845 #undef TEST_STRING
21846 #undef RESULT_STRING
21847 }
21848
21849
21850
21851 /*---------------------------------------------------------------------------*/
21852 /* img tag with CSS                                                          */
21853 /*---------------------------------------------------------------------------*/
21854 char *test_chxj_serf_get110(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
21855 {
21856   static char *css = "a:focus { display: none }\n"
21857                      "a:link  { display: none }\n"
21858                      "a       { display: none }\n"
21859                      "hr      { display: none }\n"
21860                      "a:visited { display:none }\n"
21861                      "img     { height:80% }\n";
21862   *len = strlen(css);
21863   call_check = 1;
21864   return css;
21865 }
21866 void test_ixhtml10_img_tag_with_css_001()
21867 {
21868 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
21869                      "</head><body><img>あいう</body></html>"
21870 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21871                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21872                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21873                        "<head></head><body><img height=\"80%\" alt=\"\" />あいう</body></html>"
21874   char  *ret;
21875   char  *tmp;
21876   device_table spec;
21877   chxjconvrule_entry entry;
21878   cookie_t cookie;
21879   apr_size_t destlen;
21880   APR_INIT;
21881   chxj_serf_get = test_chxj_serf_get110;
21882   call_check = 0;
21883
21884   COOKIE_INIT(cookie);
21885
21886   SPEC_INIT(spec);
21887   destlen = sizeof(TEST_STRING)-1;
21888   entry.action |= CONVRULE_CSS_ON_BIT;
21889
21890   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21891   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21892   ret = chxj_rencoding(&r, ret, &destlen);
21893   fprintf(stderr, "actual:[%s]\n", ret);
21894   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21895   CU_ASSERT(ret != NULL);
21896   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21897   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21898   CU_ASSERT(call_check == 1);
21899
21900   APR_TERM;
21901 #undef TEST_STRING
21902 #undef RESULT_STRING
21903 }
21904 void test_ixhtml10_img_tag_with_css_002()
21905 {
21906 #define  TEST_STRING "<html><head>" \
21907                      "</head><body><img style=\"height:10%\">あいう</body></html>"
21908 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21909                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21910                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21911                        "<head></head><body><img height=\"10%\" alt=\"\" />あいう</body></html>"
21912   char  *ret;
21913   char  *tmp;
21914   device_table spec;
21915   chxjconvrule_entry entry;
21916   cookie_t cookie;
21917   apr_size_t destlen;
21918   APR_INIT;
21919   chxj_serf_get = test_chxj_serf_get110;
21920   call_check = 0;
21921
21922   COOKIE_INIT(cookie);
21923
21924   SPEC_INIT(spec);
21925   destlen = sizeof(TEST_STRING)-1;
21926   entry.action |= CONVRULE_CSS_ON_BIT;
21927
21928   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21929   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21930   ret = chxj_rencoding(&r, ret, &destlen);
21931   fprintf(stderr, "actual:[%s]\n", ret);
21932   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21933   CU_ASSERT(ret != NULL);
21934   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21935   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21936   CU_ASSERT(call_check == 0);
21937
21938   APR_TERM;
21939 #undef TEST_STRING
21940 #undef RESULT_STRING
21941 }
21942 char *test_chxj_serf_get111(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
21943 {
21944   static char *css = "a:focus { display: none }\n"
21945                      "a:link  { display: none }\n"
21946                      "a       { display: none }\n"
21947                      "hr      { display: none }\n"
21948                      "a:visited { display:none }\n"
21949                      "img     { width:80% }\n";
21950   *len = strlen(css);
21951   call_check = 1;
21952   return css;
21953 }
21954 void test_ixhtml10_img_tag_with_css_003()
21955 {
21956 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
21957                      "</head><body><img>あいう</body></html>"
21958 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21959                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21960                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21961                        "<head></head><body><img width=\"80%\" alt=\"\" />あいう</body></html>"
21962   char  *ret;
21963   char  *tmp;
21964   device_table spec;
21965   chxjconvrule_entry entry;
21966   cookie_t cookie;
21967   apr_size_t destlen;
21968   APR_INIT;
21969   chxj_serf_get = test_chxj_serf_get111;
21970   call_check = 0;
21971
21972   COOKIE_INIT(cookie);
21973
21974   SPEC_INIT(spec);
21975   destlen = sizeof(TEST_STRING)-1;
21976   entry.action |= CONVRULE_CSS_ON_BIT;
21977
21978   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
21979   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
21980   ret = chxj_rencoding(&r, ret, &destlen);
21981   fprintf(stderr, "actual:[%s]\n", ret);
21982   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
21983   CU_ASSERT(ret != NULL);
21984   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
21985   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
21986   CU_ASSERT(call_check == 1);
21987
21988   APR_TERM;
21989 #undef TEST_STRING
21990 #undef RESULT_STRING
21991 }
21992 void test_ixhtml10_img_tag_with_css_004()
21993 {
21994 #define  TEST_STRING "<html><head>" \
21995                      "</head><body><img style=\"width:10%\">あいう</body></html>"
21996 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
21997                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
21998                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
21999                        "<head></head><body><img width=\"10%\" alt=\"\" />あいう</body></html>"
22000   char  *ret;
22001   char  *tmp;
22002   device_table spec;
22003   chxjconvrule_entry entry;
22004   cookie_t cookie;
22005   apr_size_t destlen;
22006   APR_INIT;
22007   chxj_serf_get = test_chxj_serf_get111;
22008   call_check = 0;
22009
22010   COOKIE_INIT(cookie);
22011
22012   SPEC_INIT(spec);
22013   destlen = sizeof(TEST_STRING)-1;
22014   entry.action |= CONVRULE_CSS_ON_BIT;
22015
22016   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22017   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22018   ret = chxj_rencoding(&r, ret, &destlen);
22019   fprintf(stderr, "actual:[%s]\n", ret);
22020   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22021   CU_ASSERT(ret != NULL);
22022   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22023   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22024   CU_ASSERT(call_check == 0);
22025
22026   APR_TERM;
22027 #undef TEST_STRING
22028 #undef RESULT_STRING
22029 }
22030 char *test_chxj_serf_get112(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
22031 {
22032   static char *css = "a:focus { display: none }\n"
22033                      "a:link  { display: none }\n"
22034                      "a       { display: none }\n"
22035                      "hr      { display: none }\n"
22036                      "a:visited { display:none }\n"
22037                      "img     { vertical-align:top }\n";
22038   *len = strlen(css);
22039   call_check = 1;
22040   return css;
22041 }
22042 void test_ixhtml10_img_tag_with_css_005()
22043 {
22044 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
22045                      "</head><body><img>あいう</body></html>"
22046 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22047                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22048                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22049                        "<head></head><body><img style=\"vertical-align:top;\" alt=\"\" />あいう</body></html>"
22050   char  *ret;
22051   char  *tmp;
22052   device_table spec;
22053   chxjconvrule_entry entry;
22054   cookie_t cookie;
22055   apr_size_t destlen;
22056   APR_INIT;
22057   chxj_serf_get = test_chxj_serf_get112;
22058   call_check = 0;
22059
22060   COOKIE_INIT(cookie);
22061
22062   SPEC_INIT(spec);
22063   destlen = sizeof(TEST_STRING)-1;
22064   entry.action |= CONVRULE_CSS_ON_BIT;
22065
22066   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22067   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22068   ret = chxj_rencoding(&r, ret, &destlen);
22069   fprintf(stderr, "actual:[%s]\n", ret);
22070   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22071   CU_ASSERT(ret != NULL);
22072   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22073   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22074   CU_ASSERT(call_check == 1);
22075
22076   APR_TERM;
22077 #undef TEST_STRING
22078 #undef RESULT_STRING
22079 }
22080 void test_ixhtml10_img_tag_with_css_006()
22081 {
22082 #define  TEST_STRING "<html><head>" \
22083                      "</head><body><img style=\"vertical-align:top\">あいう</body></html>"
22084 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22085                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22086                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22087                        "<head></head><body><img style=\"vertical-align:top;\" alt=\"\" />あいう</body></html>"
22088   char  *ret;
22089   char  *tmp;
22090   device_table spec;
22091   chxjconvrule_entry entry;
22092   cookie_t cookie;
22093   apr_size_t destlen;
22094   APR_INIT;
22095   chxj_serf_get = test_chxj_serf_get112;
22096   call_check = 0;
22097
22098   COOKIE_INIT(cookie);
22099
22100   SPEC_INIT(spec);
22101   destlen = sizeof(TEST_STRING)-1;
22102   entry.action |= CONVRULE_CSS_ON_BIT;
22103
22104   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22105   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22106   ret = chxj_rencoding(&r, ret, &destlen);
22107   fprintf(stderr, "actual:[%s]\n", ret);
22108   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22109   CU_ASSERT(ret != NULL);
22110   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22111   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22112   CU_ASSERT(call_check == 0);
22113
22114   APR_TERM;
22115 #undef TEST_STRING
22116 #undef RESULT_STRING
22117 }
22118 char *test_chxj_serf_get113(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
22119 {
22120   static char *css = "a:focus { display: none }\n"
22121                      "a:link  { display: none }\n"
22122                      "a       { display: none }\n"
22123                      "hr      { display: none }\n"
22124                      "a:visited { display:none }\n"
22125                      "img     { vertical-align:middle }\n";
22126   *len = strlen(css);
22127   call_check = 1;
22128   return css;
22129 }
22130 void test_ixhtml10_img_tag_with_css_007()
22131 {
22132 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
22133                      "</head><body><img>あいう</body></html>"
22134 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22135                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22136                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22137                        "<head></head><body><img style=\"vertical-align:middle;\" alt=\"\" />あいう</body></html>"
22138   char  *ret;
22139   char  *tmp;
22140   device_table spec;
22141   chxjconvrule_entry entry;
22142   cookie_t cookie;
22143   apr_size_t destlen;
22144   APR_INIT;
22145   chxj_serf_get = test_chxj_serf_get113;
22146   call_check = 0;
22147
22148   COOKIE_INIT(cookie);
22149
22150   SPEC_INIT(spec);
22151   destlen = sizeof(TEST_STRING)-1;
22152   entry.action |= CONVRULE_CSS_ON_BIT;
22153
22154   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22155   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22156   ret = chxj_rencoding(&r, ret, &destlen);
22157   fprintf(stderr, "actual:[%s]\n", ret);
22158   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22159   CU_ASSERT(ret != NULL);
22160   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22161   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22162   CU_ASSERT(call_check == 1);
22163
22164   APR_TERM;
22165 #undef TEST_STRING
22166 #undef RESULT_STRING
22167 }
22168 void test_ixhtml10_img_tag_with_css_008()
22169 {
22170 #define  TEST_STRING "<html><head>" \
22171                      "</head><body><img style=\"vertical-align:middle\">あいう</body></html>"
22172 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22173                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22174                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22175                        "<head></head><body><img style=\"vertical-align:middle;\" alt=\"\" />あいう</body></html>"
22176   char  *ret;
22177   char  *tmp;
22178   device_table spec;
22179   chxjconvrule_entry entry;
22180   cookie_t cookie;
22181   apr_size_t destlen;
22182   APR_INIT;
22183   chxj_serf_get = test_chxj_serf_get113;
22184   call_check = 0;
22185
22186   COOKIE_INIT(cookie);
22187
22188   SPEC_INIT(spec);
22189   destlen = sizeof(TEST_STRING)-1;
22190   entry.action |= CONVRULE_CSS_ON_BIT;
22191
22192   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22193   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22194   ret = chxj_rencoding(&r, ret, &destlen);
22195   fprintf(stderr, "actual:[%s]\n", ret);
22196   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22197   CU_ASSERT(ret != NULL);
22198   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22199   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22200   CU_ASSERT(call_check == 0);
22201
22202   APR_TERM;
22203 #undef TEST_STRING
22204 #undef RESULT_STRING
22205 }
22206 char *test_chxj_serf_get114(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
22207 {
22208   static char *css = "a:focus { display: none }\n"
22209                      "a:link  { display: none }\n"
22210                      "a       { display: none }\n"
22211                      "hr      { display: none }\n"
22212                      "a:visited { display:none }\n"
22213                      "img     { vertical-align:bottom }\n";
22214   *len = strlen(css);
22215   call_check = 1;
22216   return css;
22217 }
22218 void test_ixhtml10_img_tag_with_css_009()
22219 {
22220 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
22221                      "</head><body><img>あいう</body></html>"
22222 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22223                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22224                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22225                        "<head></head><body><img style=\"vertical-align:bottom;\" alt=\"\" />あいう</body></html>"
22226   char  *ret;
22227   char  *tmp;
22228   device_table spec;
22229   chxjconvrule_entry entry;
22230   cookie_t cookie;
22231   apr_size_t destlen;
22232   APR_INIT;
22233   chxj_serf_get = test_chxj_serf_get114;
22234   call_check = 0;
22235
22236   COOKIE_INIT(cookie);
22237
22238   SPEC_INIT(spec);
22239   destlen = sizeof(TEST_STRING)-1;
22240   entry.action |= CONVRULE_CSS_ON_BIT;
22241
22242   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22243   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22244   ret = chxj_rencoding(&r, ret, &destlen);
22245   fprintf(stderr, "actual:[%s]\n", ret);
22246   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22247   CU_ASSERT(ret != NULL);
22248   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22249   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22250   CU_ASSERT(call_check == 1);
22251
22252   APR_TERM;
22253 #undef TEST_STRING
22254 #undef RESULT_STRING
22255 }
22256 void test_ixhtml10_img_tag_with_css_010()
22257 {
22258 #define  TEST_STRING "<html><head>" \
22259                      "</head><body><img style=\"vertical-align:bottom\">あいう</body></html>"
22260 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22261                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22262                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22263                        "<head></head><body><img style=\"vertical-align:bottom;\" alt=\"\" />あいう</body></html>"
22264   char  *ret;
22265   char  *tmp;
22266   device_table spec;
22267   chxjconvrule_entry entry;
22268   cookie_t cookie;
22269   apr_size_t destlen;
22270   APR_INIT;
22271   chxj_serf_get = test_chxj_serf_get114;
22272   call_check = 0;
22273
22274   COOKIE_INIT(cookie);
22275
22276   SPEC_INIT(spec);
22277   destlen = sizeof(TEST_STRING)-1;
22278   entry.action |= CONVRULE_CSS_ON_BIT;
22279
22280   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22281   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22282   ret = chxj_rencoding(&r, ret, &destlen);
22283   fprintf(stderr, "actual:[%s]\n", ret);
22284   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22285   CU_ASSERT(ret != NULL);
22286   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22287   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22288   CU_ASSERT(call_check == 0);
22289
22290   APR_TERM;
22291 #undef TEST_STRING
22292 #undef RESULT_STRING
22293 }
22294
22295
22296 /*===========================================================================*/
22297 /* div tag with CSS                                                          */
22298 /*===========================================================================*/
22299 char *test_chxj_serf_get120(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
22300 {
22301   static char *css = "a:focus { display: none }\n"
22302                      "a:link  { display: none }\n"
22303                      "a       { display: none }\n"
22304                      "hr      { display: none }\n"
22305                      "a:visited { display:none }\n"
22306                      "div     { text-align:left }\n";
22307   *len = strlen(css);
22308   call_check = 1;
22309   return css;
22310 }
22311 void test_ixhtml10_div_tag_with_css_001()
22312 {
22313 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
22314                      "</head><body><div>あいう</div></body></html>"
22315 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22316                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22317                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22318                        "<head></head><body><div style=\"text-align:left;\">あいう</div></body></html>"
22319   char  *ret;
22320   char  *tmp;
22321   device_table spec;
22322   chxjconvrule_entry entry;
22323   cookie_t cookie;
22324   apr_size_t destlen;
22325   APR_INIT;
22326   chxj_serf_get = test_chxj_serf_get120;
22327   call_check = 0;
22328
22329   COOKIE_INIT(cookie);
22330
22331   SPEC_INIT(spec);
22332   destlen = sizeof(TEST_STRING)-1;
22333   entry.action |= CONVRULE_CSS_ON_BIT;
22334
22335   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22336   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22337   ret = chxj_rencoding(&r, ret, &destlen);
22338   fprintf(stderr, "actual:[%s]\n", ret);
22339   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22340   CU_ASSERT(ret != NULL);
22341   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22342   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22343   CU_ASSERT(call_check == 1);
22344
22345   APR_TERM;
22346 #undef TEST_STRING
22347 #undef RESULT_STRING
22348 }
22349 void test_ixhtml10_div_tag_with_css_002()
22350 {
22351 #define  TEST_STRING "<html><head>" \
22352                      "</head><body><div style=\"text-align:left\">あいう</div></body></html>"
22353 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22354                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22355                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22356                        "<head></head><body><div style=\"text-align:left;\">あいう</div></body></html>"
22357   char  *ret;
22358   char  *tmp;
22359   device_table spec;
22360   chxjconvrule_entry entry;
22361   cookie_t cookie;
22362   apr_size_t destlen;
22363   APR_INIT;
22364   chxj_serf_get = test_chxj_serf_get120;
22365   call_check = 0;
22366
22367   COOKIE_INIT(cookie);
22368
22369   SPEC_INIT(spec);
22370   destlen = sizeof(TEST_STRING)-1;
22371   entry.action |= CONVRULE_CSS_ON_BIT;
22372
22373   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22374   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22375   ret = chxj_rencoding(&r, ret, &destlen);
22376   fprintf(stderr, "actual:[%s]\n", ret);
22377   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22378   CU_ASSERT(ret != NULL);
22379   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22380   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22381   CU_ASSERT(call_check == 0);
22382
22383   APR_TERM;
22384 #undef TEST_STRING
22385 #undef RESULT_STRING
22386 }
22387
22388 char *test_chxj_serf_get121(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
22389 {
22390   static char *css = "a:focus { display: none }\n"
22391                      "a:link  { display: none }\n"
22392                      "a       { display: none }\n"
22393                      "hr      { display: none }\n"
22394                      "a:visited { display:none }\n"
22395                      "div     { text-align:center }\n";
22396   *len = strlen(css);
22397   call_check = 1;
22398   return css;
22399 }
22400 void test_ixhtml10_div_tag_with_css_003()
22401 {
22402 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
22403                      "</head><body><div>あいう</div></body></html>"
22404 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22405                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22406                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22407                        "<head></head><body><div style=\"text-align:center;\">あいう</div></body></html>"
22408   char  *ret;
22409   char  *tmp;
22410   device_table spec;
22411   chxjconvrule_entry entry;
22412   cookie_t cookie;
22413   apr_size_t destlen;
22414   APR_INIT;
22415   chxj_serf_get = test_chxj_serf_get121;
22416   call_check = 0;
22417
22418   COOKIE_INIT(cookie);
22419
22420   SPEC_INIT(spec);
22421   destlen = sizeof(TEST_STRING)-1;
22422   entry.action |= CONVRULE_CSS_ON_BIT;
22423
22424   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22425   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22426   ret = chxj_rencoding(&r, ret, &destlen);
22427   fprintf(stderr, "actual:[%s]\n", ret);
22428   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22429   CU_ASSERT(ret != NULL);
22430   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22431   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22432   CU_ASSERT(call_check == 1);
22433
22434   APR_TERM;
22435 #undef TEST_STRING
22436 #undef RESULT_STRING
22437 }
22438 void test_ixhtml10_div_tag_with_css_004()
22439 {
22440 #define  TEST_STRING "<html><head>" \
22441                      "</head><body><div style=\"text-align:center\">あいう</div></body></html>"
22442 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22443                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22444                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22445                        "<head></head><body><div style=\"text-align:center;\">あいう</div></body></html>"
22446   char  *ret;
22447   char  *tmp;
22448   device_table spec;
22449   chxjconvrule_entry entry;
22450   cookie_t cookie;
22451   apr_size_t destlen;
22452   APR_INIT;
22453   chxj_serf_get = test_chxj_serf_get121;
22454   call_check = 0;
22455
22456   COOKIE_INIT(cookie);
22457
22458   SPEC_INIT(spec);
22459   destlen = sizeof(TEST_STRING)-1;
22460   entry.action |= CONVRULE_CSS_ON_BIT;
22461
22462   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22463   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22464   ret = chxj_rencoding(&r, ret, &destlen);
22465   fprintf(stderr, "actual:[%s]\n", ret);
22466   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22467   CU_ASSERT(ret != NULL);
22468   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22469   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22470   CU_ASSERT(call_check == 0);
22471
22472   APR_TERM;
22473 #undef TEST_STRING
22474 #undef RESULT_STRING
22475 }
22476 char *test_chxj_serf_get122(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
22477 {
22478   static char *css = "a:focus { display: none }\n"
22479                      "a:link  { display: none }\n"
22480                      "a       { display: none }\n"
22481                      "hr      { display: none }\n"
22482                      "a:visited { display:none }\n"
22483                      "div     { text-align:right }\n";
22484   *len = strlen(css);
22485   call_check = 1;
22486   return css;
22487 }
22488 void test_ixhtml10_div_tag_with_css_005()
22489 {
22490 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
22491                      "</head><body><div>あいう</div></body></html>"
22492 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22493                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22494                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22495                        "<head></head><body><div style=\"text-align:right;\">あいう</div></body></html>"
22496   char  *ret;
22497   char  *tmp;
22498   device_table spec;
22499   chxjconvrule_entry entry;
22500   cookie_t cookie;
22501   apr_size_t destlen;
22502   APR_INIT;
22503   chxj_serf_get = test_chxj_serf_get122;
22504   call_check = 0;
22505
22506   COOKIE_INIT(cookie);
22507
22508   SPEC_INIT(spec);
22509   destlen = sizeof(TEST_STRING)-1;
22510   entry.action |= CONVRULE_CSS_ON_BIT;
22511
22512   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22513   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22514   ret = chxj_rencoding(&r, ret, &destlen);
22515   fprintf(stderr, "actual:[%s]\n", ret);
22516   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22517   CU_ASSERT(ret != NULL);
22518   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22519   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22520   CU_ASSERT(call_check == 1);
22521
22522   APR_TERM;
22523 #undef TEST_STRING
22524 #undef RESULT_STRING
22525 }
22526 void test_ixhtml10_div_tag_with_css_006()
22527 {
22528 #define  TEST_STRING "<html><head>" \
22529                      "</head><body><div style=\"text-align:right\">あいう</div></body></html>"
22530 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22531                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22532                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22533                        "<head></head><body><div style=\"text-align:right;\">あいう</div></body></html>"
22534   char  *ret;
22535   char  *tmp;
22536   device_table spec;
22537   chxjconvrule_entry entry;
22538   cookie_t cookie;
22539   apr_size_t destlen;
22540   APR_INIT;
22541   chxj_serf_get = test_chxj_serf_get122;
22542   call_check = 0;
22543
22544   COOKIE_INIT(cookie);
22545
22546   SPEC_INIT(spec);
22547   destlen = sizeof(TEST_STRING)-1;
22548   entry.action |= CONVRULE_CSS_ON_BIT;
22549
22550   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22551   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22552   ret = chxj_rencoding(&r, ret, &destlen);
22553   fprintf(stderr, "actual:[%s]\n", ret);
22554   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22555   CU_ASSERT(ret != NULL);
22556   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22557   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22558   CU_ASSERT(call_check == 0);
22559
22560   APR_TERM;
22561 #undef TEST_STRING
22562 #undef RESULT_STRING
22563 }
22564 char *test_chxj_serf_get123(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
22565 {
22566   static char *css = "a:focus { display: none }\n"
22567                      "a:link  { display: none }\n"
22568                      "a       { display: none }\n"
22569                      "hr      { display: none }\n"
22570                      "a:visited { display:none }\n"
22571                      "div     { color:#ff0000 }\n";
22572   *len = strlen(css);
22573   call_check = 1;
22574   return css;
22575 }
22576 void test_ixhtml10_div_tag_with_css_007()
22577 {
22578 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
22579                      "</head><body><div>あいう</div></body></html>"
22580 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22581                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22582                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22583                        "<head></head><body><div style=\"color:#ff0000;\">あいう</div></body></html>"
22584   char  *ret;
22585   char  *tmp;
22586   device_table spec;
22587   chxjconvrule_entry entry;
22588   cookie_t cookie;
22589   apr_size_t destlen;
22590   APR_INIT;
22591   chxj_serf_get = test_chxj_serf_get123;
22592   call_check = 0;
22593
22594   COOKIE_INIT(cookie);
22595
22596   SPEC_INIT(spec);
22597   destlen = sizeof(TEST_STRING)-1;
22598   entry.action |= CONVRULE_CSS_ON_BIT;
22599
22600   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22601   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22602   ret = chxj_rencoding(&r, ret, &destlen);
22603   fprintf(stderr, "actual:[%s]\n", ret);
22604   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22605   CU_ASSERT(ret != NULL);
22606   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22607   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22608   CU_ASSERT(call_check == 1);
22609
22610   APR_TERM;
22611 #undef TEST_STRING
22612 #undef RESULT_STRING
22613 }
22614 void test_ixhtml10_div_tag_with_css_008()
22615 {
22616 #define  TEST_STRING "<html><head>" \
22617                      "</head><body><div style=\"color:#ff0000\">あいう</div></body></html>"
22618 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22619                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22620                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22621                        "<head></head><body><div style=\"color:#ff0000;\">あいう</div></body></html>"
22622   char  *ret;
22623   char  *tmp;
22624   device_table spec;
22625   chxjconvrule_entry entry;
22626   cookie_t cookie;
22627   apr_size_t destlen;
22628   APR_INIT;
22629   chxj_serf_get = test_chxj_serf_get123;
22630   call_check = 0;
22631
22632   COOKIE_INIT(cookie);
22633
22634   SPEC_INIT(spec);
22635   destlen = sizeof(TEST_STRING)-1;
22636   entry.action |= CONVRULE_CSS_ON_BIT;
22637
22638   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22639   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22640   ret = chxj_rencoding(&r, ret, &destlen);
22641   fprintf(stderr, "actual:[%s]\n", ret);
22642   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22643   CU_ASSERT(ret != NULL);
22644   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22645   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22646   CU_ASSERT(call_check == 0);
22647
22648   APR_TERM;
22649 #undef TEST_STRING
22650 #undef RESULT_STRING
22651 }
22652 char *test_chxj_serf_get124(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
22653 {
22654   static char *css = "a:focus { display: none }\n"
22655                      "a:link  { display: none }\n"
22656                      "a       { display: none }\n"
22657                      "hr      { display: none }\n"
22658                      "a:visited { display:none }\n"
22659                      "div     { text-decoration:blink }\n";
22660   *len = strlen(css);
22661   call_check = 1;
22662   return css;
22663 }
22664 void test_ixhtml10_div_tag_with_css_009()
22665 {
22666 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
22667                      "</head><body><div>あいう</div></body></html>"
22668 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22669                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22670                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22671                        "<head></head><body><div style=\"text-decoration:blink;\">あいう</div></body></html>"
22672   char  *ret;
22673   char  *tmp;
22674   device_table spec;
22675   chxjconvrule_entry entry;
22676   cookie_t cookie;
22677   apr_size_t destlen;
22678   APR_INIT;
22679   chxj_serf_get = test_chxj_serf_get124;
22680   call_check = 0;
22681
22682   COOKIE_INIT(cookie);
22683
22684   SPEC_INIT(spec);
22685   destlen = sizeof(TEST_STRING)-1;
22686   entry.action |= CONVRULE_CSS_ON_BIT;
22687
22688   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22689   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22690   ret = chxj_rencoding(&r, ret, &destlen);
22691   fprintf(stderr, "actual:[%s]\n", ret);
22692   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22693   CU_ASSERT(ret != NULL);
22694   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22695   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22696   CU_ASSERT(call_check == 1);
22697
22698   APR_TERM;
22699 #undef TEST_STRING
22700 #undef RESULT_STRING
22701 }
22702 void test_ixhtml10_div_tag_with_css_010()
22703 {
22704 #define  TEST_STRING "<html><head>" \
22705                      "</head><body><div style=\"text-decoration:blink\">あいう</div></body></html>"
22706 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22707                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22708                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22709                        "<head></head><body><div style=\"text-decoration:blink;\">あいう</div></body></html>"
22710   char  *ret;
22711   char  *tmp;
22712   device_table spec;
22713   chxjconvrule_entry entry;
22714   cookie_t cookie;
22715   apr_size_t destlen;
22716   APR_INIT;
22717   chxj_serf_get = test_chxj_serf_get124;
22718   call_check = 0;
22719
22720   COOKIE_INIT(cookie);
22721
22722   SPEC_INIT(spec);
22723   destlen = sizeof(TEST_STRING)-1;
22724   entry.action |= CONVRULE_CSS_ON_BIT;
22725
22726   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22727   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22728   ret = chxj_rencoding(&r, ret, &destlen);
22729   fprintf(stderr, "actual:[%s]\n", ret);
22730   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22731   CU_ASSERT(ret != NULL);
22732   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22733   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22734   CU_ASSERT(call_check == 0);
22735
22736   APR_TERM;
22737 #undef TEST_STRING
22738 #undef RESULT_STRING
22739 }
22740 char *test_chxj_serf_get125(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
22741 {
22742   static char *css = "a:focus { display: none }\n"
22743                      "a:link  { display: none }\n"
22744                      "a       { display: none }\n"
22745                      "hr      { display: none }\n"
22746                      "a:visited { display:none }\n"
22747                      "div     { display:-wap-marquee }\n";
22748   *len = strlen(css);
22749   call_check = 1;
22750   return css;
22751 }
22752 void test_ixhtml10_div_tag_with_css_011()
22753 {
22754 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
22755                      "</head><body><div>あいう</div></body></html>"
22756 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22757                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22758                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22759                        "<head></head><body><div style=\"display:-wap-marquee;\">あいう</div></body></html>"
22760   char  *ret;
22761   char  *tmp;
22762   device_table spec;
22763   chxjconvrule_entry entry;
22764   cookie_t cookie;
22765   apr_size_t destlen;
22766   APR_INIT;
22767   chxj_serf_get = test_chxj_serf_get125;
22768   call_check = 0;
22769
22770   COOKIE_INIT(cookie);
22771
22772   SPEC_INIT(spec);
22773   destlen = sizeof(TEST_STRING)-1;
22774   entry.action |= CONVRULE_CSS_ON_BIT;
22775
22776   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22777   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22778   ret = chxj_rencoding(&r, ret, &destlen);
22779   fprintf(stderr, "actual:[%s]\n", ret);
22780   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22781   CU_ASSERT(ret != NULL);
22782   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22783   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22784   CU_ASSERT(call_check == 1);
22785
22786   APR_TERM;
22787 #undef TEST_STRING
22788 #undef RESULT_STRING
22789 }
22790 void test_ixhtml10_div_tag_with_css_012()
22791 {
22792 #define  TEST_STRING "<html><head>" \
22793                      "</head><body><div style=\"display:-wap-marquee\">あいう</div></body></html>"
22794 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22795                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22796                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22797                        "<head></head><body><div style=\"display:-wap-marquee;\">あいう</div></body></html>"
22798   char  *ret;
22799   char  *tmp;
22800   device_table spec;
22801   chxjconvrule_entry entry;
22802   cookie_t cookie;
22803   apr_size_t destlen;
22804   APR_INIT;
22805   chxj_serf_get = test_chxj_serf_get125;
22806   call_check = 0;
22807
22808   COOKIE_INIT(cookie);
22809
22810   SPEC_INIT(spec);
22811   destlen = sizeof(TEST_STRING)-1;
22812   entry.action |= CONVRULE_CSS_ON_BIT;
22813
22814   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22815   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22816   ret = chxj_rencoding(&r, ret, &destlen);
22817   fprintf(stderr, "actual:[%s]\n", ret);
22818   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22819   CU_ASSERT(ret != NULL);
22820   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22821   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22822   CU_ASSERT(call_check == 0);
22823
22824   APR_TERM;
22825 #undef TEST_STRING
22826 #undef RESULT_STRING
22827 }
22828 char *test_chxj_serf_get126(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
22829 {
22830   static char *css = "a:focus { display: none }\n"
22831                      "a:link  { display: none }\n"
22832                      "a       { display: none }\n"
22833                      "hr      { display: none }\n"
22834                      "a:visited { display:none }\n"
22835                      "div     { display:-wap-marquee;\n"
22836                      "          -wap-marquee-style: scroll; }\n";
22837
22838   *len = strlen(css);
22839   call_check = 1;
22840   return css;
22841 }
22842 void test_ixhtml10_div_tag_with_css_013()
22843 {
22844 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
22845                      "</head><body><div>あいう</div></body></html>"
22846 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22847                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22848                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22849                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:scroll;\">あいう</div></body></html>"
22850   char  *ret;
22851   char  *tmp;
22852   device_table spec;
22853   chxjconvrule_entry entry;
22854   cookie_t cookie;
22855   apr_size_t destlen;
22856   APR_INIT;
22857   chxj_serf_get = test_chxj_serf_get126;
22858   call_check = 0;
22859
22860   COOKIE_INIT(cookie);
22861
22862   SPEC_INIT(spec);
22863   destlen = sizeof(TEST_STRING)-1;
22864   entry.action |= CONVRULE_CSS_ON_BIT;
22865
22866   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22867   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22868   ret = chxj_rencoding(&r, ret, &destlen);
22869   fprintf(stderr, "actual:[%s]\n", ret);
22870   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22871   CU_ASSERT(ret != NULL);
22872   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22873   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22874   CU_ASSERT(call_check == 1);
22875
22876   APR_TERM;
22877 #undef TEST_STRING
22878 #undef RESULT_STRING
22879 }
22880 void test_ixhtml10_div_tag_with_css_014()
22881 {
22882 #define  TEST_STRING "<html><head>" \
22883                      "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:scroll;\">あいう</div></body></html>"
22884 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22885                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22886                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22887                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:scroll;\">あいう</div></body></html>"
22888   char  *ret;
22889   char  *tmp;
22890   device_table spec;
22891   chxjconvrule_entry entry;
22892   cookie_t cookie;
22893   apr_size_t destlen;
22894   APR_INIT;
22895   chxj_serf_get = test_chxj_serf_get126;
22896   call_check = 0;
22897
22898   COOKIE_INIT(cookie);
22899
22900   SPEC_INIT(spec);
22901   destlen = sizeof(TEST_STRING)-1;
22902   entry.action |= CONVRULE_CSS_ON_BIT;
22903
22904   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22905   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22906   ret = chxj_rencoding(&r, ret, &destlen);
22907   fprintf(stderr, "actual:[%s]\n", ret);
22908   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22909   CU_ASSERT(ret != NULL);
22910   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22911   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22912   CU_ASSERT(call_check == 0);
22913
22914   APR_TERM;
22915 #undef TEST_STRING
22916 #undef RESULT_STRING
22917 }
22918 char *test_chxj_serf_get127(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
22919 {
22920   static char *css = "a:focus { display: none }\n"
22921                      "a:link  { display: none }\n"
22922                      "a       { display: none }\n"
22923                      "hr      { display: none }\n"
22924                      "a:visited { display:none }\n"
22925                      "div     { display:-wap-marquee;\n"
22926                      "          -wap-marquee-style: slide; }\n";
22927
22928   *len = strlen(css);
22929   call_check = 1;
22930   return css;
22931 }
22932 void test_ixhtml10_div_tag_with_css_015()
22933 {
22934 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
22935                      "</head><body><div>あいう</div></body></html>"
22936 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22937                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22938                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22939                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:slide;\">あいう</div></body></html>"
22940   char  *ret;
22941   char  *tmp;
22942   device_table spec;
22943   chxjconvrule_entry entry;
22944   cookie_t cookie;
22945   apr_size_t destlen;
22946   APR_INIT;
22947   chxj_serf_get = test_chxj_serf_get127;
22948   call_check = 0;
22949
22950   COOKIE_INIT(cookie);
22951
22952   SPEC_INIT(spec);
22953   destlen = sizeof(TEST_STRING)-1;
22954   entry.action |= CONVRULE_CSS_ON_BIT;
22955
22956   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22957   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22958   ret = chxj_rencoding(&r, ret, &destlen);
22959   fprintf(stderr, "actual:[%s]\n", ret);
22960   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22961   CU_ASSERT(ret != NULL);
22962   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
22963   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
22964   CU_ASSERT(call_check == 1);
22965
22966   APR_TERM;
22967 #undef TEST_STRING
22968 #undef RESULT_STRING
22969 }
22970 void test_ixhtml10_div_tag_with_css_016()
22971 {
22972 #define  TEST_STRING "<html><head>" \
22973                      "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:slide;\">あいう</div></body></html>"
22974 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
22975                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
22976                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
22977                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:slide;\">あいう</div></body></html>"
22978   char  *ret;
22979   char  *tmp;
22980   device_table spec;
22981   chxjconvrule_entry entry;
22982   cookie_t cookie;
22983   apr_size_t destlen;
22984   APR_INIT;
22985   chxj_serf_get = test_chxj_serf_get127;
22986   call_check = 0;
22987
22988   COOKIE_INIT(cookie);
22989
22990   SPEC_INIT(spec);
22991   destlen = sizeof(TEST_STRING)-1;
22992   entry.action |= CONVRULE_CSS_ON_BIT;
22993
22994   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
22995   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
22996   ret = chxj_rencoding(&r, ret, &destlen);
22997   fprintf(stderr, "actual:[%s]\n", ret);
22998   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
22999   CU_ASSERT(ret != NULL);
23000   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23001   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23002   CU_ASSERT(call_check == 0);
23003
23004   APR_TERM;
23005 #undef TEST_STRING
23006 #undef RESULT_STRING
23007 }
23008 char *test_chxj_serf_get128(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
23009 {
23010   static char *css = "a:focus { display: none }\n"
23011                      "a:link  { display: none }\n"
23012                      "a       { display: none }\n"
23013                      "hr      { display: none }\n"
23014                      "a:visited { display:none }\n"
23015                      "div     { display:-wap-marquee;\n"
23016                      "          -wap-marquee-style: alternate }\n";
23017
23018   *len = strlen(css);
23019   call_check = 1;
23020   return css;
23021 }
23022 void test_ixhtml10_div_tag_with_css_017()
23023 {
23024 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
23025                      "</head><body><div>あいう</div></body></html>"
23026 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23027                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23028                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23029                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;\">あいう</div></body></html>"
23030   char  *ret;
23031   char  *tmp;
23032   device_table spec;
23033   chxjconvrule_entry entry;
23034   cookie_t cookie;
23035   apr_size_t destlen;
23036   APR_INIT;
23037   chxj_serf_get = test_chxj_serf_get128;
23038   call_check = 0;
23039
23040   COOKIE_INIT(cookie);
23041
23042   SPEC_INIT(spec);
23043   destlen = sizeof(TEST_STRING)-1;
23044   entry.action |= CONVRULE_CSS_ON_BIT;
23045
23046   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23047   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23048   ret = chxj_rencoding(&r, ret, &destlen);
23049   fprintf(stderr, "actual:[%s]\n", ret);
23050   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23051   CU_ASSERT(ret != NULL);
23052   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23053   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23054   CU_ASSERT(call_check == 1);
23055
23056   APR_TERM;
23057 #undef TEST_STRING
23058 #undef RESULT_STRING
23059 }
23060 void test_ixhtml10_div_tag_with_css_018()
23061 {
23062 #define  TEST_STRING "<html><head>" \
23063                      "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate\">あいう</div></body></html>"
23064 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23065                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23066                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23067                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;\">あいう</div></body></html>"
23068   char  *ret;
23069   char  *tmp;
23070   device_table spec;
23071   chxjconvrule_entry entry;
23072   cookie_t cookie;
23073   apr_size_t destlen;
23074   APR_INIT;
23075   chxj_serf_get = test_chxj_serf_get128;
23076   call_check = 0;
23077
23078   COOKIE_INIT(cookie);
23079
23080   SPEC_INIT(spec);
23081   destlen = sizeof(TEST_STRING)-1;
23082   entry.action |= CONVRULE_CSS_ON_BIT;
23083
23084   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23085   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23086   ret = chxj_rencoding(&r, ret, &destlen);
23087   fprintf(stderr, "actual:[%s]\n", ret);
23088   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23089   CU_ASSERT(ret != NULL);
23090   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23091   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23092   CU_ASSERT(call_check == 0);
23093
23094   APR_TERM;
23095 #undef TEST_STRING
23096 #undef RESULT_STRING
23097 }
23098 char *test_chxj_serf_get129(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
23099 {
23100   static char *css = "a:focus { display: none }\n"
23101                      "a:link  { display: none }\n"
23102                      "a       { display: none }\n"
23103                      "hr      { display: none }\n"
23104                      "a:visited { display:none }\n"
23105                      "div     { display:-wap-marquee;\n"
23106                      "          -wap-marquee-style: alternate;-wap-marquee-dir:ltr }\n";
23107
23108   *len = strlen(css);
23109   call_check = 1;
23110   return css;
23111 }
23112 void test_ixhtml10_div_tag_with_css_019()
23113 {
23114 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
23115                      "</head><body><div>あいう</div></body></html>"
23116 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23117                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23118                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23119                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:ltr;\">あいう</div></body></html>"
23120   char  *ret;
23121   char  *tmp;
23122   device_table spec;
23123   chxjconvrule_entry entry;
23124   cookie_t cookie;
23125   apr_size_t destlen;
23126   APR_INIT;
23127   chxj_serf_get = test_chxj_serf_get129;
23128   call_check = 0;
23129
23130   COOKIE_INIT(cookie);
23131
23132   SPEC_INIT(spec);
23133   destlen = sizeof(TEST_STRING)-1;
23134   entry.action |= CONVRULE_CSS_ON_BIT;
23135
23136   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23137   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23138   ret = chxj_rencoding(&r, ret, &destlen);
23139   fprintf(stderr, "actual:[%s]\n", ret);
23140   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23141   CU_ASSERT(ret != NULL);
23142   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23143   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23144   CU_ASSERT(call_check == 1);
23145
23146   APR_TERM;
23147 #undef TEST_STRING
23148 #undef RESULT_STRING
23149 }
23150 void test_ixhtml10_div_tag_with_css_020()
23151 {
23152 #define  TEST_STRING "<html><head>" \
23153                      "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:ltr\">あいう</div></body></html>"
23154 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23155                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23156                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23157                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:ltr;\">あいう</div></body></html>"
23158   char  *ret;
23159   char  *tmp;
23160   device_table spec;
23161   chxjconvrule_entry entry;
23162   cookie_t cookie;
23163   apr_size_t destlen;
23164   APR_INIT;
23165   chxj_serf_get = test_chxj_serf_get129;
23166   call_check = 0;
23167
23168   COOKIE_INIT(cookie);
23169
23170   SPEC_INIT(spec);
23171   destlen = sizeof(TEST_STRING)-1;
23172   entry.action |= CONVRULE_CSS_ON_BIT;
23173
23174   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23175   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23176   ret = chxj_rencoding(&r, ret, &destlen);
23177   fprintf(stderr, "actual:[%s]\n", ret);
23178   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23179   CU_ASSERT(ret != NULL);
23180   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23181   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23182   CU_ASSERT(call_check == 0);
23183
23184   APR_TERM;
23185 #undef TEST_STRING
23186 #undef RESULT_STRING
23187 }
23188 char *test_chxj_serf_get130(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
23189 {
23190   static char *css = "a:focus { display: none }\n"
23191                      "a:link  { display: none }\n"
23192                      "a       { display: none }\n"
23193                      "hr      { display: none }\n"
23194                      "a:visited { display:none }\n"
23195                      "div     { display:-wap-marquee;-wap-marquee-style: alternate;-wap-marquee-dir:rtl }\n";
23196
23197   *len = strlen(css);
23198   call_check = 1;
23199   return css;
23200 }
23201 void test_ixhtml10_div_tag_with_css_021()
23202 {
23203 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
23204                      "</head><body><div>あいう</div></body></html>"
23205 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23206                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23207                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23208                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl;\">あいう</div></body></html>"
23209   char  *ret;
23210   char  *tmp;
23211   device_table spec;
23212   chxjconvrule_entry entry;
23213   cookie_t cookie;
23214   apr_size_t destlen;
23215   APR_INIT;
23216   chxj_serf_get = test_chxj_serf_get130;
23217   call_check = 0;
23218
23219   COOKIE_INIT(cookie);
23220
23221   SPEC_INIT(spec);
23222   destlen = sizeof(TEST_STRING)-1;
23223   entry.action |= CONVRULE_CSS_ON_BIT;
23224
23225   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23226   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23227   ret = chxj_rencoding(&r, ret, &destlen);
23228   fprintf(stderr, "actual:[%s]\n", ret);
23229   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23230   CU_ASSERT(ret != NULL);
23231   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23232   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23233   CU_ASSERT(call_check == 1);
23234
23235   APR_TERM;
23236 #undef TEST_STRING
23237 #undef RESULT_STRING
23238 }
23239 void test_ixhtml10_div_tag_with_css_022()
23240 {
23241 #define  TEST_STRING "<html><head>" \
23242                      "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl\">あいう</div></body></html>"
23243 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23244                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23245                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23246                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl;\">あいう</div></body></html>"
23247   char  *ret;
23248   char  *tmp;
23249   device_table spec;
23250   chxjconvrule_entry entry;
23251   cookie_t cookie;
23252   apr_size_t destlen;
23253   APR_INIT;
23254   chxj_serf_get = test_chxj_serf_get130;
23255   call_check = 0;
23256
23257   COOKIE_INIT(cookie);
23258
23259   SPEC_INIT(spec);
23260   destlen = sizeof(TEST_STRING)-1;
23261   entry.action |= CONVRULE_CSS_ON_BIT;
23262
23263   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23264   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23265   ret = chxj_rencoding(&r, ret, &destlen);
23266   fprintf(stderr, "actual:[%s]\n", ret);
23267   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23268   CU_ASSERT(ret != NULL);
23269   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23270   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23271   CU_ASSERT(call_check == 0);
23272
23273   APR_TERM;
23274 #undef TEST_STRING
23275 #undef RESULT_STRING
23276 }
23277 char *test_chxj_serf_get131(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
23278 {
23279   static char *css = "a:focus { display: none }\n"
23280                      "a:link  { display: none }\n"
23281                      "a       { display: none }\n"
23282                      "hr      { display: none }\n"
23283                      "a:visited { display:none }\n"
23284                      "div     { display:-wap-marquee;-wap-marquee-style: alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:1 }\n";
23285
23286   *len = strlen(css);
23287   call_check = 1;
23288   return css;
23289 }
23290 void test_ixhtml10_div_tag_with_css_023()
23291 {
23292 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
23293                      "</head><body><div>あいう</div></body></html>"
23294 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23295                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23296                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23297                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:1;\">あいう</div></body></html>"
23298   char  *ret;
23299   char  *tmp;
23300   device_table spec;
23301   chxjconvrule_entry entry;
23302   cookie_t cookie;
23303   apr_size_t destlen;
23304   APR_INIT;
23305   chxj_serf_get = test_chxj_serf_get131;
23306   call_check = 0;
23307
23308   COOKIE_INIT(cookie);
23309
23310   SPEC_INIT(spec);
23311   destlen = sizeof(TEST_STRING)-1;
23312   entry.action |= CONVRULE_CSS_ON_BIT;
23313
23314   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23315   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23316   ret = chxj_rencoding(&r, ret, &destlen);
23317   fprintf(stderr, "actual:[%s]\n", ret);
23318   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23319   CU_ASSERT(ret != NULL);
23320   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23321   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23322   CU_ASSERT(call_check == 1);
23323
23324   APR_TERM;
23325 #undef TEST_STRING
23326 #undef RESULT_STRING
23327 }
23328 void test_ixhtml10_div_tag_with_css_024()
23329 {
23330 #define  TEST_STRING "<html><head>" \
23331                      "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:1\">あいう</div></body></html>"
23332 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23333                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23334                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23335                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:1;\">あいう</div></body></html>"
23336   char  *ret;
23337   char  *tmp;
23338   device_table spec;
23339   chxjconvrule_entry entry;
23340   cookie_t cookie;
23341   apr_size_t destlen;
23342   APR_INIT;
23343   chxj_serf_get = test_chxj_serf_get131;
23344   call_check = 0;
23345
23346   COOKIE_INIT(cookie);
23347
23348   SPEC_INIT(spec);
23349   destlen = sizeof(TEST_STRING)-1;
23350   entry.action |= CONVRULE_CSS_ON_BIT;
23351
23352   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23353   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23354   ret = chxj_rencoding(&r, ret, &destlen);
23355   fprintf(stderr, "actual:[%s]\n", ret);
23356   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23357   CU_ASSERT(ret != NULL);
23358   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23359   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23360   CU_ASSERT(call_check == 0);
23361
23362   APR_TERM;
23363 #undef TEST_STRING
23364 #undef RESULT_STRING
23365 }
23366 char *test_chxj_serf_get132(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
23367 {
23368   static char *css = "a:focus { display: none }\n"
23369                      "a:link  { display: none }\n"
23370                      "a       { display: none }\n"
23371                      "hr      { display: none }\n"
23372                      "a:visited { display:none }\n"
23373                      "div     { display:-wap-marquee;\n"
23374                      "          -wap-marquee-style: alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:16 }\n";
23375
23376   *len = strlen(css);
23377   call_check = 1;
23378   return css;
23379 }
23380 void test_ixhtml10_div_tag_with_css_025()
23381 {
23382 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
23383                      "</head><body><div>あいう</div></body></html>"
23384 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23385                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23386                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23387                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:16;\">あいう</div></body></html>"
23388   char  *ret;
23389   char  *tmp;
23390   device_table spec;
23391   chxjconvrule_entry entry;
23392   cookie_t cookie;
23393   apr_size_t destlen;
23394   APR_INIT;
23395   chxj_serf_get = test_chxj_serf_get132;
23396   call_check = 0;
23397
23398   COOKIE_INIT(cookie);
23399
23400   SPEC_INIT(spec);
23401   destlen = sizeof(TEST_STRING)-1;
23402   entry.action |= CONVRULE_CSS_ON_BIT;
23403
23404   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23405   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23406   ret = chxj_rencoding(&r, ret, &destlen);
23407   fprintf(stderr, "actual:[%s]\n", ret);
23408   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23409   CU_ASSERT(ret != NULL);
23410   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23411   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23412   CU_ASSERT(call_check == 1);
23413
23414   APR_TERM;
23415 #undef TEST_STRING
23416 #undef RESULT_STRING
23417 }
23418 void test_ixhtml10_div_tag_with_css_026()
23419 {
23420 #define  TEST_STRING "<html><head>" \
23421                      "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:16\">あいう</div></body></html>"
23422 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23423                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23424                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23425                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:16;\">あいう</div></body></html>"
23426   char  *ret;
23427   char  *tmp;
23428   device_table spec;
23429   chxjconvrule_entry entry;
23430   cookie_t cookie;
23431   apr_size_t destlen;
23432   APR_INIT;
23433   chxj_serf_get = test_chxj_serf_get132;
23434   call_check = 0;
23435
23436   COOKIE_INIT(cookie);
23437
23438   SPEC_INIT(spec);
23439   destlen = sizeof(TEST_STRING)-1;
23440   entry.action |= CONVRULE_CSS_ON_BIT;
23441
23442   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23443   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23444   ret = chxj_rencoding(&r, ret, &destlen);
23445   fprintf(stderr, "actual:[%s]\n", ret);
23446   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23447   CU_ASSERT(ret != NULL);
23448   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23449   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23450   CU_ASSERT(call_check == 0);
23451
23452   APR_TERM;
23453 #undef TEST_STRING
23454 #undef RESULT_STRING
23455 }
23456 char *test_chxj_serf_get133(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
23457 {
23458   static char *css = "a:focus { display: none }\n"
23459                      "a:link  { display: none }\n"
23460                      "a       { display: none }\n"
23461                      "hr      { display: none }\n"
23462                      "a:visited { display:none }\n"
23463                      "div     { display:-wap-marquee;-wap-marquee-style: alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:infinite }\n";
23464
23465   *len = strlen(css);
23466   call_check = 1;
23467   return css;
23468 }
23469 void test_ixhtml10_div_tag_with_css_027()
23470 {
23471 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
23472                      "</head><body><div>あいう</div></body></html>"
23473 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23474                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23475                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23476                         "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:infinite;\">あいう</div></body></html>"
23477   char  *ret;
23478   char  *tmp;
23479   device_table spec;
23480   chxjconvrule_entry entry;
23481   cookie_t cookie;
23482   apr_size_t destlen;
23483   APR_INIT;
23484   chxj_serf_get = test_chxj_serf_get133;
23485   call_check = 0;
23486
23487   COOKIE_INIT(cookie);
23488
23489   SPEC_INIT(spec);
23490   destlen = sizeof(TEST_STRING)-1;
23491   entry.action |= CONVRULE_CSS_ON_BIT;
23492
23493   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23494   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23495   ret = chxj_rencoding(&r, ret, &destlen);
23496   fprintf(stderr, "actual:[%s]\n", ret);
23497   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23498   CU_ASSERT(ret != NULL);
23499   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23500   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23501   CU_ASSERT(call_check == 1);
23502
23503   APR_TERM;
23504 #undef TEST_STRING
23505 #undef RESULT_STRING
23506 }
23507 void test_ixhtml10_div_tag_with_css_028()
23508 {
23509 #define  TEST_STRING "<html><head>" \
23510                      "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:infinite;\">あいう</div></body></html>"
23511 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23512                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23513                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23514                        "<head></head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:infinite;\">あいう</div></body></html>"
23515   char  *ret;
23516   char  *tmp;
23517   device_table spec;
23518   chxjconvrule_entry entry;
23519   cookie_t cookie;
23520   apr_size_t destlen;
23521   APR_INIT;
23522   chxj_serf_get = test_chxj_serf_get133;
23523   call_check = 0;
23524
23525   COOKIE_INIT(cookie);
23526
23527   SPEC_INIT(spec);
23528   destlen = sizeof(TEST_STRING)-1;
23529   entry.action |= CONVRULE_CSS_ON_BIT;
23530
23531   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23532   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23533   ret = chxj_rencoding(&r, ret, &destlen);
23534   fprintf(stderr, "actual:[%s]\n", ret);
23535   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23536   CU_ASSERT(ret != NULL);
23537   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23538   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23539   CU_ASSERT(call_check == 0);
23540
23541   APR_TERM;
23542 #undef TEST_STRING
23543 #undef RESULT_STRING
23544 }
23545 char *test_chxj_serf_get134(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
23546 {
23547   static char *css = "a:focus { display: none }\n"
23548                      "a:link  { display: none }\n"
23549                      "a       { display: none }\n"
23550                      "hr      { display: none }\n"
23551                      "a:visited { display:none }\n"
23552                      "div     { font-size:xx-small; }\n";
23553
23554   *len = strlen(css);
23555   call_check = 1;
23556   return css;
23557 }
23558 void test_ixhtml10_div_tag_with_css_029()
23559 {
23560 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
23561                      "</head><body><div>あいう</div></body></html>"
23562 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23563                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23564                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23565                        "<head></head><body><div style=\"font-size:xx-small;\">あいう</div></body></html>"
23566   char  *ret;
23567   char  *tmp;
23568   device_table spec;
23569   chxjconvrule_entry entry;
23570   cookie_t cookie;
23571   apr_size_t destlen;
23572   APR_INIT;
23573   chxj_serf_get = test_chxj_serf_get134;
23574   call_check = 0;
23575
23576   COOKIE_INIT(cookie);
23577
23578   SPEC_INIT(spec);
23579   destlen = sizeof(TEST_STRING)-1;
23580   entry.action |= CONVRULE_CSS_ON_BIT;
23581
23582   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23583   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23584   ret = chxj_rencoding(&r, ret, &destlen);
23585   fprintf(stderr, "actual:[%s]\n", ret);
23586   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23587   CU_ASSERT(ret != NULL);
23588   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23589   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23590   CU_ASSERT(call_check == 1);
23591
23592   APR_TERM;
23593 #undef TEST_STRING
23594 #undef RESULT_STRING
23595 }
23596 void test_ixhtml10_div_tag_with_css_030()
23597 {
23598 #define  TEST_STRING "<html><head>" \
23599                      "</head><body><div style=\"font-size:xx-small;\">あいう</div></body></html>"
23600 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23601                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23602                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23603                        "<head></head><body><div style=\"font-size:xx-small;\">あいう</div></body></html>"
23604   char  *ret;
23605   char  *tmp;
23606   device_table spec;
23607   chxjconvrule_entry entry;
23608   cookie_t cookie;
23609   apr_size_t destlen;
23610   APR_INIT;
23611   chxj_serf_get = test_chxj_serf_get134;
23612   call_check = 0;
23613
23614   COOKIE_INIT(cookie);
23615
23616   SPEC_INIT(spec);
23617   destlen = sizeof(TEST_STRING)-1;
23618   entry.action |= CONVRULE_CSS_ON_BIT;
23619
23620   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23621   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23622   ret = chxj_rencoding(&r, ret, &destlen);
23623   fprintf(stderr, "actual:[%s]\n", ret);
23624   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23625   CU_ASSERT(ret != NULL);
23626   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23627   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23628   CU_ASSERT(call_check == 0);
23629
23630   APR_TERM;
23631 #undef TEST_STRING
23632 #undef RESULT_STRING
23633 }
23634
23635 char *test_chxj_serf_get135(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
23636 {
23637   static char *css = "a:focus { display: none }\n"
23638                      "a:link  { display: none }\n"
23639                      "a       { display: none }\n"
23640                      "hr      { display: none }\n"
23641                      "a:visited { display:none }\n"
23642                      "div     { font-size:x-small; }\n";
23643
23644   *len = strlen(css);
23645   call_check = 1;
23646   return css;
23647 }
23648 void test_ixhtml10_div_tag_with_css_031()
23649 {
23650 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
23651                      "</head><body><div>あいう</div></body></html>"
23652 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23653                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23654                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23655                        "<head></head><body><div style=\"font-size:x-small;\">あいう</div></body></html>"
23656   char  *ret;
23657   char  *tmp;
23658   device_table spec;
23659   chxjconvrule_entry entry;
23660   cookie_t cookie;
23661   apr_size_t destlen;
23662   APR_INIT;
23663   chxj_serf_get = test_chxj_serf_get135;
23664   call_check = 0;
23665
23666   COOKIE_INIT(cookie);
23667
23668   SPEC_INIT(spec);
23669   destlen = sizeof(TEST_STRING)-1;
23670   entry.action |= CONVRULE_CSS_ON_BIT;
23671
23672   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23673   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23674   ret = chxj_rencoding(&r, ret, &destlen);
23675   fprintf(stderr, "actual:[%s]\n", ret);
23676   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23677   CU_ASSERT(ret != NULL);
23678   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23679   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23680   CU_ASSERT(call_check == 1);
23681
23682   APR_TERM;
23683 #undef TEST_STRING
23684 #undef RESULT_STRING
23685 }
23686 void test_ixhtml10_div_tag_with_css_032()
23687 {
23688 #define  TEST_STRING "<html><head>" \
23689                      "</head><body><div style=\"font-size:x-small;\">あいう</div></body></html>"
23690 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23691                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23692                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23693                        "<head></head><body><div style=\"font-size:x-small;\">あいう</div></body></html>"
23694   char  *ret;
23695   char  *tmp;
23696   device_table spec;
23697   chxjconvrule_entry entry;
23698   cookie_t cookie;
23699   apr_size_t destlen;
23700   APR_INIT;
23701   chxj_serf_get = test_chxj_serf_get135;
23702   call_check = 0;
23703
23704   COOKIE_INIT(cookie);
23705
23706   SPEC_INIT(spec);
23707   destlen = sizeof(TEST_STRING)-1;
23708   entry.action |= CONVRULE_CSS_ON_BIT;
23709
23710   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23711   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23712   ret = chxj_rencoding(&r, ret, &destlen);
23713   fprintf(stderr, "actual:[%s]\n", ret);
23714   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23715   CU_ASSERT(ret != NULL);
23716   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23717   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23718   CU_ASSERT(call_check == 0);
23719
23720   APR_TERM;
23721 #undef TEST_STRING
23722 #undef RESULT_STRING
23723 }
23724
23725 char *test_chxj_serf_get136(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
23726 {
23727   static char *css = "a:focus { display: none }\n"
23728                      "a:link  { display: none }\n"
23729                      "a       { display: none }\n"
23730                      "hr      { display: none }\n"
23731                      "a:visited { display:none }\n"
23732                      "div     { font-size:small; }\n";
23733
23734   *len = strlen(css);
23735   call_check = 1;
23736   return css;
23737 }
23738 void test_ixhtml10_div_tag_with_css_033()
23739 {
23740 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
23741                      "</head><body><div>あいう</div></body></html>"
23742 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23743                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23744                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23745                        "<head></head><body><div style=\"font-size:small;\">あいう</div></body></html>"
23746   char  *ret;
23747   char  *tmp;
23748   device_table spec;
23749   chxjconvrule_entry entry;
23750   cookie_t cookie;
23751   apr_size_t destlen;
23752   APR_INIT;
23753   chxj_serf_get = test_chxj_serf_get136;
23754   call_check = 0;
23755
23756   COOKIE_INIT(cookie);
23757
23758   SPEC_INIT(spec);
23759   destlen = sizeof(TEST_STRING)-1;
23760   entry.action |= CONVRULE_CSS_ON_BIT;
23761
23762   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23763   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23764   ret = chxj_rencoding(&r, ret, &destlen);
23765   fprintf(stderr, "actual:[%s]\n", ret);
23766   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
23767   CU_ASSERT(ret != NULL);
23768   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23769   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23770   CU_ASSERT(call_check == 1);
23771
23772   APR_TERM;
23773 #undef TEST_STRING
23774 #undef RESULT_STRING
23775 }
23776 void test_ixhtml10_div_tag_with_css_034()
23777 {
23778 #define  TEST_STRING "<html><head>" \
23779                      "</head><body><div style=\"font-size:small;\">あいう</div></body></html>"
23780 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
23781                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
23782                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
23783                        "<head></head><body><div><div style=\"font-size:small;\">あいう</div></div></body></html>"
23784   char  *ret;
23785   char  *tmp;
23786   device_table spec;
23787   chxjconvrule_entry entry;
23788   cookie_t cookie;
23789   apr_size_t destlen;
23790   APR_INIT;
23791   chxj_serf_get = test_chxj_serf_get136;
23792   call_check = 0;
23793
23794   COOKIE_INIT(cookie);
23795
23796   SPEC_INIT(spec);
23797   destlen = sizeof(TEST_STRING)-1;
23798   entry.action |= CONVRULE_CSS_ON_BIT;
23799
23800   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23801   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23802   ret = chxj_rencoding(&r, ret, &destlen);
23803   CU_ASSERT(ret != NULL);
23804   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23805   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23806   CU_ASSERT(call_check == 0);
23807
23808   APR_TERM;
23809 #undef TEST_STRING
23810 #undef RESULT_STRING
23811 }
23812 char *test_chxj_serf_get137(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
23813 {
23814   static char *css = "a:focus { display: none }\n"
23815                      "a:link  { display: none }\n"
23816                      "a       { display: none }\n"
23817                      "hr      { display: none }\n"
23818                      "a:visited { display:none }\n"
23819                      "div     { font-size:medium; }\n";
23820
23821   *len = strlen(css);
23822   call_check = 1;
23823   return css;
23824 }
23825 void test_ixhtml10_div_tag_with_css_035()
23826 {
23827 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
23828                      "</head><body><div>あいう</div></body></html>"
23829 #define  RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
23830                        "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
23831                        "<html><head></head><body><div><div style=\"font-size:medium;\">あいう</div></div></body></html>"
23832   char  *ret;
23833   char  *tmp;
23834   device_table spec;
23835   chxjconvrule_entry entry;
23836   cookie_t cookie;
23837   apr_size_t destlen;
23838   APR_INIT;
23839   chxj_serf_get = test_chxj_serf_get137;
23840   call_check = 0;
23841
23842   COOKIE_INIT(cookie);
23843
23844   SPEC_INIT(spec);
23845   destlen = sizeof(TEST_STRING)-1;
23846   entry.action |= CONVRULE_CSS_ON_BIT;
23847
23848   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23849   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23850   ret = chxj_rencoding(&r, ret, &destlen);
23851   CU_ASSERT(ret != NULL);
23852   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23853   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23854   CU_ASSERT(call_check == 1);
23855
23856   APR_TERM;
23857 #undef TEST_STRING
23858 #undef RESULT_STRING
23859 }
23860 void test_ixhtml10_div_tag_with_css_036()
23861 {
23862 #define  TEST_STRING "<html><head>" \
23863                      "</head><body><div style=\"font-size:medium;\">あいう</div></body></html>"
23864 #define  RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
23865                        "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
23866                        "<html><head></head><body><div><div style=\"font-size:medium;\">あいう</div></div></body></html>"
23867   char  *ret;
23868   char  *tmp;
23869   device_table spec;
23870   chxjconvrule_entry entry;
23871   cookie_t cookie;
23872   apr_size_t destlen;
23873   APR_INIT;
23874   chxj_serf_get = test_chxj_serf_get137;
23875   call_check = 0;
23876
23877   COOKIE_INIT(cookie);
23878
23879   SPEC_INIT(spec);
23880   destlen = sizeof(TEST_STRING)-1;
23881   entry.action |= CONVRULE_CSS_ON_BIT;
23882
23883   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23884   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23885   ret = chxj_rencoding(&r, ret, &destlen);
23886   CU_ASSERT(ret != NULL);
23887   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23888   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23889   CU_ASSERT(call_check == 0);
23890
23891   APR_TERM;
23892 #undef TEST_STRING
23893 #undef RESULT_STRING
23894 }
23895 char *test_chxj_serf_get138(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
23896 {
23897   static char *css = "a:focus { display: none }\n"
23898                      "a:link  { display: none }\n"
23899                      "a       { display: none }\n"
23900                      "hr      { display: none }\n"
23901                      "a:visited { display:none }\n"
23902                      "div     { font-size:large; }\n";
23903
23904   *len = strlen(css);
23905   call_check = 1;
23906   return css;
23907 }
23908 void test_ixhtml10_div_tag_with_css_037()
23909 {
23910 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
23911                      "</head><body><div>あいう</div></body></html>"
23912 #define  RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
23913                        "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
23914                        "<html><head></head><body><div><div style=\"font-size:large;\">あいう</div></div></body></html>"
23915   char  *ret;
23916   char  *tmp;
23917   device_table spec;
23918   chxjconvrule_entry entry;
23919   cookie_t cookie;
23920   apr_size_t destlen;
23921   APR_INIT;
23922   chxj_serf_get = test_chxj_serf_get138;
23923   call_check = 0;
23924
23925   COOKIE_INIT(cookie);
23926
23927   SPEC_INIT(spec);
23928   destlen = sizeof(TEST_STRING)-1;
23929   entry.action |= CONVRULE_CSS_ON_BIT;
23930
23931   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23932   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23933   ret = chxj_rencoding(&r, ret, &destlen);
23934   CU_ASSERT(ret != NULL);
23935   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23936   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23937   CU_ASSERT(call_check == 1);
23938
23939   APR_TERM;
23940 #undef TEST_STRING
23941 #undef RESULT_STRING
23942 }
23943 void test_ixhtml10_div_tag_with_css_038()
23944 {
23945 #define  TEST_STRING "<html><head>" \
23946                      "</head><body><div style=\"font-size:large;\">あいう</div></body></html>"
23947 #define  RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
23948                        "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
23949                        "<html><head></head><body><div><div style=\"font-size:large;\">あいう</div></div></body></html>"
23950   char  *ret;
23951   char  *tmp;
23952   device_table spec;
23953   chxjconvrule_entry entry;
23954   cookie_t cookie;
23955   apr_size_t destlen;
23956   APR_INIT;
23957   chxj_serf_get = test_chxj_serf_get138;
23958   call_check = 0;
23959
23960   COOKIE_INIT(cookie);
23961
23962   SPEC_INIT(spec);
23963   destlen = sizeof(TEST_STRING)-1;
23964   entry.action |= CONVRULE_CSS_ON_BIT;
23965
23966   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
23967   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
23968   ret = chxj_rencoding(&r, ret, &destlen);
23969   CU_ASSERT(ret != NULL);
23970   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
23971   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
23972   CU_ASSERT(call_check == 0);
23973
23974   APR_TERM;
23975 #undef TEST_STRING
23976 #undef RESULT_STRING
23977 }
23978 char *test_chxj_serf_get139(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
23979 {
23980   static char *css = "a:focus { display: none }\n"
23981                      "a:link  { display: none }\n"
23982                      "a       { display: none }\n"
23983                      "hr      { display: none }\n"
23984                      "a:visited { display:none }\n"
23985                      "div     { font-size:x-large; }\n";
23986
23987   *len = strlen(css);
23988   call_check = 1;
23989   return css;
23990 }
23991 void test_ixhtml10_div_tag_with_css_039()
23992 {
23993 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
23994                      "</head><body><div>あいう</div></body></html>"
23995 #define  RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
23996                        "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
23997                        "<html><head></head><body><div><div style=\"font-size:x-large;\">あいう</div></div></body></html>"
23998   char  *ret;
23999   char  *tmp;
24000   device_table spec;
24001   chxjconvrule_entry entry;
24002   cookie_t cookie;
24003   apr_size_t destlen;
24004   APR_INIT;
24005   chxj_serf_get = test_chxj_serf_get139;
24006   call_check = 0;
24007
24008   COOKIE_INIT(cookie);
24009
24010   SPEC_INIT(spec);
24011   destlen = sizeof(TEST_STRING)-1;
24012   entry.action |= CONVRULE_CSS_ON_BIT;
24013
24014   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24015   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24016   ret = chxj_rencoding(&r, ret, &destlen);
24017   CU_ASSERT(ret != NULL);
24018   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24019   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24020   CU_ASSERT(call_check == 1);
24021
24022   APR_TERM;
24023 #undef TEST_STRING
24024 #undef RESULT_STRING
24025 }
24026 void test_ixhtml10_div_tag_with_css_040()
24027 {
24028 #define  TEST_STRING "<html><head>" \
24029                      "</head><body><div style=\"font-size:x-large;\">あいう</div></body></html>"
24030 #define  RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
24031                        "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
24032                        "<html><head></head><body><div><div style=\"font-size:x-large;\">あいう</div></div></body></html>"
24033   char  *ret;
24034   char  *tmp;
24035   device_table spec;
24036   chxjconvrule_entry entry;
24037   cookie_t cookie;
24038   apr_size_t destlen;
24039   APR_INIT;
24040   chxj_serf_get = test_chxj_serf_get139;
24041   call_check = 0;
24042
24043   COOKIE_INIT(cookie);
24044
24045   SPEC_INIT(spec);
24046   destlen = sizeof(TEST_STRING)-1;
24047   entry.action |= CONVRULE_CSS_ON_BIT;
24048
24049   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24050   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24051   ret = chxj_rencoding(&r, ret, &destlen);
24052   CU_ASSERT(ret != NULL);
24053   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24054   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24055   CU_ASSERT(call_check == 0);
24056
24057   APR_TERM;
24058 #undef TEST_STRING
24059 #undef RESULT_STRING
24060 }
24061 char *test_chxj_serf_get140(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
24062 {
24063   static char *css = "a:focus { display: none }\n"
24064                      "a:link  { display: none }\n"
24065                      "a       { display: none }\n"
24066                      "hr      { display: none }\n"
24067                      "a:visited { display:none }\n"
24068                      "div     { font-size:xx-large; }\n";
24069
24070   *len = strlen(css);
24071   call_check = 1;
24072   return css;
24073 }
24074 void test_ixhtml10_div_tag_with_css_041()
24075 {
24076 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
24077                      "</head><body><div>あいう</div></body></html>"
24078 #define  RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
24079                        "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
24080                        "<html><head></head><body><div><div style=\"font-size:xx-large;\">あいう</div></div></body></html>"
24081   char  *ret;
24082   char  *tmp;
24083   device_table spec;
24084   chxjconvrule_entry entry;
24085   cookie_t cookie;
24086   apr_size_t destlen;
24087   APR_INIT;
24088   chxj_serf_get = test_chxj_serf_get140;
24089   call_check = 0;
24090
24091   COOKIE_INIT(cookie);
24092
24093   SPEC_INIT(spec);
24094   destlen = sizeof(TEST_STRING)-1;
24095   entry.action |= CONVRULE_CSS_ON_BIT;
24096
24097   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24098   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24099   ret = chxj_rencoding(&r, ret, &destlen);
24100   CU_ASSERT(ret != NULL);
24101   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24102   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24103   CU_ASSERT(call_check == 1);
24104
24105   APR_TERM;
24106 #undef TEST_STRING
24107 #undef RESULT_STRING
24108 }
24109 void test_ixhtml10_div_tag_with_css_042()
24110 {
24111 #define  TEST_STRING "<html><head>" \
24112                      "</head><body><div style=\"font-size:xx-large;\">あいう</div></body></html>"
24113 #define  RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
24114                        "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
24115                        "<html><head></head><body><div><div style=\"font-size:xx-large;\">あいう</div></div></body></html>"
24116   char  *ret;
24117   char  *tmp;
24118   device_table spec;
24119   chxjconvrule_entry entry;
24120   cookie_t cookie;
24121   apr_size_t destlen;
24122   APR_INIT;
24123   chxj_serf_get = test_chxj_serf_get140;
24124   call_check = 0;
24125
24126   COOKIE_INIT(cookie);
24127
24128   SPEC_INIT(spec);
24129   destlen = sizeof(TEST_STRING)-1;
24130   entry.action |= CONVRULE_CSS_ON_BIT;
24131
24132   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24133   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24134   ret = chxj_rencoding(&r, ret, &destlen);
24135   CU_ASSERT(ret != NULL);
24136   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24137   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24138   CU_ASSERT(call_check == 0);
24139
24140   APR_TERM;
24141 #undef TEST_STRING
24142 #undef RESULT_STRING
24143 }
24144
24145
24146
24147 /*===========================================================================*/
24148 /* dt tag with CSS                                                           */
24149 /*===========================================================================*/
24150 char *test_chxj_serf_get150(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
24151 {
24152   static char *css = "a:focus { display: none }\n"
24153                      "a:link  { display: none }\n"
24154                      "a       { display: none }\n"
24155                      "hr      { display: none }\n"
24156                      "a:visited { display:none }\n"
24157                      "dt      { font-size:xx-small; }\n";
24158
24159   *len = strlen(css);
24160   call_check = 1;
24161   return css;
24162 }
24163 void test_ixhtml10_dt_tag_with_css_001()
24164 {
24165 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
24166                      "</head><body><dl><dt>あいう</dt></dl></body></html>"
24167 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24168                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24169                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24170                        "<head></head><body><dl><dt style=\"font-size:xx-small;\">あいう</dt></dl></body></html>"
24171   char  *ret;
24172   char  *tmp;
24173   device_table spec;
24174   chxjconvrule_entry entry;
24175   cookie_t cookie;
24176   apr_size_t destlen;
24177   APR_INIT;
24178   chxj_serf_get = test_chxj_serf_get150;
24179   call_check = 0;
24180
24181   COOKIE_INIT(cookie);
24182
24183   SPEC_INIT(spec);
24184   destlen = sizeof(TEST_STRING)-1;
24185   entry.action |= CONVRULE_CSS_ON_BIT;
24186
24187   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24188   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24189   ret = chxj_rencoding(&r, ret, &destlen);
24190   fprintf(stderr, "actual:[%s]\n", ret);
24191   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
24192   CU_ASSERT(ret != NULL);
24193   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24194   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24195   CU_ASSERT(call_check == 1);
24196
24197   APR_TERM;
24198 #undef TEST_STRING
24199 #undef RESULT_STRING
24200 }
24201 void test_ixhtml10_dt_tag_with_css_002()
24202 {
24203 #define  TEST_STRING "<html><head>" \
24204                      "</head><body><dl><dt style=\"font-size:xx-small;\">あいう</dt></dl></body></html>"
24205 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24206                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24207                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24208                        "<head></head><body><dl><dt style=\"font-size:xx-small;\">あいう</dt></dl></body></html>"
24209   char  *ret;
24210   char  *tmp;
24211   device_table spec;
24212   chxjconvrule_entry entry;
24213   cookie_t cookie;
24214   apr_size_t destlen;
24215   APR_INIT;
24216   chxj_serf_get = test_chxj_serf_get150;
24217   call_check = 0;
24218
24219   COOKIE_INIT(cookie);
24220
24221   SPEC_INIT(spec);
24222   destlen = sizeof(TEST_STRING)-1;
24223   entry.action |= CONVRULE_CSS_ON_BIT;
24224
24225   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24226   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24227   ret = chxj_rencoding(&r, ret, &destlen);
24228   fprintf(stderr, "actual:[%s]\n", ret);
24229   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
24230   CU_ASSERT(ret != NULL);
24231   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24232   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24233   CU_ASSERT(call_check == 0);
24234
24235   APR_TERM;
24236 #undef TEST_STRING
24237 #undef RESULT_STRING
24238 }
24239 char *test_chxj_serf_get151(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
24240 {
24241   static char *css = "a:focus { display: none }\n"
24242                      "a:link  { display: none }\n"
24243                      "a       { display: none }\n"
24244                      "hr      { display: none }\n"
24245                      "a:visited { display:none }\n"
24246                      "dt      { font-size:x-small; }\n";
24247
24248   *len = strlen(css);
24249   call_check = 1;
24250   return css;
24251 }
24252 void test_ixhtml10_dt_tag_with_css_003()
24253 {
24254 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
24255                      "</head><body><dl><dt>あいう</dt></dl></body></html>"
24256 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24257                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24258                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24259                        "<head></head><body><dl><dt style=\"font-size:x-small;\">あいう</dt></dl></body></html>"
24260   char  *ret;
24261   char  *tmp;
24262   device_table spec;
24263   chxjconvrule_entry entry;
24264   cookie_t cookie;
24265   apr_size_t destlen;
24266   APR_INIT;
24267   chxj_serf_get = test_chxj_serf_get151;
24268   call_check = 0;
24269
24270   COOKIE_INIT(cookie);
24271
24272   SPEC_INIT(spec);
24273   destlen = sizeof(TEST_STRING)-1;
24274   entry.action |= CONVRULE_CSS_ON_BIT;
24275
24276   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24277   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24278   ret = chxj_rencoding(&r, ret, &destlen);
24279   fprintf(stderr, "actual:[%s]\n", ret);
24280   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
24281   CU_ASSERT(ret != NULL);
24282   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24283   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24284   CU_ASSERT(call_check == 1);
24285
24286   APR_TERM;
24287 #undef TEST_STRING
24288 #undef RESULT_STRING
24289 }
24290 void test_ixhtml10_dt_tag_with_css_004()
24291 {
24292 #define  TEST_STRING "<html><head>" \
24293                      "</head><body><dl><dt style=\"font-size:x-small;\">あいう</dt></dl></body></html>"
24294 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24295                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24296                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24297                        "<head></head><body><dl><dt style=\"font-size:x-small;\">あいう</dt></dl></body></html>"
24298   char  *ret;
24299   char  *tmp;
24300   device_table spec;
24301   chxjconvrule_entry entry;
24302   cookie_t cookie;
24303   apr_size_t destlen;
24304   APR_INIT;
24305   chxj_serf_get = test_chxj_serf_get151;
24306   call_check = 0;
24307
24308   COOKIE_INIT(cookie);
24309
24310   SPEC_INIT(spec);
24311   destlen = sizeof(TEST_STRING)-1;
24312   entry.action |= CONVRULE_CSS_ON_BIT;
24313
24314   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24315   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24316   ret = chxj_rencoding(&r, ret, &destlen);
24317   fprintf(stderr, "actual:[%s]\n", ret);
24318   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
24319   CU_ASSERT(ret != NULL);
24320   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24321   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24322   CU_ASSERT(call_check == 0);
24323
24324   APR_TERM;
24325 #undef TEST_STRING
24326 #undef RESULT_STRING
24327 }
24328 char *test_chxj_serf_get152(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
24329 {
24330   static char *css = "a:focus { display: none }\n"
24331                      "a:link  { display: none }\n"
24332                      "a       { display: none }\n"
24333                      "hr      { display: none }\n"
24334                      "a:visited { display:none }\n"
24335                      "dt      { font-size:small; }\n";
24336
24337   *len = strlen(css);
24338   call_check = 1;
24339   return css;
24340 }
24341 void test_ixhtml10_dt_tag_with_css_005()
24342 {
24343 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
24344                      "</head><body><dl><dt>あいう</dt></dl></body></html>"
24345 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24346                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24347                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24348                        "<head></head><body><dl><dt style=\"font-size:small;\">あいう</dt></dl></body></html>"
24349   char  *ret;
24350   char  *tmp;
24351   device_table spec;
24352   chxjconvrule_entry entry;
24353   cookie_t cookie;
24354   apr_size_t destlen;
24355   APR_INIT;
24356   chxj_serf_get = test_chxj_serf_get152;
24357   call_check = 0;
24358
24359   COOKIE_INIT(cookie);
24360
24361   SPEC_INIT(spec);
24362   destlen = sizeof(TEST_STRING)-1;
24363   entry.action |= CONVRULE_CSS_ON_BIT;
24364
24365   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24366   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24367   ret = chxj_rencoding(&r, ret, &destlen);
24368   fprintf(stderr, "actual:[%s]\n", ret);
24369   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
24370   CU_ASSERT(ret != NULL);
24371   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24372   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24373   CU_ASSERT(call_check == 1);
24374
24375   APR_TERM;
24376 #undef TEST_STRING
24377 #undef RESULT_STRING
24378 }
24379 void test_ixhtml10_dt_tag_with_css_006()
24380 {
24381 #define  TEST_STRING "<html><head>" \
24382                      "</head><body><dl><dt style=\"font-size:small;\">あいう</dt></dl></body></html>"
24383 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24384                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24385                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24386                        "<head></head><body><dl><dt style=\"font-size:small;\">あいう</dt></dl></body></html>"
24387   char  *ret;
24388   char  *tmp;
24389   device_table spec;
24390   chxjconvrule_entry entry;
24391   cookie_t cookie;
24392   apr_size_t destlen;
24393   APR_INIT;
24394   chxj_serf_get = test_chxj_serf_get152;
24395   call_check = 0;
24396
24397   COOKIE_INIT(cookie);
24398
24399   SPEC_INIT(spec);
24400   destlen = sizeof(TEST_STRING)-1;
24401   entry.action |= CONVRULE_CSS_ON_BIT;
24402
24403   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24404   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24405   ret = chxj_rencoding(&r, ret, &destlen);
24406   fprintf(stderr, "actual:[%s]\n", ret);
24407   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
24408   CU_ASSERT(ret != NULL);
24409   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24410   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24411   CU_ASSERT(call_check == 0);
24412
24413   APR_TERM;
24414 #undef TEST_STRING
24415 #undef RESULT_STRING
24416 }
24417 char *test_chxj_serf_get153(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
24418 {
24419   static char *css = "a:focus { display: none }\n"
24420                      "a:link  { display: none }\n"
24421                      "a       { display: none }\n"
24422                      "hr      { display: none }\n"
24423                      "a:visited { display:none }\n"
24424                      "dt      { font-size:medium; }\n";
24425
24426   *len = strlen(css);
24427   call_check = 1;
24428   return css;
24429 }
24430 void test_ixhtml10_dt_tag_with_css_007()
24431 {
24432 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
24433                      "</head><body><dl><dt>あいう</dt></dl></body></html>"
24434 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24435                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24436                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24437                        "<head></head><body><dl><dt style=\"font-size:medium;\">あいう</dt></dl></body></html>"
24438   char  *ret;
24439   char  *tmp;
24440   device_table spec;
24441   chxjconvrule_entry entry;
24442   cookie_t cookie;
24443   apr_size_t destlen;
24444   APR_INIT;
24445   chxj_serf_get = test_chxj_serf_get153;
24446   call_check = 0;
24447
24448   COOKIE_INIT(cookie);
24449
24450   SPEC_INIT(spec);
24451   destlen = sizeof(TEST_STRING)-1;
24452   entry.action |= CONVRULE_CSS_ON_BIT;
24453
24454   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24455   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24456   ret = chxj_rencoding(&r, ret, &destlen);
24457   fprintf(stderr, "actual:[%s]\n", ret);
24458   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
24459   CU_ASSERT(ret != NULL);
24460   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24461   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24462   CU_ASSERT(call_check == 1);
24463
24464   APR_TERM;
24465 #undef TEST_STRING
24466 #undef RESULT_STRING
24467 }
24468 void test_ixhtml10_dt_tag_with_css_008()
24469 {
24470 #define  TEST_STRING "<html><head>" \
24471                      "</head><body><dl><dt style=\"font-size:medium;\">あいう</dt></dl></body></html>"
24472 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24473                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24474                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24475                        "<head></head><body><dl><dt style=\"font-size:medium;\">あいう</dt></dl></body></html>"
24476   char  *ret;
24477   char  *tmp;
24478   device_table spec;
24479   chxjconvrule_entry entry;
24480   cookie_t cookie;
24481   apr_size_t destlen;
24482   APR_INIT;
24483   chxj_serf_get = test_chxj_serf_get153;
24484   call_check = 0;
24485
24486   COOKIE_INIT(cookie);
24487
24488   SPEC_INIT(spec);
24489   destlen = sizeof(TEST_STRING)-1;
24490   entry.action |= CONVRULE_CSS_ON_BIT;
24491
24492   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24493   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24494   ret = chxj_rencoding(&r, ret, &destlen);
24495   fprintf(stderr, "actual:[%s]\n", ret);
24496   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
24497   CU_ASSERT(ret != NULL);
24498   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24499   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24500   CU_ASSERT(call_check == 0);
24501
24502   APR_TERM;
24503 #undef TEST_STRING
24504 #undef RESULT_STRING
24505 }
24506 char *test_chxj_serf_get154(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
24507 {
24508   static char *css = "a:focus { display: none }\n"
24509                      "a:link  { display: none }\n"
24510                      "a       { display: none }\n"
24511                      "hr      { display: none }\n"
24512                      "a:visited { display:none }\n"
24513                      "dt      { font-size:large; }\n";
24514
24515   *len = strlen(css);
24516   call_check = 1;
24517   return css;
24518 }
24519 void test_ixhtml10_dt_tag_with_css_009()
24520 {
24521 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
24522                      "</head><body><dl><dt>あいう</dt></dl></body></html>"
24523 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24524                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24525                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24526                        "<head></head><body><dl><dt style=\"font-size:large;\">あいう</dt></dl></body></html>"
24527   char  *ret;
24528   char  *tmp;
24529   device_table spec;
24530   chxjconvrule_entry entry;
24531   cookie_t cookie;
24532   apr_size_t destlen;
24533   APR_INIT;
24534   chxj_serf_get = test_chxj_serf_get154;
24535   call_check = 0;
24536
24537   COOKIE_INIT(cookie);
24538
24539   SPEC_INIT(spec);
24540   destlen = sizeof(TEST_STRING)-1;
24541   entry.action |= CONVRULE_CSS_ON_BIT;
24542
24543   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24544   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24545   ret = chxj_rencoding(&r, ret, &destlen);
24546   fprintf(stderr, "actual:[%s]\n", ret);
24547   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
24548   CU_ASSERT(ret != NULL);
24549   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24550   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24551   CU_ASSERT(call_check == 1);
24552
24553   APR_TERM;
24554 #undef TEST_STRING
24555 #undef RESULT_STRING
24556 }
24557 void test_ixhtml10_dt_tag_with_css_010()
24558 {
24559 #define  TEST_STRING "<html><head>" \
24560                      "</head><body><dl><dt style=\"font-size:large;\">あいう</dt></dl></body></html>"
24561 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24562                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24563                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24564                        "<head></head><body><dl><dt style=\"font-size:large;\">あいう</dt></dl></body></html>"
24565   char  *ret;
24566   char  *tmp;
24567   device_table spec;
24568   chxjconvrule_entry entry;
24569   cookie_t cookie;
24570   apr_size_t destlen;
24571   APR_INIT;
24572   chxj_serf_get = test_chxj_serf_get154;
24573   call_check = 0;
24574
24575   COOKIE_INIT(cookie);
24576
24577   SPEC_INIT(spec);
24578   destlen = sizeof(TEST_STRING)-1;
24579   entry.action |= CONVRULE_CSS_ON_BIT;
24580
24581   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24582   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24583   ret = chxj_rencoding(&r, ret, &destlen);
24584   fprintf(stderr, "actual:[%s]\n", ret);
24585   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
24586   CU_ASSERT(ret != NULL);
24587   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24588   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24589   CU_ASSERT(call_check == 0);
24590
24591   APR_TERM;
24592 #undef TEST_STRING
24593 #undef RESULT_STRING
24594 }
24595 char *test_chxj_serf_get155(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
24596 {
24597   static char *css = "a:focus { display: none }\n"
24598                      "a:link  { display: none }\n"
24599                      "a       { display: none }\n"
24600                      "hr      { display: none }\n"
24601                      "a:visited { display:none }\n"
24602                      "dt      { font-size:x-large; }\n";
24603
24604   *len = strlen(css);
24605   call_check = 1;
24606   return css;
24607 }
24608 void test_ixhtml10_dt_tag_with_css_011()
24609 {
24610 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
24611                      "</head><body><dl><dt>あいう</dt></dl></body></html>"
24612 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24613                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24614                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24615                        "<head></head><body><dl><dt style=\"font-size:x-large;\">あいう</dt></dl></body></html>"
24616   char  *ret;
24617   char  *tmp;
24618   device_table spec;
24619   chxjconvrule_entry entry;
24620   cookie_t cookie;
24621   apr_size_t destlen;
24622   APR_INIT;
24623   chxj_serf_get = test_chxj_serf_get155;
24624   call_check = 0;
24625
24626   COOKIE_INIT(cookie);
24627
24628   SPEC_INIT(spec);
24629   destlen = sizeof(TEST_STRING)-1;
24630   entry.action |= CONVRULE_CSS_ON_BIT;
24631
24632   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24633   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24634   ret = chxj_rencoding(&r, ret, &destlen);
24635   fprintf(stderr, "actual:[%s]\n", ret);
24636   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
24637   CU_ASSERT(ret != NULL);
24638   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24639   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24640   CU_ASSERT(call_check == 1);
24641
24642   APR_TERM;
24643 #undef TEST_STRING
24644 #undef RESULT_STRING
24645 }
24646 void test_ixhtml10_dt_tag_with_css_012()
24647 {
24648 #define  TEST_STRING "<html><head>" \
24649                      "</head><body><dl><dt style=\"font-size:x-large;\">あいう</dt></dl></body></html>"
24650 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24651                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24652                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24653                        "<head></head><body><dl><dt style=\"font-size:x-large;\">あいう</dt></dl></body></html>"
24654   char  *ret;
24655   char  *tmp;
24656   device_table spec;
24657   chxjconvrule_entry entry;
24658   cookie_t cookie;
24659   apr_size_t destlen;
24660   APR_INIT;
24661   chxj_serf_get = test_chxj_serf_get155;
24662   call_check = 0;
24663
24664   COOKIE_INIT(cookie);
24665
24666   SPEC_INIT(spec);
24667   destlen = sizeof(TEST_STRING)-1;
24668   entry.action |= CONVRULE_CSS_ON_BIT;
24669
24670   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24671   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24672   ret = chxj_rencoding(&r, ret, &destlen);
24673   fprintf(stderr, "actual:[%s]\n", ret);
24674   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
24675   CU_ASSERT(ret != NULL);
24676   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24677   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24678   CU_ASSERT(call_check == 0);
24679
24680   APR_TERM;
24681 #undef TEST_STRING
24682 #undef RESULT_STRING
24683 }
24684 char *test_chxj_serf_get156(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
24685 {
24686   static char *css = "a:focus { display: none }\n"
24687                      "a:link  { display: none }\n"
24688                      "a       { display: none }\n"
24689                      "hr      { display: none }\n"
24690                      "a:visited { display:none }\n"
24691                      "dt      { font-size:xx-large; }\n";
24692
24693   *len = strlen(css);
24694   call_check = 1;
24695   return css;
24696 }
24697 void test_ixhtml10_dt_tag_with_css_013()
24698 {
24699 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
24700                      "</head><body><dl><dt>あいう</dt></dl></body></html>"
24701 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24702                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24703                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24704                        "<head></head><body><dl><dt style=\"font-size:xx-large;\">あいう</dt></dl></body></html>"
24705   char  *ret;
24706   char  *tmp;
24707   device_table spec;
24708   chxjconvrule_entry entry;
24709   cookie_t cookie;
24710   apr_size_t destlen;
24711   APR_INIT;
24712   chxj_serf_get = test_chxj_serf_get156;
24713   call_check = 0;
24714
24715   COOKIE_INIT(cookie);
24716
24717   SPEC_INIT(spec);
24718   destlen = sizeof(TEST_STRING)-1;
24719   entry.action |= CONVRULE_CSS_ON_BIT;
24720
24721   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24722   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24723   ret = chxj_rencoding(&r, ret, &destlen);
24724   fprintf(stderr, "actual:[%s]\n", ret);
24725   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
24726   CU_ASSERT(ret != NULL);
24727   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24728   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24729   CU_ASSERT(call_check == 1);
24730
24731   APR_TERM;
24732 #undef TEST_STRING
24733 #undef RESULT_STRING
24734 }
24735 void test_ixhtml10_dt_tag_with_css_014()
24736 {
24737 #define  TEST_STRING "<html><head>" \
24738                      "</head><body><dl><dt style=\"font-size:xx-large;\">あいう</dt></dl></body></html>"
24739 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24740                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24741                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24742                        "<head></head><body><dl><dt style=\"font-size:xx-large;\">あいう</dt></dl></body></html>"
24743   char  *ret;
24744   char  *tmp;
24745   device_table spec;
24746   chxjconvrule_entry entry;
24747   cookie_t cookie;
24748   apr_size_t destlen;
24749   APR_INIT;
24750   chxj_serf_get = test_chxj_serf_get156;
24751   call_check = 0;
24752
24753   COOKIE_INIT(cookie);
24754
24755   SPEC_INIT(spec);
24756   destlen = sizeof(TEST_STRING)-1;
24757   entry.action |= CONVRULE_CSS_ON_BIT;
24758
24759   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24760   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24761   ret = chxj_rencoding(&r, ret, &destlen);
24762   fprintf(stderr, "actual:[%s]\n", ret);
24763   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
24764   CU_ASSERT(ret != NULL);
24765   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24766   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24767   CU_ASSERT(call_check == 0);
24768
24769   APR_TERM;
24770 #undef TEST_STRING
24771 #undef RESULT_STRING
24772 }
24773
24774
24775
24776
24777
24778
24779 /*===========================================================================*/
24780 /* blockquote tag with CSS                                                   */
24781 /*===========================================================================*/
24782 char *test_chxj_serf_get160(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
24783 {
24784   static char *css = "a:focus { display: none }\n"
24785                      "a:link  { display: none }\n"
24786                      "a       { display: none }\n"
24787                      "hr      { display: none }\n"
24788                      "a:visited { display:none }\n"
24789                      "blockquote { color: #ff0000 }\n";
24790
24791   *len = strlen(css);
24792   call_check = 1;
24793   return css;
24794 }
24795 void test_ixhtml10_blockquote_tag_with_css_001()
24796 {
24797 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
24798                      "</head><body><blockquote>あいう</blockquote></body></html>"
24799 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24800                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24801                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24802                        "<head></head><body><blockquote style=\"color:#ff0000;\">あいう</blockquote></body></html>"
24803   char  *ret;
24804   char  *tmp;
24805   device_table spec;
24806   chxjconvrule_entry entry;
24807   cookie_t cookie;
24808   apr_size_t destlen;
24809   APR_INIT;
24810   chxj_serf_get = test_chxj_serf_get160;
24811   call_check = 0;
24812
24813   COOKIE_INIT(cookie);
24814
24815   SPEC_INIT(spec);
24816   destlen = sizeof(TEST_STRING)-1;
24817   entry.action |= CONVRULE_CSS_ON_BIT;
24818
24819   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24820   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24821   ret = chxj_rencoding(&r, ret, &destlen);
24822   CU_ASSERT(ret != NULL);
24823   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24824   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24825   CU_ASSERT(call_check == 1);
24826
24827   APR_TERM;
24828 #undef TEST_STRING
24829 #undef RESULT_STRING
24830 }
24831 void test_ixhtml10_blockquote_tag_with_css_002()
24832 {
24833 #define  TEST_STRING "<html><head>" \
24834                      "</head><body><blockquote style=\"color:#ff0000\">あいう</blockquote></body></html>"
24835 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24836                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24837                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24838                        "<head></head><body><blockquote style=\"color:#ff0000;\">あいう</blockquote></body></html>"
24839   char  *ret;
24840   char  *tmp;
24841   device_table spec;
24842   chxjconvrule_entry entry;
24843   cookie_t cookie;
24844   apr_size_t destlen;
24845   APR_INIT;
24846   chxj_serf_get = test_chxj_serf_get160;
24847   call_check = 0;
24848
24849   COOKIE_INIT(cookie);
24850
24851   SPEC_INIT(spec);
24852   destlen = sizeof(TEST_STRING)-1;
24853   entry.action |= CONVRULE_CSS_ON_BIT;
24854
24855   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24856   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24857   ret = chxj_rencoding(&r, ret, &destlen);
24858   CU_ASSERT(ret != NULL);
24859   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24860   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24861   CU_ASSERT(call_check == 0);
24862
24863   APR_TERM;
24864 #undef TEST_STRING
24865 #undef RESULT_STRING
24866 }
24867
24868
24869 char *test_chxj_serf_get161(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
24870 {
24871   static char *css = "a:focus { display: none }\n"
24872                      "a:link  { display: none }\n"
24873                      "a       { display: none }\n"
24874                      "hr      { display: none }\n"
24875                      "a:visited { display:none }\n"
24876                      "blockquote { font-size: xx-small }\n";
24877
24878   *len = strlen(css);
24879   call_check = 1;
24880   return css;
24881 }
24882 void test_ixhtml10_blockquote_tag_with_css_003()
24883 {
24884 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
24885                      "</head><body><blockquote>あいう</blockquote></body></html>"
24886 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24887                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24888                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24889                        "<head></head><body><blockquote style=\"font-size:xx-small;\">あいう</blockquote></body></html>"
24890   char  *ret;
24891   char  *tmp;
24892   device_table spec;
24893   chxjconvrule_entry entry;
24894   cookie_t cookie;
24895   apr_size_t destlen;
24896   APR_INIT;
24897   chxj_serf_get = test_chxj_serf_get161;
24898   call_check = 0;
24899
24900   COOKIE_INIT(cookie);
24901
24902   SPEC_INIT(spec);
24903   destlen = sizeof(TEST_STRING)-1;
24904   entry.action |= CONVRULE_CSS_ON_BIT;
24905
24906   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24907   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24908   ret = chxj_rencoding(&r, ret, &destlen);
24909   CU_ASSERT(ret != NULL);
24910   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24911   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24912   CU_ASSERT(call_check == 1);
24913
24914   APR_TERM;
24915 #undef TEST_STRING
24916 #undef RESULT_STRING
24917 }
24918 void test_ixhtml10_blockquote_tag_with_css_004()
24919 {
24920 #define  TEST_STRING "<html><head>" \
24921                      "</head><body><blockquote style=\"font-size:xx-small\">あいう</blockquote></body></html>"
24922 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24923                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24924                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24925                        "<head></head><body><blockquote style=\"font-size:xx-small;\">あいう</blockquote></body></html>"
24926   char  *ret;
24927   char  *tmp;
24928   device_table spec;
24929   chxjconvrule_entry entry;
24930   cookie_t cookie;
24931   apr_size_t destlen;
24932   APR_INIT;
24933   chxj_serf_get = test_chxj_serf_get161;
24934   call_check = 0;
24935
24936   COOKIE_INIT(cookie);
24937
24938   SPEC_INIT(spec);
24939   destlen = sizeof(TEST_STRING)-1;
24940   entry.action |= CONVRULE_CSS_ON_BIT;
24941
24942   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24943   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24944   ret = chxj_rencoding(&r, ret, &destlen);
24945   CU_ASSERT(ret != NULL);
24946   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24947   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24948   CU_ASSERT(call_check == 0);
24949
24950   APR_TERM;
24951 #undef TEST_STRING
24952 #undef RESULT_STRING
24953 }
24954 char *test_chxj_serf_get162(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
24955 {
24956   static char *css = "a:focus { display: none }\n"
24957                      "a:link  { display: none }\n"
24958                      "a       { display: none }\n"
24959                      "hr      { display: none }\n"
24960                      "a:visited { display:none }\n"
24961                      "blockquote { font-size: x-small }\n";
24962
24963   *len = strlen(css);
24964   call_check = 1;
24965   return css;
24966 }
24967 void test_ixhtml10_blockquote_tag_with_css_005()
24968 {
24969 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
24970                      "</head><body><blockquote>あいう</blockquote></body></html>"
24971 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
24972                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
24973                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
24974                        "<head></head><body><blockquote style=\"font-size:x-small;\">あいう</blockquote></body></html>"
24975   char  *ret;
24976   char  *tmp;
24977   device_table spec;
24978   chxjconvrule_entry entry;
24979   cookie_t cookie;
24980   apr_size_t destlen;
24981   APR_INIT;
24982   chxj_serf_get = test_chxj_serf_get162;
24983   call_check = 0;
24984
24985   COOKIE_INIT(cookie);
24986
24987   SPEC_INIT(spec);
24988   destlen = sizeof(TEST_STRING)-1;
24989   entry.action |= CONVRULE_CSS_ON_BIT;
24990
24991   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
24992   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
24993   ret = chxj_rencoding(&r, ret, &destlen);
24994   CU_ASSERT(ret != NULL);
24995   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
24996   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
24997   CU_ASSERT(call_check == 1);
24998
24999   APR_TERM;
25000 #undef TEST_STRING
25001 #undef RESULT_STRING
25002 }
25003 void test_ixhtml10_blockquote_tag_with_css_006()
25004 {
25005 #define  TEST_STRING "<html><head>" \
25006                      "</head><body><blockquote style=\"font-size:x-small\">あいう</blockquote></body></html>"
25007 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25008                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25009                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25010                        "<head></head><body><blockquote style=\"font-size:x-small;\">あいう</blockquote></body></html>"
25011   char  *ret;
25012   char  *tmp;
25013   device_table spec;
25014   chxjconvrule_entry entry;
25015   cookie_t cookie;
25016   apr_size_t destlen;
25017   APR_INIT;
25018   chxj_serf_get = test_chxj_serf_get162;
25019   call_check = 0;
25020
25021   COOKIE_INIT(cookie);
25022
25023   SPEC_INIT(spec);
25024   destlen = sizeof(TEST_STRING)-1;
25025   entry.action |= CONVRULE_CSS_ON_BIT;
25026
25027   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25028   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25029   ret = chxj_rencoding(&r, ret, &destlen);
25030   CU_ASSERT(ret != NULL);
25031   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25032   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25033   CU_ASSERT(call_check == 0);
25034
25035   APR_TERM;
25036 #undef TEST_STRING
25037 #undef RESULT_STRING
25038 }
25039 char *test_chxj_serf_get163(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
25040 {
25041   static char *css = "a:focus { display: none }\n"
25042                      "a:link  { display: none }\n"
25043                      "a       { display: none }\n"
25044                      "hr      { display: none }\n"
25045                      "a:visited { display:none }\n"
25046                      "blockquote { font-size: small }\n";
25047
25048   *len = strlen(css);
25049   call_check = 1;
25050   return css;
25051 }
25052 void test_ixhtml10_blockquote_tag_with_css_007()
25053 {
25054 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
25055                      "</head><body><blockquote>あいう</blockquote></body></html>"
25056 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25057                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25058                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25059                        "<head></head><body><blockquote style=\"font-size:small;\">あいう</blockquote></body></html>"
25060   char  *ret;
25061   char  *tmp;
25062   device_table spec;
25063   chxjconvrule_entry entry;
25064   cookie_t cookie;
25065   apr_size_t destlen;
25066   APR_INIT;
25067   chxj_serf_get = test_chxj_serf_get163;
25068   call_check = 0;
25069
25070   COOKIE_INIT(cookie);
25071
25072   SPEC_INIT(spec);
25073   destlen = sizeof(TEST_STRING)-1;
25074   entry.action |= CONVRULE_CSS_ON_BIT;
25075
25076   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25077   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25078   ret = chxj_rencoding(&r, ret, &destlen);
25079   CU_ASSERT(ret != NULL);
25080   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25081   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25082   CU_ASSERT(call_check == 1);
25083
25084   APR_TERM;
25085 #undef TEST_STRING
25086 #undef RESULT_STRING
25087 }
25088 void test_ixhtml10_blockquote_tag_with_css_008()
25089 {
25090 #define  TEST_STRING "<html><head>" \
25091                      "</head><body><blockquote style=\"font-size:small\">あいう</blockquote></body></html>"
25092 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25093                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25094                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25095                        "<head></head><body><blockquote style=\"font-size:small;\">あいう</blockquote></body></html>"
25096   char  *ret;
25097   char  *tmp;
25098   device_table spec;
25099   chxjconvrule_entry entry;
25100   cookie_t cookie;
25101   apr_size_t destlen;
25102   APR_INIT;
25103   chxj_serf_get = test_chxj_serf_get163;
25104   call_check = 0;
25105
25106   COOKIE_INIT(cookie);
25107
25108   SPEC_INIT(spec);
25109   destlen = sizeof(TEST_STRING)-1;
25110   entry.action |= CONVRULE_CSS_ON_BIT;
25111
25112   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25113   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25114   ret = chxj_rencoding(&r, ret, &destlen);
25115   CU_ASSERT(ret != NULL);
25116   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25117   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25118   CU_ASSERT(call_check == 0);
25119
25120   APR_TERM;
25121 #undef TEST_STRING
25122 #undef RESULT_STRING
25123 }
25124 char *test_chxj_serf_get164(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
25125 {
25126   static char *css = "a:focus { display: none }\n"
25127                      "a:link  { display: none }\n"
25128                      "a       { display: none }\n"
25129                      "hr      { display: none }\n"
25130                      "a:visited { display:none }\n"
25131                      "blockquote { font-size: medium }\n";
25132
25133   *len = strlen(css);
25134   call_check = 1;
25135   return css;
25136 }
25137 void test_ixhtml10_blockquote_tag_with_css_009()
25138 {
25139 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
25140                      "</head><body><blockquote>あいう</blockquote></body></html>"
25141 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25142                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25143                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25144                        "<head></head><body><blockquote style=\"font-size:medium;\">あいう</blockquote></body></html>"
25145   char  *ret;
25146   char  *tmp;
25147   device_table spec;
25148   chxjconvrule_entry entry;
25149   cookie_t cookie;
25150   apr_size_t destlen;
25151   APR_INIT;
25152   chxj_serf_get = test_chxj_serf_get164;
25153   call_check = 0;
25154
25155   COOKIE_INIT(cookie);
25156
25157   SPEC_INIT(spec);
25158   destlen = sizeof(TEST_STRING)-1;
25159   entry.action |= CONVRULE_CSS_ON_BIT;
25160
25161   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25162   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25163   ret = chxj_rencoding(&r, ret, &destlen);
25164   CU_ASSERT(ret != NULL);
25165   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25166   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25167   CU_ASSERT(call_check == 1);
25168
25169   APR_TERM;
25170 #undef TEST_STRING
25171 #undef RESULT_STRING
25172 }
25173 void test_ixhtml10_blockquote_tag_with_css_010()
25174 {
25175 #define  TEST_STRING "<html><head>" \
25176                      "</head><body><blockquote style=\"font-size:medium\">あいう</blockquote></body></html>"
25177 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25178                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25179                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25180                        "<head></head><body><blockquote style=\"font-size:medium;\">あいう</blockquote></body></html>"
25181   char  *ret;
25182   char  *tmp;
25183   device_table spec;
25184   chxjconvrule_entry entry;
25185   cookie_t cookie;
25186   apr_size_t destlen;
25187   APR_INIT;
25188   chxj_serf_get = test_chxj_serf_get164;
25189   call_check = 0;
25190
25191   COOKIE_INIT(cookie);
25192
25193   SPEC_INIT(spec);
25194   destlen = sizeof(TEST_STRING)-1;
25195   entry.action |= CONVRULE_CSS_ON_BIT;
25196
25197   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25198   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25199   ret = chxj_rencoding(&r, ret, &destlen);
25200   CU_ASSERT(ret != NULL);
25201   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25202   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25203   CU_ASSERT(call_check == 0);
25204
25205   APR_TERM;
25206 #undef TEST_STRING
25207 #undef RESULT_STRING
25208 }
25209 char *test_chxj_serf_get165(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
25210 {
25211   static char *css = "a:focus { display: none }\n"
25212                      "a:link  { display: none }\n"
25213                      "a       { display: none }\n"
25214                      "hr      { display: none }\n"
25215                      "a:visited { display:none }\n"
25216                      "blockquote { font-size: large }\n";
25217
25218   *len = strlen(css);
25219   call_check = 1;
25220   return css;
25221 }
25222 void test_ixhtml10_blockquote_tag_with_css_011()
25223 {
25224 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
25225                      "</head><body><blockquote>あいう</blockquote></body></html>"
25226 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25227                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25228                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25229                        "<head></head><body><blockquote style=\"font-size:large;\">あいう</blockquote></body></html>"
25230   char  *ret;
25231   char  *tmp;
25232   device_table spec;
25233   chxjconvrule_entry entry;
25234   cookie_t cookie;
25235   apr_size_t destlen;
25236   APR_INIT;
25237   chxj_serf_get = test_chxj_serf_get165;
25238   call_check = 0;
25239
25240   COOKIE_INIT(cookie);
25241
25242   SPEC_INIT(spec);
25243   destlen = sizeof(TEST_STRING)-1;
25244   entry.action |= CONVRULE_CSS_ON_BIT;
25245
25246   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25247   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25248   ret = chxj_rencoding(&r, ret, &destlen);
25249   CU_ASSERT(ret != NULL);
25250   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25251   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25252   CU_ASSERT(call_check == 1);
25253
25254   APR_TERM;
25255 #undef TEST_STRING
25256 #undef RESULT_STRING
25257 }
25258 void test_ixhtml10_blockquote_tag_with_css_012()
25259 {
25260 #define  TEST_STRING "<html><head>" \
25261                      "</head><body><blockquote style=\"font-size:large\">あいう</blockquote></body></html>"
25262 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25263                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25264                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25265                        "<head></head><body><blockquote style=\"font-size:large;\">あいう</blockquote></body></html>"
25266   char  *ret;
25267   char  *tmp;
25268   device_table spec;
25269   chxjconvrule_entry entry;
25270   cookie_t cookie;
25271   apr_size_t destlen;
25272   APR_INIT;
25273   chxj_serf_get = test_chxj_serf_get165;
25274   call_check = 0;
25275
25276   COOKIE_INIT(cookie);
25277
25278   SPEC_INIT(spec);
25279   destlen = sizeof(TEST_STRING)-1;
25280   entry.action |= CONVRULE_CSS_ON_BIT;
25281
25282   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25283   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25284   ret = chxj_rencoding(&r, ret, &destlen);
25285   CU_ASSERT(ret != NULL);
25286   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25287   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25288   CU_ASSERT(call_check == 0);
25289
25290   APR_TERM;
25291 #undef TEST_STRING
25292 #undef RESULT_STRING
25293 }
25294 char *test_chxj_serf_get166(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
25295 {
25296   static char *css = "a:focus { display: none }\n"
25297                      "a:link  { display: none }\n"
25298                      "a       { display: none }\n"
25299                      "hr      { display: none }\n"
25300                      "a:visited { display:none }\n"
25301                      "blockquote { font-size: x-large }\n";
25302
25303   *len = strlen(css);
25304   call_check = 1;
25305   return css;
25306 }
25307 void test_ixhtml10_blockquote_tag_with_css_013()
25308 {
25309 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
25310                      "</head><body><blockquote>あいう</blockquote></body></html>"
25311 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25312                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25313                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25314                        "<head></head><body><blockquote style=\"font-size:x-large;\">あいう</blockquote></body></html>"
25315   char  *ret;
25316   char  *tmp;
25317   device_table spec;
25318   chxjconvrule_entry entry;
25319   cookie_t cookie;
25320   apr_size_t destlen;
25321   APR_INIT;
25322   chxj_serf_get = test_chxj_serf_get166;
25323   call_check = 0;
25324
25325   COOKIE_INIT(cookie);
25326
25327   SPEC_INIT(spec);
25328   destlen = sizeof(TEST_STRING)-1;
25329   entry.action |= CONVRULE_CSS_ON_BIT;
25330
25331   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25332   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25333   ret = chxj_rencoding(&r, ret, &destlen);
25334   CU_ASSERT(ret != NULL);
25335   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25336   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25337   CU_ASSERT(call_check == 1);
25338
25339   APR_TERM;
25340 #undef TEST_STRING
25341 #undef RESULT_STRING
25342 }
25343 void test_ixhtml10_blockquote_tag_with_css_014()
25344 {
25345 #define  TEST_STRING "<html><head>" \
25346                      "</head><body><blockquote style=\"font-size:x-large\">あいう</blockquote></body></html>"
25347 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25348                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25349                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25350                        "<head></head><body><blockquote style=\"font-size:x-large;\">あいう</blockquote></body></html>"
25351   char  *ret;
25352   char  *tmp;
25353   device_table spec;
25354   chxjconvrule_entry entry;
25355   cookie_t cookie;
25356   apr_size_t destlen;
25357   APR_INIT;
25358   chxj_serf_get = test_chxj_serf_get166;
25359   call_check = 0;
25360
25361   COOKIE_INIT(cookie);
25362
25363   SPEC_INIT(spec);
25364   destlen = sizeof(TEST_STRING)-1;
25365   entry.action |= CONVRULE_CSS_ON_BIT;
25366
25367   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25368   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25369   ret = chxj_rencoding(&r, ret, &destlen);
25370   CU_ASSERT(ret != NULL);
25371   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25372   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25373   CU_ASSERT(call_check == 0);
25374
25375   APR_TERM;
25376 #undef TEST_STRING
25377 #undef RESULT_STRING
25378 }
25379 char *test_chxj_serf_get167(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
25380 {
25381   static char *css = "a:focus { display: none }\n"
25382                      "a:link  { display: none }\n"
25383                      "a       { display: none }\n"
25384                      "hr      { display: none }\n"
25385                      "a:visited { display:none }\n"
25386                      "blockquote { font-size: xx-large }\n";
25387
25388   *len = strlen(css);
25389   call_check = 1;
25390   return css;
25391 }
25392 void test_ixhtml10_blockquote_tag_with_css_015()
25393 {
25394 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
25395                      "</head><body><blockquote>あいう</blockquote></body></html>"
25396 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25397                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25398                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25399                        "<head></head><body><blockquote style=\"font-size:xx-large;\">あいう</blockquote></body></html>"
25400   char  *ret;
25401   char  *tmp;
25402   device_table spec;
25403   chxjconvrule_entry entry;
25404   cookie_t cookie;
25405   apr_size_t destlen;
25406   APR_INIT;
25407   chxj_serf_get = test_chxj_serf_get167;
25408   call_check = 0;
25409
25410   COOKIE_INIT(cookie);
25411
25412   SPEC_INIT(spec);
25413   destlen = sizeof(TEST_STRING)-1;
25414   entry.action |= CONVRULE_CSS_ON_BIT;
25415
25416   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25417   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25418   ret = chxj_rencoding(&r, ret, &destlen);
25419   CU_ASSERT(ret != NULL);
25420   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25421   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25422   CU_ASSERT(call_check == 1);
25423
25424   APR_TERM;
25425 #undef TEST_STRING
25426 #undef RESULT_STRING
25427 }
25428 void test_ixhtml10_blockquote_tag_with_css_016()
25429 {
25430 #define  TEST_STRING "<html><head>" \
25431                      "</head><body><blockquote style=\"font-size:xx-large\">あいう</blockquote></body></html>"
25432 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25433                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25434                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25435                        "<head></head><body><blockquote style=\"font-size:xx-large;\">あいう</blockquote></body></html>"
25436   char  *ret;
25437   char  *tmp;
25438   device_table spec;
25439   chxjconvrule_entry entry;
25440   cookie_t cookie;
25441   apr_size_t destlen;
25442   APR_INIT;
25443   chxj_serf_get = test_chxj_serf_get167;
25444   call_check = 0;
25445
25446   COOKIE_INIT(cookie);
25447
25448   SPEC_INIT(spec);
25449   destlen = sizeof(TEST_STRING)-1;
25450   entry.action |= CONVRULE_CSS_ON_BIT;
25451
25452   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25453   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25454   ret = chxj_rencoding(&r, ret, &destlen);
25455   CU_ASSERT(ret != NULL);
25456   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25457   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25458   CU_ASSERT(call_check == 0);
25459
25460   APR_TERM;
25461 #undef TEST_STRING
25462 #undef RESULT_STRING
25463 }
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474 /*===========================================================================*/
25475 /* dir tag with CSS                                                          */
25476 /*===========================================================================*/
25477 char *test_chxj_serf_get180(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
25478 {
25479   static char *css = "a:focus { display: none }\n"
25480                      "a:link  { display: none }\n"
25481                      "a       { display: none }\n"
25482                      "hr      { display: none }\n"
25483                      "a:visited { display:none }\n"
25484                      "dir { color: #ff0000 }\n";
25485
25486   *len = strlen(css);
25487   call_check = 1;
25488   return css;
25489 }
25490 void test_ixhtml10_dir_tag_with_css_001()
25491 {
25492 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
25493                      "</head><body><dir>あいう</dir></body></html>"
25494 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25495                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25496                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25497                        "<head></head><body><ul style=\"color:#ff0000;\">あいう</ul></body></html>"
25498   char  *ret;
25499   char  *tmp;
25500   device_table spec;
25501   chxjconvrule_entry entry;
25502   cookie_t cookie;
25503   apr_size_t destlen;
25504   APR_INIT;
25505   chxj_serf_get = test_chxj_serf_get180;
25506   call_check = 0;
25507
25508   COOKIE_INIT(cookie);
25509
25510   SPEC_INIT(spec);
25511   destlen = sizeof(TEST_STRING)-1;
25512   entry.action |= CONVRULE_CSS_ON_BIT;
25513
25514   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25515   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25516   ret = chxj_rencoding(&r, ret, &destlen);
25517   CU_ASSERT(ret != NULL);
25518   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25519   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25520   CU_ASSERT(call_check == 1);
25521
25522   APR_TERM;
25523 #undef TEST_STRING
25524 #undef RESULT_STRING
25525 }
25526 void test_ixhtml10_dir_tag_with_css_002()
25527 {
25528 #define  TEST_STRING "<html><head>" \
25529                      "</head><body><dir style=\"color:#ff0000\">あいう</dir></body></html>"
25530 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25531                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25532                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25533                        "<head></head><body><ul style=\"color:#ff0000;\">あいう</ul></body></html>"
25534   char  *ret;
25535   char  *tmp;
25536   device_table spec;
25537   chxjconvrule_entry entry;
25538   cookie_t cookie;
25539   apr_size_t destlen;
25540   APR_INIT;
25541   chxj_serf_get = test_chxj_serf_get180;
25542   call_check = 0;
25543
25544   COOKIE_INIT(cookie);
25545
25546   SPEC_INIT(spec);
25547   destlen = sizeof(TEST_STRING)-1;
25548   entry.action |= CONVRULE_CSS_ON_BIT;
25549
25550   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25551   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25552   ret = chxj_rencoding(&r, ret, &destlen);
25553   CU_ASSERT(ret != NULL);
25554   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25555   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25556   CU_ASSERT(call_check == 0);
25557
25558   APR_TERM;
25559 #undef TEST_STRING
25560 #undef RESULT_STRING
25561 }
25562
25563 char *test_chxj_serf_get181(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
25564 {
25565   static char *css = "a:focus { display: none }\n"
25566                      "a:link  { display: none }\n"
25567                      "a       { display: none }\n"
25568                      "hr      { display: none }\n"
25569                      "a:visited { display:none }\n"
25570                      "dir { list-style-type:disc }\n";
25571 /*
25572 list-style-type      =>  disc | circle | square => type="disc|circle|square"に変換
25573 */
25574
25575   *len = strlen(css);
25576   call_check = 1;
25577   return css;
25578 }
25579 void test_ixhtml10_dir_tag_with_css_003()
25580 {
25581 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
25582                      "</head><body><dir>あいう</dir></body></html>"
25583 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25584                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25585                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25586                        "<head></head><body><ul style=\"list-style-type:disc;\">あいう</ul></body></html>"
25587   char  *ret;
25588   char  *tmp;
25589   device_table spec;
25590   chxjconvrule_entry entry;
25591   cookie_t cookie;
25592   apr_size_t destlen;
25593   APR_INIT;
25594   chxj_serf_get = test_chxj_serf_get181;
25595   call_check = 0;
25596
25597   COOKIE_INIT(cookie);
25598
25599   SPEC_INIT(spec);
25600   destlen = sizeof(TEST_STRING)-1;
25601   entry.action |= CONVRULE_CSS_ON_BIT;
25602
25603   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25604   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25605   ret = chxj_rencoding(&r, ret, &destlen);
25606   CU_ASSERT(ret != NULL);
25607   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25608   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25609   CU_ASSERT(call_check == 1);
25610
25611   APR_TERM;
25612 #undef TEST_STRING
25613 #undef RESULT_STRING
25614 }
25615 void test_ixhtml10_dir_tag_with_css_004()
25616 {
25617 #define  TEST_STRING "<html><head>" \
25618                      "</head><body><dir style=\"list-style-type:disc\">あいう</dir></body></html>"
25619 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25620                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25621                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25622                        "<head></head><body><ul style=\"list-style-type:disc;\">あいう</ul></body></html>"
25623   char  *ret;
25624   char  *tmp;
25625   device_table spec;
25626   chxjconvrule_entry entry;
25627   cookie_t cookie;
25628   apr_size_t destlen;
25629   APR_INIT;
25630   chxj_serf_get = test_chxj_serf_get181;
25631   call_check = 0;
25632
25633   COOKIE_INIT(cookie);
25634
25635   SPEC_INIT(spec);
25636   destlen = sizeof(TEST_STRING)-1;
25637   entry.action |= CONVRULE_CSS_ON_BIT;
25638
25639   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25640   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25641   ret = chxj_rencoding(&r, ret, &destlen);
25642   CU_ASSERT(ret != NULL);
25643   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25644   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25645   CU_ASSERT(call_check == 0);
25646
25647   APR_TERM;
25648 #undef TEST_STRING
25649 #undef RESULT_STRING
25650 }
25651
25652
25653 char *test_chxj_serf_get182(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
25654 {
25655   static char *css = "a:focus { display: none }\n"
25656                      "a:link  { display: none }\n"
25657                      "a       { display: none }\n"
25658                      "hr      { display: none }\n"
25659                      "a:visited { display:none }\n"
25660                      "dir { list-style-type:circle }\n";
25661 /*
25662 list-style-type      =>  circle | circle | square => type="circle|circle|square"に変換
25663 */
25664
25665   *len = strlen(css);
25666   call_check = 1;
25667   return css;
25668 }
25669 void test_ixhtml10_dir_tag_with_css_005()
25670 {
25671 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
25672                      "</head><body><dir>あいう</dir></body></html>"
25673 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25674                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25675                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25676                        "<head></head><body><ul style=\"list-style-type:circle;\">あいう</ul></body></html>"
25677   char  *ret;
25678   char  *tmp;
25679   device_table spec;
25680   chxjconvrule_entry entry;
25681   cookie_t cookie;
25682   apr_size_t destlen;
25683   APR_INIT;
25684   chxj_serf_get = test_chxj_serf_get182;
25685   call_check = 0;
25686
25687   COOKIE_INIT(cookie);
25688
25689   SPEC_INIT(spec);
25690   destlen = sizeof(TEST_STRING)-1;
25691   entry.action |= CONVRULE_CSS_ON_BIT;
25692
25693   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25694   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25695   ret = chxj_rencoding(&r, ret, &destlen);
25696   CU_ASSERT(ret != NULL);
25697   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25698   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25699   CU_ASSERT(call_check == 1);
25700
25701   APR_TERM;
25702 #undef TEST_STRING
25703 #undef RESULT_STRING
25704 }
25705 void test_ixhtml10_dir_tag_with_css_006()
25706 {
25707 #define  TEST_STRING "<html><head>" \
25708                      "</head><body><dir style=\"list-style-type:circle\">あいう</dir></body></html>"
25709 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25710                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25711                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25712                        "<head></head><body><ul style=\"list-style-type:circle;\">あいう</ul></body></html>"
25713   char  *ret;
25714   char  *tmp;
25715   device_table spec;
25716   chxjconvrule_entry entry;
25717   cookie_t cookie;
25718   apr_size_t destlen;
25719   APR_INIT;
25720   chxj_serf_get = test_chxj_serf_get182;
25721   call_check = 0;
25722
25723   COOKIE_INIT(cookie);
25724
25725   SPEC_INIT(spec);
25726   destlen = sizeof(TEST_STRING)-1;
25727   entry.action |= CONVRULE_CSS_ON_BIT;
25728
25729   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25730   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25731   ret = chxj_rencoding(&r, ret, &destlen);
25732   CU_ASSERT(ret != NULL);
25733   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25734   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25735   CU_ASSERT(call_check == 0);
25736
25737   APR_TERM;
25738 #undef TEST_STRING
25739 #undef RESULT_STRING
25740 }
25741
25742
25743
25744 char *test_chxj_serf_get183(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
25745 {
25746   static char *css = "a:focus { display: none }\n"
25747                      "a:link  { display: none }\n"
25748                      "a       { display: none }\n"
25749                      "hr      { display: none }\n"
25750                      "a:visited { display:none }\n"
25751                      "dir { list-style-type:square }\n";
25752 /*
25753 list-style-type      =>  square | square | square => type="square|square|square"に変換
25754 */
25755
25756   *len = strlen(css);
25757   call_check = 1;
25758   return css;
25759 }
25760 void test_ixhtml10_dir_tag_with_css_007()
25761 {
25762 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
25763                      "</head><body><dir>あいう</dir></body></html>"
25764 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25765                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25766                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25767                        "<head></head><body><ul style=\"list-style-type:square;\">あいう</ul></body></html>"
25768   char  *ret;
25769   char  *tmp;
25770   device_table spec;
25771   chxjconvrule_entry entry;
25772   cookie_t cookie;
25773   apr_size_t destlen;
25774   APR_INIT;
25775   chxj_serf_get = test_chxj_serf_get183;
25776   call_check = 0;
25777
25778   COOKIE_INIT(cookie);
25779
25780   SPEC_INIT(spec);
25781   destlen = sizeof(TEST_STRING)-1;
25782   entry.action |= CONVRULE_CSS_ON_BIT;
25783
25784   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25785   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25786   ret = chxj_rencoding(&r, ret, &destlen);
25787   CU_ASSERT(ret != NULL);
25788   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25789   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25790   CU_ASSERT(call_check == 1);
25791
25792   APR_TERM;
25793 #undef TEST_STRING
25794 #undef RESULT_STRING
25795 }
25796 void test_ixhtml10_dir_tag_with_css_008()
25797 {
25798 #define  TEST_STRING "<html><head>" \
25799                      "</head><body><dir style=\"list-style-type:square\">あいう</dir></body></html>"
25800 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25801                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25802                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25803                        "<head></head><body><ul style=\"list-style-type:square;\">あいう</ul></body></html>"
25804   char  *ret;
25805   char  *tmp;
25806   device_table spec;
25807   chxjconvrule_entry entry;
25808   cookie_t cookie;
25809   apr_size_t destlen;
25810   APR_INIT;
25811   chxj_serf_get = test_chxj_serf_get183;
25812   call_check = 0;
25813
25814   COOKIE_INIT(cookie);
25815
25816   SPEC_INIT(spec);
25817   destlen = sizeof(TEST_STRING)-1;
25818   entry.action |= CONVRULE_CSS_ON_BIT;
25819
25820   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25821   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25822   ret = chxj_rencoding(&r, ret, &destlen);
25823   CU_ASSERT(ret != NULL);
25824   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25825   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25826   CU_ASSERT(call_check == 0);
25827
25828   APR_TERM;
25829 #undef TEST_STRING
25830 #undef RESULT_STRING
25831 }
25832
25833
25834
25835 char *test_chxj_serf_get184(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
25836 {
25837   static char *css = "a:focus { display: none }\n"
25838                      "a:link  { display: none }\n"
25839                      "a       { display: none }\n"
25840                      "hr      { display: none }\n"
25841                      "a:visited { display:none }\n"
25842                      "dir { font-size:xx-small }\n";
25843   *len = strlen(css);
25844   call_check = 1;
25845   return css;
25846 }
25847 void test_ixhtml10_dir_tag_with_css_009()
25848 {
25849 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
25850                      "</head><body><dir>あいう</dir></body></html>"
25851 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25852                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25853                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25854                        "<head></head><body><ul style=\"font-size:xx-small;\">あいう</ul></body></html>"
25855   char  *ret;
25856   char  *tmp;
25857   device_table spec;
25858   chxjconvrule_entry entry;
25859   cookie_t cookie;
25860   apr_size_t destlen;
25861   APR_INIT;
25862   chxj_serf_get = test_chxj_serf_get184;
25863   call_check = 0;
25864
25865   COOKIE_INIT(cookie);
25866
25867   SPEC_INIT(spec);
25868   destlen = sizeof(TEST_STRING)-1;
25869   entry.action |= CONVRULE_CSS_ON_BIT;
25870
25871   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25872   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25873   ret = chxj_rencoding(&r, ret, &destlen);
25874   CU_ASSERT(ret != NULL);
25875   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25876   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25877   CU_ASSERT(call_check == 1);
25878
25879   APR_TERM;
25880 #undef TEST_STRING
25881 #undef RESULT_STRING
25882 }
25883 void test_ixhtml10_dir_tag_with_css_010()
25884 {
25885 #define  TEST_STRING "<html><head>" \
25886                      "</head><body><dir style=\"font-size:xx-small\">あいう</dir></body></html>"
25887 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25888                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25889                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25890                        "<head></head><body><ul style=\"font-size:xx-small;\">あいう</ul></body></html>"
25891   char  *ret;
25892   char  *tmp;
25893   device_table spec;
25894   chxjconvrule_entry entry;
25895   cookie_t cookie;
25896   apr_size_t destlen;
25897   APR_INIT;
25898   chxj_serf_get = test_chxj_serf_get184;
25899   call_check = 0;
25900
25901   COOKIE_INIT(cookie);
25902
25903   SPEC_INIT(spec);
25904   destlen = sizeof(TEST_STRING)-1;
25905   entry.action |= CONVRULE_CSS_ON_BIT;
25906
25907   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25908   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25909   ret = chxj_rencoding(&r, ret, &destlen);
25910   CU_ASSERT(ret != NULL);
25911   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25912   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25913   CU_ASSERT(call_check == 0);
25914
25915   APR_TERM;
25916 #undef TEST_STRING
25917 #undef RESULT_STRING
25918 }
25919
25920
25921
25922 char *test_chxj_serf_get185(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
25923 {
25924   static char *css = "a:focus { display: none }\n"
25925                      "a:link  { display: none }\n"
25926                      "a       { display: none }\n"
25927                      "hr      { display: none }\n"
25928                      "a:visited { display:none }\n"
25929                      "dir { font-size:x-small }\n";
25930   *len = strlen(css);
25931   call_check = 1;
25932   return css;
25933 }
25934 void test_ixhtml10_dir_tag_with_css_011()
25935 {
25936 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
25937                      "</head><body><dir>あいう</dir></body></html>"
25938 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25939                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25940                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25941                        "<head></head><body><ul style=\"font-size:x-small;\">あいう</ul></body></html>"
25942   char  *ret;
25943   char  *tmp;
25944   device_table spec;
25945   chxjconvrule_entry entry;
25946   cookie_t cookie;
25947   apr_size_t destlen;
25948   APR_INIT;
25949   chxj_serf_get = test_chxj_serf_get185;
25950   call_check = 0;
25951
25952   COOKIE_INIT(cookie);
25953
25954   SPEC_INIT(spec);
25955   destlen = sizeof(TEST_STRING)-1;
25956   entry.action |= CONVRULE_CSS_ON_BIT;
25957
25958   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25959   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25960   ret = chxj_rencoding(&r, ret, &destlen);
25961   CU_ASSERT(ret != NULL);
25962   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25963   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
25964   CU_ASSERT(call_check == 1);
25965
25966   APR_TERM;
25967 #undef TEST_STRING
25968 #undef RESULT_STRING
25969 }
25970 void test_ixhtml10_dir_tag_with_css_012()
25971 {
25972 #define  TEST_STRING "<html><head>" \
25973                      "</head><body><dir style=\"font-size:x-small\">あいう</dir></body></html>"
25974 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
25975                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
25976                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
25977                        "<head></head><body><ul style=\"font-size:x-small;\">あいう</ul></body></html>"
25978   char  *ret;
25979   char  *tmp;
25980   device_table spec;
25981   chxjconvrule_entry entry;
25982   cookie_t cookie;
25983   apr_size_t destlen;
25984   APR_INIT;
25985   chxj_serf_get = test_chxj_serf_get185;
25986   call_check = 0;
25987
25988   COOKIE_INIT(cookie);
25989
25990   SPEC_INIT(spec);
25991   destlen = sizeof(TEST_STRING)-1;
25992   entry.action |= CONVRULE_CSS_ON_BIT;
25993
25994   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
25995   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
25996   ret = chxj_rencoding(&r, ret, &destlen);
25997   CU_ASSERT(ret != NULL);
25998   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
25999   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26000   CU_ASSERT(call_check == 0);
26001
26002   APR_TERM;
26003 #undef TEST_STRING
26004 #undef RESULT_STRING
26005 }
26006
26007
26008
26009 char *test_chxj_serf_get186(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
26010 {
26011   static char *css = "a:focus { display: none }\n"
26012                      "a:link  { display: none }\n"
26013                      "a       { display: none }\n"
26014                      "hr      { display: none }\n"
26015                      "a:visited { display:none }\n"
26016                      "dir { font-size:small }\n";
26017   *len = strlen(css);
26018   call_check = 1;
26019   return css;
26020 }
26021 void test_ixhtml10_dir_tag_with_css_013()
26022 {
26023 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
26024                      "</head><body><dir>あいう</dir></body></html>"
26025 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26026                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26027                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26028                        "<head></head><body><ul style=\"font-size:small;\">あいう</ul></body></html>"
26029   char  *ret;
26030   char  *tmp;
26031   device_table spec;
26032   chxjconvrule_entry entry;
26033   cookie_t cookie;
26034   apr_size_t destlen;
26035   APR_INIT;
26036   chxj_serf_get = test_chxj_serf_get186;
26037   call_check = 0;
26038
26039   COOKIE_INIT(cookie);
26040
26041   SPEC_INIT(spec);
26042   destlen = sizeof(TEST_STRING)-1;
26043   entry.action |= CONVRULE_CSS_ON_BIT;
26044
26045   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26046   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26047   ret = chxj_rencoding(&r, ret, &destlen);
26048   CU_ASSERT(ret != NULL);
26049   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26050   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26051   CU_ASSERT(call_check == 1);
26052
26053   APR_TERM;
26054 #undef TEST_STRING
26055 #undef RESULT_STRING
26056 }
26057 void test_ixhtml10_dir_tag_with_css_014()
26058 {
26059 #define  TEST_STRING "<html><head>" \
26060                      "</head><body><dir style=\"font-size:small\">あいう</dir></body></html>"
26061 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26062                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26063                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26064                        "<head></head><body><ul style=\"font-size:small;\">あいう</ul></body></html>"
26065   char  *ret;
26066   char  *tmp;
26067   device_table spec;
26068   chxjconvrule_entry entry;
26069   cookie_t cookie;
26070   apr_size_t destlen;
26071   APR_INIT;
26072   chxj_serf_get = test_chxj_serf_get186;
26073   call_check = 0;
26074
26075   COOKIE_INIT(cookie);
26076
26077   SPEC_INIT(spec);
26078   destlen = sizeof(TEST_STRING)-1;
26079   entry.action |= CONVRULE_CSS_ON_BIT;
26080
26081   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26082   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26083   ret = chxj_rencoding(&r, ret, &destlen);
26084   CU_ASSERT(ret != NULL);
26085   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26086   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26087   CU_ASSERT(call_check == 0);
26088
26089   APR_TERM;
26090 #undef TEST_STRING
26091 #undef RESULT_STRING
26092 }
26093 char *test_chxj_serf_get187(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
26094 {
26095   static char *css = "a:focus { display: none }\n"
26096                      "a:link  { display: none }\n"
26097                      "a       { display: none }\n"
26098                      "hr      { display: none }\n"
26099                      "a:visited { display:none }\n"
26100                      "dir { font-size:medium }\n";
26101   *len = strlen(css);
26102   call_check = 1;
26103   return css;
26104 }
26105 void test_ixhtml10_dir_tag_with_css_015()
26106 {
26107 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
26108                      "</head><body><dir>あいう</dir></body></html>"
26109 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26110                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26111                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26112                        "<head></head><body><ul style=\"font-size:medium;\">あいう</ul></body></html>"
26113   char  *ret;
26114   char  *tmp;
26115   device_table spec;
26116   chxjconvrule_entry entry;
26117   cookie_t cookie;
26118   apr_size_t destlen;
26119   APR_INIT;
26120   chxj_serf_get = test_chxj_serf_get187;
26121   call_check = 0;
26122
26123   COOKIE_INIT(cookie);
26124
26125   SPEC_INIT(spec);
26126   destlen = sizeof(TEST_STRING)-1;
26127   entry.action |= CONVRULE_CSS_ON_BIT;
26128
26129   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26130   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26131   ret = chxj_rencoding(&r, ret, &destlen);
26132   CU_ASSERT(ret != NULL);
26133   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26134   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26135   CU_ASSERT(call_check == 1);
26136
26137   APR_TERM;
26138 #undef TEST_STRING
26139 #undef RESULT_STRING
26140 }
26141 void test_ixhtml10_dir_tag_with_css_016()
26142 {
26143 #define  TEST_STRING "<html><head>" \
26144                      "</head><body><dir style=\"font-size:medium\">あいう</dir></body></html>"
26145 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26146                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26147                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26148                        "<head></head><body><ul style=\"font-size:medium;\">あいう</ul></body></html>"
26149   char  *ret;
26150   char  *tmp;
26151   device_table spec;
26152   chxjconvrule_entry entry;
26153   cookie_t cookie;
26154   apr_size_t destlen;
26155   APR_INIT;
26156   chxj_serf_get = test_chxj_serf_get187;
26157   call_check = 0;
26158
26159   COOKIE_INIT(cookie);
26160
26161   SPEC_INIT(spec);
26162   destlen = sizeof(TEST_STRING)-1;
26163   entry.action |= CONVRULE_CSS_ON_BIT;
26164
26165   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26166   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26167   ret = chxj_rencoding(&r, ret, &destlen);
26168   CU_ASSERT(ret != NULL);
26169   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26170   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26171   CU_ASSERT(call_check == 0);
26172
26173   APR_TERM;
26174 #undef TEST_STRING
26175 #undef RESULT_STRING
26176 }
26177 char *test_chxj_serf_get188(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
26178 {
26179   static char *css = "a:focus { display: none }\n"
26180                      "a:link  { display: none }\n"
26181                      "a       { display: none }\n"
26182                      "hr      { display: none }\n"
26183                      "a:visited { display:none }\n"
26184                      "dir { font-size:large }\n";
26185   *len = strlen(css);
26186   call_check = 1;
26187   return css;
26188 }
26189 void test_ixhtml10_dir_tag_with_css_017()
26190 {
26191 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
26192                      "</head><body><dir>あいう</dir></body></html>"
26193 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26194                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26195                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26196                        "<head></head><body><ul style=\"font-size:large;\">あいう</ul></body></html>"
26197   char  *ret;
26198   char  *tmp;
26199   device_table spec;
26200   chxjconvrule_entry entry;
26201   cookie_t cookie;
26202   apr_size_t destlen;
26203   APR_INIT;
26204   chxj_serf_get = test_chxj_serf_get188;
26205   call_check = 0;
26206
26207   COOKIE_INIT(cookie);
26208
26209   SPEC_INIT(spec);
26210   destlen = sizeof(TEST_STRING)-1;
26211   entry.action |= CONVRULE_CSS_ON_BIT;
26212
26213   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26214   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26215   ret = chxj_rencoding(&r, ret, &destlen);
26216   CU_ASSERT(ret != NULL);
26217   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26218   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26219   CU_ASSERT(call_check == 1);
26220
26221   APR_TERM;
26222 #undef TEST_STRING
26223 #undef RESULT_STRING
26224 }
26225 void test_ixhtml10_dir_tag_with_css_018()
26226 {
26227 #define  TEST_STRING "<html><head>" \
26228                      "</head><body><dir style=\"font-size:large\">あいう</dir></body></html>"
26229 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26230                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26231                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26232                        "<head></head><body><ul style=\"font-size:large;\">あいう</ul></body></html>"
26233   char  *ret;
26234   char  *tmp;
26235   device_table spec;
26236   chxjconvrule_entry entry;
26237   cookie_t cookie;
26238   apr_size_t destlen;
26239   APR_INIT;
26240   chxj_serf_get = test_chxj_serf_get188;
26241   call_check = 0;
26242
26243   COOKIE_INIT(cookie);
26244
26245   SPEC_INIT(spec);
26246   destlen = sizeof(TEST_STRING)-1;
26247   entry.action |= CONVRULE_CSS_ON_BIT;
26248
26249   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26250   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26251   ret = chxj_rencoding(&r, ret, &destlen);
26252   CU_ASSERT(ret != NULL);
26253   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26254   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26255   CU_ASSERT(call_check == 0);
26256
26257   APR_TERM;
26258 #undef TEST_STRING
26259 #undef RESULT_STRING
26260 }
26261
26262
26263 char *test_chxj_serf_get189(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
26264 {
26265   static char *css = "a:focus { display: none }\n"
26266                      "a:link  { display: none }\n"
26267                      "a       { display: none }\n"
26268                      "hr      { display: none }\n"
26269                      "a:visited { display:none }\n"
26270                      "dir { font-size:x-large }\n";
26271   *len = strlen(css);
26272   call_check = 1;
26273   return css;
26274 }
26275 void test_ixhtml10_dir_tag_with_css_019()
26276 {
26277 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
26278                      "</head><body><dir>あいう</dir></body></html>"
26279 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26280                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26281                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26282                        "<head></head><body><ul style=\"font-size:x-large;\">あいう</ul></body></html>"
26283   char  *ret;
26284   char  *tmp;
26285   device_table spec;
26286   chxjconvrule_entry entry;
26287   cookie_t cookie;
26288   apr_size_t destlen;
26289   APR_INIT;
26290   chxj_serf_get = test_chxj_serf_get189;
26291   call_check = 0;
26292
26293   COOKIE_INIT(cookie);
26294
26295   SPEC_INIT(spec);
26296   destlen = sizeof(TEST_STRING)-1;
26297   entry.action |= CONVRULE_CSS_ON_BIT;
26298
26299   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26300   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26301   ret = chxj_rencoding(&r, ret, &destlen);
26302   CU_ASSERT(ret != NULL);
26303   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26304   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26305   CU_ASSERT(call_check == 1);
26306
26307   APR_TERM;
26308 #undef TEST_STRING
26309 #undef RESULT_STRING
26310 }
26311 void test_ixhtml10_dir_tag_with_css_020()
26312 {
26313 #define  TEST_STRING "<html><head>" \
26314                      "</head><body><dir style=\"font-size:x-large\">あいう</dir></body></html>"
26315 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26316                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26317                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26318                        "<head></head><body><ul style=\"font-size:x-large;\">あいう</ul></body></html>"
26319   char  *ret;
26320   char  *tmp;
26321   device_table spec;
26322   chxjconvrule_entry entry;
26323   cookie_t cookie;
26324   apr_size_t destlen;
26325   APR_INIT;
26326   chxj_serf_get = test_chxj_serf_get189;
26327   call_check = 0;
26328
26329   COOKIE_INIT(cookie);
26330
26331   SPEC_INIT(spec);
26332   destlen = sizeof(TEST_STRING)-1;
26333   entry.action |= CONVRULE_CSS_ON_BIT;
26334
26335   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26336   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26337   ret = chxj_rencoding(&r, ret, &destlen);
26338   CU_ASSERT(ret != NULL);
26339   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26340   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26341   CU_ASSERT(call_check == 0);
26342
26343   APR_TERM;
26344 #undef TEST_STRING
26345 #undef RESULT_STRING
26346 }
26347
26348
26349 char *test_chxj_serf_get190(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
26350 {
26351   static char *css = "a:focus { display: none }\n"
26352                      "a:link  { display: none }\n"
26353                      "a       { display: none }\n"
26354                      "hr      { display: none }\n"
26355                      "a:visited { display:none }\n"
26356                      "dir { font-size:xx-large }\n";
26357   *len = strlen(css);
26358   call_check = 1;
26359   return css;
26360 }
26361 void test_ixhtml10_dir_tag_with_css_021()
26362 {
26363 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
26364                      "</head><body><dir>あいう</dir></body></html>"
26365 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26366                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26367                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26368                        "<head></head><body><ul style=\"font-size:xx-large;\">あいう</ul></body></html>"
26369   char  *ret;
26370   char  *tmp;
26371   device_table spec;
26372   chxjconvrule_entry entry;
26373   cookie_t cookie;
26374   apr_size_t destlen;
26375   APR_INIT;
26376   chxj_serf_get = test_chxj_serf_get190;
26377   call_check = 0;
26378
26379   COOKIE_INIT(cookie);
26380
26381   SPEC_INIT(spec);
26382   destlen = sizeof(TEST_STRING)-1;
26383   entry.action |= CONVRULE_CSS_ON_BIT;
26384
26385   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26386   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26387   ret = chxj_rencoding(&r, ret, &destlen);
26388   CU_ASSERT(ret != NULL);
26389   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26390   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26391   CU_ASSERT(call_check == 1);
26392
26393   APR_TERM;
26394 #undef TEST_STRING
26395 #undef RESULT_STRING
26396 }
26397 void test_ixhtml10_dir_tag_with_css_022()
26398 {
26399 #define  TEST_STRING "<html><head>" \
26400                      "</head><body><dir style=\"font-size:xx-large\">あいう</dir></body></html>"
26401 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26402                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26403                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26404                         "<head></head><body><ul style=\"font-size:xx-large;\">あいう</ul></body></html>"
26405   char  *ret;
26406   char  *tmp;
26407   device_table spec;
26408   chxjconvrule_entry entry;
26409   cookie_t cookie;
26410   apr_size_t destlen;
26411   APR_INIT;
26412   chxj_serf_get = test_chxj_serf_get190;
26413   call_check = 0;
26414
26415   COOKIE_INIT(cookie);
26416
26417   SPEC_INIT(spec);
26418   destlen = sizeof(TEST_STRING)-1;
26419   entry.action |= CONVRULE_CSS_ON_BIT;
26420
26421   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26422   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26423   ret = chxj_rencoding(&r, ret, &destlen);
26424   CU_ASSERT(ret != NULL);
26425   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26426   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26427   CU_ASSERT(call_check == 0);
26428
26429   APR_TERM;
26430 #undef TEST_STRING
26431 #undef RESULT_STRING
26432 }
26433
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443 /*===========================================================================*/
26444 /* dl tag with CSS                                                          */
26445 /*===========================================================================*/
26446 char *test_chxj_serf_get200(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
26447 {
26448   static char *css = "a:focus { display: none }\n"
26449                      "a:link  { display: none }\n"
26450                      "a       { display: none }\n"
26451                      "hr      { display: none }\n"
26452                      "a:visited { display:none }\n"
26453                      "dl { color: #ff0000 }\n";
26454
26455   *len = strlen(css);
26456   call_check = 1;
26457   return css;
26458 }
26459 void test_ixhtml10_dl_tag_with_css_001()
26460 {
26461 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
26462                      "</head><body><dl>あいう</dl></body></html>"
26463 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26464                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26465                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26466                        "<head></head><body><dl style=\"color:#ff0000;\">あいう</dl></body></html>"
26467   char  *ret;
26468   char  *tmp;
26469   device_table spec;
26470   chxjconvrule_entry entry;
26471   cookie_t cookie;
26472   apr_size_t destlen;
26473   APR_INIT;
26474   chxj_serf_get = test_chxj_serf_get200;
26475   call_check = 0;
26476
26477   COOKIE_INIT(cookie);
26478
26479   SPEC_INIT(spec);
26480   destlen = sizeof(TEST_STRING)-1;
26481   entry.action |= CONVRULE_CSS_ON_BIT;
26482
26483   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26484   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26485   ret = chxj_rencoding(&r, ret, &destlen);
26486   CU_ASSERT(ret != NULL);
26487   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26488   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26489   CU_ASSERT(call_check == 1);
26490
26491   APR_TERM;
26492 #undef TEST_STRING
26493 #undef RESULT_STRING
26494 }
26495 void test_ixhtml10_dl_tag_with_css_002()
26496 {
26497 #define  TEST_STRING "<html><head>" \
26498                      "</head><body><dl style=\"color:#ff0000\">あいう</dl></body></html>"
26499 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26500                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26501                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26502                        "<head></head><body><dl style=\"color:#ff0000;\">あいう</dl></body></html>"
26503   char  *ret;
26504   char  *tmp;
26505   device_table spec;
26506   chxjconvrule_entry entry;
26507   cookie_t cookie;
26508   apr_size_t destlen;
26509   APR_INIT;
26510   chxj_serf_get = test_chxj_serf_get200;
26511   call_check = 0;
26512
26513   COOKIE_INIT(cookie);
26514
26515   SPEC_INIT(spec);
26516   destlen = sizeof(TEST_STRING)-1;
26517   entry.action |= CONVRULE_CSS_ON_BIT;
26518
26519   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26520   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26521   ret = chxj_rencoding(&r, ret, &destlen);
26522   CU_ASSERT(ret != NULL);
26523   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26524   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26525   CU_ASSERT(call_check == 0);
26526
26527   APR_TERM;
26528 #undef TEST_STRING
26529 #undef RESULT_STRING
26530 }
26531
26532
26533 char *test_chxj_serf_get204(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
26534 {
26535   static char *css = "a:focus { display: none }\n"
26536                      "a:link  { display: none }\n"
26537                      "a       { display: none }\n"
26538                      "hr      { display: none }\n"
26539                      "a:visited { display:none }\n"
26540                      "dl { font-size:xx-small }\n";
26541   *len = strlen(css);
26542   call_check = 1;
26543   return css;
26544 }
26545 void test_ixhtml10_dl_tag_with_css_009()
26546 {
26547 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
26548                      "</head><body><dl>あいう</dl></body></html>"
26549 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26550                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26551                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26552                        "<head></head><body><dl style=\"font-size:xx-small;\">あいう</dl></body></html>"
26553   char  *ret;
26554   char  *tmp;
26555   device_table spec;
26556   chxjconvrule_entry entry;
26557   cookie_t cookie;
26558   apr_size_t destlen;
26559   APR_INIT;
26560   chxj_serf_get = test_chxj_serf_get204;
26561   call_check = 0;
26562
26563   COOKIE_INIT(cookie);
26564
26565   SPEC_INIT(spec);
26566   destlen = sizeof(TEST_STRING)-1;
26567   entry.action |= CONVRULE_CSS_ON_BIT;
26568
26569   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26570   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26571   ret = chxj_rencoding(&r, ret, &destlen);
26572   CU_ASSERT(ret != NULL);
26573   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26574   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26575   CU_ASSERT(call_check == 1);
26576
26577   APR_TERM;
26578 #undef TEST_STRING
26579 #undef RESULT_STRING
26580 }
26581 void test_ixhtml10_dl_tag_with_css_010()
26582 {
26583 #define  TEST_STRING "<html><head>" \
26584                      "</head><body><dl style=\"font-size:xx-small\">あいう</dl></body></html>"
26585 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26586                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26587                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26588                        "<head></head><body><dl style=\"font-size:xx-small;\">あいう</dl></body></html>"
26589   char  *ret;
26590   char  *tmp;
26591   device_table spec;
26592   chxjconvrule_entry entry;
26593   cookie_t cookie;
26594   apr_size_t destlen;
26595   APR_INIT;
26596   chxj_serf_get = test_chxj_serf_get204;
26597   call_check = 0;
26598
26599   COOKIE_INIT(cookie);
26600
26601   SPEC_INIT(spec);
26602   destlen = sizeof(TEST_STRING)-1;
26603   entry.action |= CONVRULE_CSS_ON_BIT;
26604
26605   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26606   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26607   ret = chxj_rencoding(&r, ret, &destlen);
26608   CU_ASSERT(ret != NULL);
26609   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26610   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26611   CU_ASSERT(call_check == 0);
26612
26613   APR_TERM;
26614 #undef TEST_STRING
26615 #undef RESULT_STRING
26616 }
26617
26618
26619
26620 char *test_chxj_serf_get205(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
26621 {
26622   static char *css = "a:focus { display: none }\n"
26623                      "a:link  { display: none }\n"
26624                      "a       { display: none }\n"
26625                      "hr      { display: none }\n"
26626                      "a:visited { display:none }\n"
26627                      "dl { font-size:x-small }\n";
26628   *len = strlen(css);
26629   call_check = 1;
26630   return css;
26631 }
26632 void test_ixhtml10_dl_tag_with_css_011()
26633 {
26634 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
26635                      "</head><body><dl>あいう</dl></body></html>"
26636 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26637                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26638                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26639                        "<head></head><body><dl style=\"font-size:x-small;\">あいう</dl></body></html>"
26640   char  *ret;
26641   char  *tmp;
26642   device_table spec;
26643   chxjconvrule_entry entry;
26644   cookie_t cookie;
26645   apr_size_t destlen;
26646   APR_INIT;
26647   chxj_serf_get = test_chxj_serf_get205;
26648   call_check = 0;
26649
26650   COOKIE_INIT(cookie);
26651
26652   SPEC_INIT(spec);
26653   destlen = sizeof(TEST_STRING)-1;
26654   entry.action |= CONVRULE_CSS_ON_BIT;
26655
26656   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26657   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26658   ret = chxj_rencoding(&r, ret, &destlen);
26659   CU_ASSERT(ret != NULL);
26660   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26661   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26662   CU_ASSERT(call_check == 1);
26663
26664   APR_TERM;
26665 #undef TEST_STRING
26666 #undef RESULT_STRING
26667 }
26668 void test_ixhtml10_dl_tag_with_css_012()
26669 {
26670 #define  TEST_STRING "<html><head>" \
26671                      "</head><body><dl style=\"font-size:x-small\">あいう</dl></body></html>"
26672 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26673                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26674                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26675                        "<head></head><body><dl style=\"font-size:x-small;\">あいう</dl></body></html>"
26676   char  *ret;
26677   char  *tmp;
26678   device_table spec;
26679   chxjconvrule_entry entry;
26680   cookie_t cookie;
26681   apr_size_t destlen;
26682   APR_INIT;
26683   chxj_serf_get = test_chxj_serf_get205;
26684   call_check = 0;
26685
26686   COOKIE_INIT(cookie);
26687
26688   SPEC_INIT(spec);
26689   destlen = sizeof(TEST_STRING)-1;
26690   entry.action |= CONVRULE_CSS_ON_BIT;
26691
26692   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26693   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26694   ret = chxj_rencoding(&r, ret, &destlen);
26695   CU_ASSERT(ret != NULL);
26696   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26697   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26698   CU_ASSERT(call_check == 0);
26699
26700   APR_TERM;
26701 #undef TEST_STRING
26702 #undef RESULT_STRING
26703 }
26704
26705
26706
26707 char *test_chxj_serf_get206(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
26708 {
26709   static char *css = "a:focus { display: none }\n"
26710                      "a:link  { display: none }\n"
26711                      "a       { display: none }\n"
26712                      "hr      { display: none }\n"
26713                      "a:visited { display:none }\n"
26714                      "dl { font-size:small }\n";
26715   *len = strlen(css);
26716   call_check = 1;
26717   return css;
26718 }
26719 void test_ixhtml10_dl_tag_with_css_013()
26720 {
26721 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
26722                      "</head><body><dl>あいう</dl></body></html>"
26723 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26724                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26725                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26726                        "<head></head><body><dl style=\"font-size:small;\">あいう</dl></body></html>"
26727   char  *ret;
26728   char  *tmp;
26729   device_table spec;
26730   chxjconvrule_entry entry;
26731   cookie_t cookie;
26732   apr_size_t destlen;
26733   APR_INIT;
26734   chxj_serf_get = test_chxj_serf_get206;
26735   call_check = 0;
26736
26737   COOKIE_INIT(cookie);
26738
26739   SPEC_INIT(spec);
26740   destlen = sizeof(TEST_STRING)-1;
26741   entry.action |= CONVRULE_CSS_ON_BIT;
26742
26743   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26744   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26745   ret = chxj_rencoding(&r, ret, &destlen);
26746   CU_ASSERT(ret != NULL);
26747   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26748   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26749   CU_ASSERT(call_check == 1);
26750
26751   APR_TERM;
26752 #undef TEST_STRING
26753 #undef RESULT_STRING
26754 }
26755 void test_ixhtml10_dl_tag_with_css_014()
26756 {
26757 #define  TEST_STRING "<html><head>" \
26758                      "</head><body><dl style=\"font-size:small\">あいう</dl></body></html>"
26759 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26760                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26761                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26762                        "<head></head><body><dl style=\"font-size:small;\">あいう</dl></body></html>"
26763   char  *ret;
26764   char  *tmp;
26765   device_table spec;
26766   chxjconvrule_entry entry;
26767   cookie_t cookie;
26768   apr_size_t destlen;
26769   APR_INIT;
26770   chxj_serf_get = test_chxj_serf_get206;
26771   call_check = 0;
26772
26773   COOKIE_INIT(cookie);
26774
26775   SPEC_INIT(spec);
26776   destlen = sizeof(TEST_STRING)-1;
26777   entry.action |= CONVRULE_CSS_ON_BIT;
26778
26779   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26780   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26781   ret = chxj_rencoding(&r, ret, &destlen);
26782   CU_ASSERT(ret != NULL);
26783   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26784   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26785   CU_ASSERT(call_check == 0);
26786
26787   APR_TERM;
26788 #undef TEST_STRING
26789 #undef RESULT_STRING
26790 }
26791 char *test_chxj_serf_get207(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
26792 {
26793   static char *css = "a:focus { display: none }\n"
26794                      "a:link  { display: none }\n"
26795                      "a       { display: none }\n"
26796                      "hr      { display: none }\n"
26797                      "a:visited { display:none }\n"
26798                      "dl { font-size:medium }\n";
26799   *len = strlen(css);
26800   call_check = 1;
26801   return css;
26802 }
26803 void test_ixhtml10_dl_tag_with_css_015()
26804 {
26805 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
26806                      "</head><body><dl>あいう</dl></body></html>"
26807 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26808                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26809                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26810                        "<head></head><body><dl style=\"font-size:medium;\">あいう</dl></body></html>"
26811   char  *ret;
26812   char  *tmp;
26813   device_table spec;
26814   chxjconvrule_entry entry;
26815   cookie_t cookie;
26816   apr_size_t destlen;
26817   APR_INIT;
26818   chxj_serf_get = test_chxj_serf_get207;
26819   call_check = 0;
26820
26821   COOKIE_INIT(cookie);
26822
26823   SPEC_INIT(spec);
26824   destlen = sizeof(TEST_STRING)-1;
26825   entry.action |= CONVRULE_CSS_ON_BIT;
26826
26827   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26828   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26829   ret = chxj_rencoding(&r, ret, &destlen);
26830   CU_ASSERT(ret != NULL);
26831   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26832   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26833   CU_ASSERT(call_check == 1);
26834
26835   APR_TERM;
26836 #undef TEST_STRING
26837 #undef RESULT_STRING
26838 }
26839 void test_ixhtml10_dl_tag_with_css_016()
26840 {
26841 #define  TEST_STRING "<html><head>" \
26842                      "</head><body><dl style=\"font-size:medium\">あいう</dl></body></html>"
26843 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26844                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26845                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26846                        "<head></head><body><dl style=\"font-size:medium;\">あいう</dl></body></html>"
26847   char  *ret;
26848   char  *tmp;
26849   device_table spec;
26850   chxjconvrule_entry entry;
26851   cookie_t cookie;
26852   apr_size_t destlen;
26853   APR_INIT;
26854   chxj_serf_get = test_chxj_serf_get207;
26855   call_check = 0;
26856
26857   COOKIE_INIT(cookie);
26858
26859   SPEC_INIT(spec);
26860   destlen = sizeof(TEST_STRING)-1;
26861   entry.action |= CONVRULE_CSS_ON_BIT;
26862
26863   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26864   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26865   ret = chxj_rencoding(&r, ret, &destlen);
26866   CU_ASSERT(ret != NULL);
26867   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26868   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26869   CU_ASSERT(call_check == 0);
26870
26871   APR_TERM;
26872 #undef TEST_STRING
26873 #undef RESULT_STRING
26874 }
26875 char *test_chxj_serf_get208(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
26876 {
26877   static char *css = "a:focus { display: none }\n"
26878                      "a:link  { display: none }\n"
26879                      "a       { display: none }\n"
26880                      "hr      { display: none }\n"
26881                      "a:visited { display:none }\n"
26882                      "dl { font-size:large }\n";
26883   *len = strlen(css);
26884   call_check = 1;
26885   return css;
26886 }
26887 void test_ixhtml10_dl_tag_with_css_017()
26888 {
26889 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
26890                      "</head><body><dl>あいう</dl></body></html>"
26891 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26892                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26893                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26894                        "<head></head><body><dl style=\"font-size:large;\">あいう</dl></body></html>"
26895   char  *ret;
26896   char  *tmp;
26897   device_table spec;
26898   chxjconvrule_entry entry;
26899   cookie_t cookie;
26900   apr_size_t destlen;
26901   APR_INIT;
26902   chxj_serf_get = test_chxj_serf_get208;
26903   call_check = 0;
26904
26905   COOKIE_INIT(cookie);
26906
26907   SPEC_INIT(spec);
26908   destlen = sizeof(TEST_STRING)-1;
26909   entry.action |= CONVRULE_CSS_ON_BIT;
26910
26911   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26912   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26913   ret = chxj_rencoding(&r, ret, &destlen);
26914   CU_ASSERT(ret != NULL);
26915   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26916   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26917   CU_ASSERT(call_check == 1);
26918
26919   APR_TERM;
26920 #undef TEST_STRING
26921 #undef RESULT_STRING
26922 }
26923 void test_ixhtml10_dl_tag_with_css_018()
26924 {
26925 #define  TEST_STRING "<html><head>" \
26926                      "</head><body><dl style=\"font-size:large\">あいう</dl></body></html>"
26927 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26928                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26929                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26930                        "<head></head><body><dl style=\"font-size:large;\">あいう</dl></body></html>"
26931   char  *ret;
26932   char  *tmp;
26933   device_table spec;
26934   chxjconvrule_entry entry;
26935   cookie_t cookie;
26936   apr_size_t destlen;
26937   APR_INIT;
26938   chxj_serf_get = test_chxj_serf_get208;
26939   call_check = 0;
26940
26941   COOKIE_INIT(cookie);
26942
26943   SPEC_INIT(spec);
26944   destlen = sizeof(TEST_STRING)-1;
26945   entry.action |= CONVRULE_CSS_ON_BIT;
26946
26947   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26948   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26949   ret = chxj_rencoding(&r, ret, &destlen);
26950   CU_ASSERT(ret != NULL);
26951   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
26952   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
26953   CU_ASSERT(call_check == 0);
26954
26955   APR_TERM;
26956 #undef TEST_STRING
26957 #undef RESULT_STRING
26958 }
26959
26960
26961 char *test_chxj_serf_get209(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
26962 {
26963   static char *css = "a:focus { display: none }\n"
26964                      "a:link  { display: none }\n"
26965                      "a       { display: none }\n"
26966                      "hr      { display: none }\n"
26967                      "a:visited { display:none }\n"
26968                      "dl { font-size:x-large }\n";
26969   *len = strlen(css);
26970   call_check = 1;
26971   return css;
26972 }
26973 void test_ixhtml10_dl_tag_with_css_019()
26974 {
26975 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
26976                      "</head><body><dl>あいう</dl></body></html>"
26977 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
26978                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
26979                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
26980                        "<head></head><body><dl style=\"font-size:x-large;\">あいう</dl></body></html>"
26981   char  *ret;
26982   char  *tmp;
26983   device_table spec;
26984   chxjconvrule_entry entry;
26985   cookie_t cookie;
26986   apr_size_t destlen;
26987   APR_INIT;
26988   chxj_serf_get = test_chxj_serf_get209;
26989   call_check = 0;
26990
26991   COOKIE_INIT(cookie);
26992
26993   SPEC_INIT(spec);
26994   destlen = sizeof(TEST_STRING)-1;
26995   entry.action |= CONVRULE_CSS_ON_BIT;
26996
26997   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
26998   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
26999   ret = chxj_rencoding(&r, ret, &destlen);
27000   CU_ASSERT(ret != NULL);
27001   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27002   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27003   CU_ASSERT(call_check == 1);
27004
27005   APR_TERM;
27006 #undef TEST_STRING
27007 #undef RESULT_STRING
27008 }
27009 void test_ixhtml10_dl_tag_with_css_020()
27010 {
27011 #define  TEST_STRING "<html><head>" \
27012                      "</head><body><dl style=\"font-size:x-large\">あいう</dl></body></html>"
27013 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27014                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27015                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27016                        "<head></head><body><dl style=\"font-size:x-large;\">あいう</dl></body></html>"
27017   char  *ret;
27018   char  *tmp;
27019   device_table spec;
27020   chxjconvrule_entry entry;
27021   cookie_t cookie;
27022   apr_size_t destlen;
27023   APR_INIT;
27024   chxj_serf_get = test_chxj_serf_get209;
27025   call_check = 0;
27026
27027   COOKIE_INIT(cookie);
27028
27029   SPEC_INIT(spec);
27030   destlen = sizeof(TEST_STRING)-1;
27031   entry.action |= CONVRULE_CSS_ON_BIT;
27032
27033   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27034   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27035   ret = chxj_rencoding(&r, ret, &destlen);
27036   CU_ASSERT(ret != NULL);
27037   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27038   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27039   CU_ASSERT(call_check == 0);
27040
27041   APR_TERM;
27042 #undef TEST_STRING
27043 #undef RESULT_STRING
27044 }
27045
27046
27047 char *test_chxj_serf_get210(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
27048 {
27049   static char *css = "a:focus { display: none }\n"
27050                      "a:link  { display: none }\n"
27051                      "a       { display: none }\n"
27052                      "hr      { display: none }\n"
27053                      "a:visited { display:none }\n"
27054                      "dl { font-size:xx-large }\n";
27055   *len = strlen(css);
27056   call_check = 1;
27057   return css;
27058 }
27059 void test_ixhtml10_dl_tag_with_css_021()
27060 {
27061 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
27062                      "</head><body><dl>あいう</dl></body></html>"
27063 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27064                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27065                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27066                        "<head></head><body><dl style=\"font-size:xx-large;\">あいう</dl></body></html>"
27067   char  *ret;
27068   char  *tmp;
27069   device_table spec;
27070   chxjconvrule_entry entry;
27071   cookie_t cookie;
27072   apr_size_t destlen;
27073   APR_INIT;
27074   chxj_serf_get = test_chxj_serf_get210;
27075   call_check = 0;
27076
27077   COOKIE_INIT(cookie);
27078
27079   SPEC_INIT(spec);
27080   destlen = sizeof(TEST_STRING)-1;
27081   entry.action |= CONVRULE_CSS_ON_BIT;
27082
27083   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27084   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27085   ret = chxj_rencoding(&r, ret, &destlen);
27086   CU_ASSERT(ret != NULL);
27087   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27088   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27089   CU_ASSERT(call_check == 1);
27090
27091   APR_TERM;
27092 #undef TEST_STRING
27093 #undef RESULT_STRING
27094 }
27095 void test_ixhtml10_dl_tag_with_css_022()
27096 {
27097 #define  TEST_STRING "<html><head>" \
27098                      "</head><body><dl style=\"font-size:xx-large\">あいう</dl></body></html>"
27099 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27100                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27101                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27102                        "<head></head><body><dl style=\"font-size:xx-large;\">あいう</dl></body></html>"
27103   char  *ret;
27104   char  *tmp;
27105   device_table spec;
27106   chxjconvrule_entry entry;
27107   cookie_t cookie;
27108   apr_size_t destlen;
27109   APR_INIT;
27110   chxj_serf_get = test_chxj_serf_get210;
27111   call_check = 0;
27112
27113   COOKIE_INIT(cookie);
27114
27115   SPEC_INIT(spec);
27116   destlen = sizeof(TEST_STRING)-1;
27117   entry.action |= CONVRULE_CSS_ON_BIT;
27118
27119   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27120   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27121   ret = chxj_rencoding(&r, ret, &destlen);
27122   CU_ASSERT(ret != NULL);
27123   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27124   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27125   CU_ASSERT(call_check == 0);
27126
27127   APR_TERM;
27128 #undef TEST_STRING
27129 #undef RESULT_STRING
27130 }
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141 /*===========================================================================*/
27142 /* dd tag with CSS                                                          */
27143 /*===========================================================================*/
27144 char *test_chxj_serf_get220(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
27145 {
27146   static char *css = "a:focus { display: none }\n"
27147                      "a:link  { display: none }\n"
27148                      "a       { display: none }\n"
27149                      "hr      { display: none }\n"
27150                      "a:visited { display:none }\n"
27151                      "dd { color: #ff0000 }\n";
27152
27153   *len = strlen(css);
27154   call_check = 1;
27155   return css;
27156 }
27157 void test_ixhtml10_dd_tag_with_css_001()
27158 {
27159 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
27160                      "</head><body><dd>あいう</dd></body></html>"
27161 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27162                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27163                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27164                        "<head></head><body><dd style=\"color:#ff0000;\">あいう</dd></body></html>"
27165   char  *ret;
27166   char  *tmp;
27167   device_table spec;
27168   chxjconvrule_entry entry;
27169   cookie_t cookie;
27170   apr_size_t destlen;
27171   APR_INIT;
27172   chxj_serf_get = test_chxj_serf_get220;
27173   call_check = 0;
27174
27175   COOKIE_INIT(cookie);
27176
27177   SPEC_INIT(spec);
27178   destlen = sizeof(TEST_STRING)-1;
27179   entry.action |= CONVRULE_CSS_ON_BIT;
27180
27181   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27182   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27183   ret = chxj_rencoding(&r, ret, &destlen);
27184   CU_ASSERT(ret != NULL);
27185   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27186   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27187   CU_ASSERT(call_check == 1);
27188
27189   APR_TERM;
27190 #undef TEST_STRING
27191 #undef RESULT_STRING
27192 }
27193 void test_ixhtml10_dd_tag_with_css_002()
27194 {
27195 #define  TEST_STRING "<html><head>" \
27196                      "</head><body><dd style=\"color:#ff0000\">あいう</dd></body></html>"
27197 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27198                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27199                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27200                        "<head></head><body><dd style=\"color:#ff0000;\">あいう</dd></body></html>"
27201   char  *ret;
27202   char  *tmp;
27203   device_table spec;
27204   chxjconvrule_entry entry;
27205   cookie_t cookie;
27206   apr_size_t destlen;
27207   APR_INIT;
27208   chxj_serf_get = test_chxj_serf_get220;
27209   call_check = 0;
27210
27211   COOKIE_INIT(cookie);
27212
27213   SPEC_INIT(spec);
27214   destlen = sizeof(TEST_STRING)-1;
27215   entry.action |= CONVRULE_CSS_ON_BIT;
27216
27217   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27218   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27219   ret = chxj_rencoding(&r, ret, &destlen);
27220   CU_ASSERT(ret != NULL);
27221   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27222   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27223   CU_ASSERT(call_check == 0);
27224
27225   APR_TERM;
27226 #undef TEST_STRING
27227 #undef RESULT_STRING
27228 }
27229
27230
27231 char *test_chxj_serf_get224(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
27232 {
27233   static char *css = "a:focus { display: none }\n"
27234                      "a:link  { display: none }\n"
27235                      "a       { display: none }\n"
27236                      "hr      { display: none }\n"
27237                      "a:visited { display:none }\n"
27238                      "dd { font-size:xx-small }\n";
27239   *len = strlen(css);
27240   call_check = 1;
27241   return css;
27242 }
27243 void test_ixhtml10_dd_tag_with_css_009()
27244 {
27245 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
27246                      "</head><body><dd>あいう</dd></body></html>"
27247 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27248                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27249                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27250                        "<head></head><body><dd style=\"font-size:xx-small;\">あいう</dd></body></html>"
27251   char  *ret;
27252   char  *tmp;
27253   device_table spec;
27254   chxjconvrule_entry entry;
27255   cookie_t cookie;
27256   apr_size_t destlen;
27257   APR_INIT;
27258   chxj_serf_get = test_chxj_serf_get224;
27259   call_check = 0;
27260
27261   COOKIE_INIT(cookie);
27262
27263   SPEC_INIT(spec);
27264   destlen = sizeof(TEST_STRING)-1;
27265   entry.action |= CONVRULE_CSS_ON_BIT;
27266
27267   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27268   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27269   ret = chxj_rencoding(&r, ret, &destlen);
27270   CU_ASSERT(ret != NULL);
27271   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27272   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27273   CU_ASSERT(call_check == 1);
27274
27275   APR_TERM;
27276 #undef TEST_STRING
27277 #undef RESULT_STRING
27278 }
27279 void test_ixhtml10_dd_tag_with_css_010()
27280 {
27281 #define  TEST_STRING "<html><head>" \
27282                      "</head><body><dd style=\"font-size:xx-small\">あいう</dd></body></html>"
27283 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27284                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27285                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27286                        "<head></head><body><dd style=\"font-size:xx-small;\">あいう</dd></body></html>"
27287   char  *ret;
27288   char  *tmp;
27289   device_table spec;
27290   chxjconvrule_entry entry;
27291   cookie_t cookie;
27292   apr_size_t destlen;
27293   APR_INIT;
27294   chxj_serf_get = test_chxj_serf_get224;
27295   call_check = 0;
27296
27297   COOKIE_INIT(cookie);
27298
27299   SPEC_INIT(spec);
27300   destlen = sizeof(TEST_STRING)-1;
27301   entry.action |= CONVRULE_CSS_ON_BIT;
27302
27303   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27304   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27305   ret = chxj_rencoding(&r, ret, &destlen);
27306   CU_ASSERT(ret != NULL);
27307   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27308   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27309   CU_ASSERT(call_check == 0);
27310
27311   APR_TERM;
27312 #undef TEST_STRING
27313 #undef RESULT_STRING
27314 }
27315
27316
27317
27318 char *test_chxj_serf_get225(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
27319 {
27320   static char *css = "a:focus { display: none }\n"
27321                      "a:link  { display: none }\n"
27322                      "a       { display: none }\n"
27323                      "hr      { display: none }\n"
27324                      "a:visited { display:none }\n"
27325                      "dd { font-size:x-small }\n";
27326   *len = strlen(css);
27327   call_check = 1;
27328   return css;
27329 }
27330 void test_ixhtml10_dd_tag_with_css_011()
27331 {
27332 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
27333                      "</head><body><dd>あいう</dd></body></html>"
27334 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27335                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27336                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27337                        "<head></head><body><dd style=\"font-size:x-small;\">あいう</dd></body></html>"
27338   char  *ret;
27339   char  *tmp;
27340   device_table spec;
27341   chxjconvrule_entry entry;
27342   cookie_t cookie;
27343   apr_size_t destlen;
27344   APR_INIT;
27345   chxj_serf_get = test_chxj_serf_get225;
27346   call_check = 0;
27347
27348   COOKIE_INIT(cookie);
27349
27350   SPEC_INIT(spec);
27351   destlen = sizeof(TEST_STRING)-1;
27352   entry.action |= CONVRULE_CSS_ON_BIT;
27353
27354   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27355   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27356   ret = chxj_rencoding(&r, ret, &destlen);
27357   CU_ASSERT(ret != NULL);
27358   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27359   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27360   CU_ASSERT(call_check == 1);
27361
27362   APR_TERM;
27363 #undef TEST_STRING
27364 #undef RESULT_STRING
27365 }
27366 void test_ixhtml10_dd_tag_with_css_012()
27367 {
27368 #define  TEST_STRING "<html><head>" \
27369                      "</head><body><dd style=\"font-size:x-small\">あいう</dd></body></html>"
27370 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27371                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27372                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27373                        "<head></head><body><dd style=\"font-size:x-small;\">あいう</dd></body></html>"
27374   char  *ret;
27375   char  *tmp;
27376   device_table spec;
27377   chxjconvrule_entry entry;
27378   cookie_t cookie;
27379   apr_size_t destlen;
27380   APR_INIT;
27381   chxj_serf_get = test_chxj_serf_get225;
27382   call_check = 0;
27383
27384   COOKIE_INIT(cookie);
27385
27386   SPEC_INIT(spec);
27387   destlen = sizeof(TEST_STRING)-1;
27388   entry.action |= CONVRULE_CSS_ON_BIT;
27389
27390   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27391   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27392   ret = chxj_rencoding(&r, ret, &destlen);
27393   CU_ASSERT(ret != NULL);
27394   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27395   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27396   CU_ASSERT(call_check == 0);
27397
27398   APR_TERM;
27399 #undef TEST_STRING
27400 #undef RESULT_STRING
27401 }
27402
27403
27404
27405 char *test_chxj_serf_get226(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
27406 {
27407   static char *css = "a:focus { display: none }\n"
27408                      "a:link  { display: none }\n"
27409                      "a       { display: none }\n"
27410                      "hr      { display: none }\n"
27411                      "a:visited { display:none }\n"
27412                      "dd { font-size:small }\n";
27413   *len = strlen(css);
27414   call_check = 1;
27415   return css;
27416 }
27417 void test_ixhtml10_dd_tag_with_css_013()
27418 {
27419 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
27420                      "</head><body><dd>あいう</dd></body></html>"
27421 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27422                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27423                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27424                        "<head></head><body><dd style=\"font-size:small;\">あいう</dd></body></html>"
27425   char  *ret;
27426   char  *tmp;
27427   device_table spec;
27428   chxjconvrule_entry entry;
27429   cookie_t cookie;
27430   apr_size_t destlen;
27431   APR_INIT;
27432   chxj_serf_get = test_chxj_serf_get226;
27433   call_check = 0;
27434
27435   COOKIE_INIT(cookie);
27436
27437   SPEC_INIT(spec);
27438   destlen = sizeof(TEST_STRING)-1;
27439   entry.action |= CONVRULE_CSS_ON_BIT;
27440
27441   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27442   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27443   ret = chxj_rencoding(&r, ret, &destlen);
27444   CU_ASSERT(ret != NULL);
27445   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27446   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27447   CU_ASSERT(call_check == 1);
27448
27449   APR_TERM;
27450 #undef TEST_STRING
27451 #undef RESULT_STRING
27452 }
27453 void test_ixhtml10_dd_tag_with_css_014()
27454 {
27455 #define  TEST_STRING "<html><head>" \
27456                      "</head><body><dd style=\"font-size:small\">あいう</dd></body></html>"
27457 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27458                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27459                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27460                        "<head></head><body><dd style=\"font-size:small;\">あいう</dd></body></html>"
27461   char  *ret;
27462   char  *tmp;
27463   device_table spec;
27464   chxjconvrule_entry entry;
27465   cookie_t cookie;
27466   apr_size_t destlen;
27467   APR_INIT;
27468   chxj_serf_get = test_chxj_serf_get226;
27469   call_check = 0;
27470
27471   COOKIE_INIT(cookie);
27472
27473   SPEC_INIT(spec);
27474   destlen = sizeof(TEST_STRING)-1;
27475   entry.action |= CONVRULE_CSS_ON_BIT;
27476
27477   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27478   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27479   ret = chxj_rencoding(&r, ret, &destlen);
27480   CU_ASSERT(ret != NULL);
27481   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27482   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27483   CU_ASSERT(call_check == 0);
27484
27485   APR_TERM;
27486 #undef TEST_STRING
27487 #undef RESULT_STRING
27488 }
27489 char *test_chxj_serf_get227(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
27490 {
27491   static char *css = "a:focus { display: none }\n"
27492                      "a:link  { display: none }\n"
27493                      "a       { display: none }\n"
27494                      "hr      { display: none }\n"
27495                      "a:visited { display:none }\n"
27496                      "dd { font-size:medium }\n";
27497   *len = strlen(css);
27498   call_check = 1;
27499   return css;
27500 }
27501 void test_ixhtml10_dd_tag_with_css_015()
27502 {
27503 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
27504                      "</head><body><dd>あいう</dd></body></html>"
27505 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27506                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27507                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27508                        "<head></head><body><dd style=\"font-size:medium;\">あいう</dd></body></html>"
27509   char  *ret;
27510   char  *tmp;
27511   device_table spec;
27512   chxjconvrule_entry entry;
27513   cookie_t cookie;
27514   apr_size_t destlen;
27515   APR_INIT;
27516   chxj_serf_get = test_chxj_serf_get227;
27517   call_check = 0;
27518
27519   COOKIE_INIT(cookie);
27520
27521   SPEC_INIT(spec);
27522   destlen = sizeof(TEST_STRING)-1;
27523   entry.action |= CONVRULE_CSS_ON_BIT;
27524
27525   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27526   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27527   ret = chxj_rencoding(&r, ret, &destlen);
27528   CU_ASSERT(ret != NULL);
27529   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27530   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27531   CU_ASSERT(call_check == 1);
27532
27533   APR_TERM;
27534 #undef TEST_STRING
27535 #undef RESULT_STRING
27536 }
27537 void test_ixhtml10_dd_tag_with_css_016()
27538 {
27539 #define  TEST_STRING "<html><head>" \
27540                      "</head><body><dd style=\"font-size:medium\">あいう</dd></body></html>"
27541 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27542                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27543                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27544                        "<head></head><body><dd style=\"font-size:medium;\">あいう</dd></body></html>"
27545   char  *ret;
27546   char  *tmp;
27547   device_table spec;
27548   chxjconvrule_entry entry;
27549   cookie_t cookie;
27550   apr_size_t destlen;
27551   APR_INIT;
27552   chxj_serf_get = test_chxj_serf_get227;
27553   call_check = 0;
27554
27555   COOKIE_INIT(cookie);
27556
27557   SPEC_INIT(spec);
27558   destlen = sizeof(TEST_STRING)-1;
27559   entry.action |= CONVRULE_CSS_ON_BIT;
27560
27561   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27562   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27563   ret = chxj_rencoding(&r, ret, &destlen);
27564   CU_ASSERT(ret != NULL);
27565   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27566   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27567   CU_ASSERT(call_check == 0);
27568
27569   APR_TERM;
27570 #undef TEST_STRING
27571 #undef RESULT_STRING
27572 }
27573 char *test_chxj_serf_get228(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
27574 {
27575   static char *css = "a:focus { display: none }\n"
27576                      "a:link  { display: none }\n"
27577                      "a       { display: none }\n"
27578                      "hr      { display: none }\n"
27579                      "a:visited { display:none }\n"
27580                      "dd { font-size:large }\n";
27581   *len = strlen(css);
27582   call_check = 1;
27583   return css;
27584 }
27585 void test_ixhtml10_dd_tag_with_css_017()
27586 {
27587 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
27588                      "</head><body><dd>あいう</dd></body></html>"
27589 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27590                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27591                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27592                        "<head></head><body><dd style=\"font-size:large;\">あいう</dd></body></html>"
27593   char  *ret;
27594   char  *tmp;
27595   device_table spec;
27596   chxjconvrule_entry entry;
27597   cookie_t cookie;
27598   apr_size_t destlen;
27599   APR_INIT;
27600   chxj_serf_get = test_chxj_serf_get228;
27601   call_check = 0;
27602
27603   COOKIE_INIT(cookie);
27604
27605   SPEC_INIT(spec);
27606   destlen = sizeof(TEST_STRING)-1;
27607   entry.action |= CONVRULE_CSS_ON_BIT;
27608
27609   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27610   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27611   ret = chxj_rencoding(&r, ret, &destlen);
27612   CU_ASSERT(ret != NULL);
27613   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27614   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27615   CU_ASSERT(call_check == 1);
27616
27617   APR_TERM;
27618 #undef TEST_STRING
27619 #undef RESULT_STRING
27620 }
27621 void test_ixhtml10_dd_tag_with_css_018()
27622 {
27623 #define  TEST_STRING "<html><head>" \
27624                      "</head><body><dd style=\"font-size:large\">あいう</dd></body></html>"
27625 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27626                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27627                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27628                        "<head></head><body><dd style=\"font-size:large;\">あいう</dd></body></html>"
27629   char  *ret;
27630   char  *tmp;
27631   device_table spec;
27632   chxjconvrule_entry entry;
27633   cookie_t cookie;
27634   apr_size_t destlen;
27635   APR_INIT;
27636   chxj_serf_get = test_chxj_serf_get228;
27637   call_check = 0;
27638
27639   COOKIE_INIT(cookie);
27640
27641   SPEC_INIT(spec);
27642   destlen = sizeof(TEST_STRING)-1;
27643   entry.action |= CONVRULE_CSS_ON_BIT;
27644
27645   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27646   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27647   ret = chxj_rencoding(&r, ret, &destlen);
27648   CU_ASSERT(ret != NULL);
27649   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27650   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27651   CU_ASSERT(call_check == 0);
27652
27653   APR_TERM;
27654 #undef TEST_STRING
27655 #undef RESULT_STRING
27656 }
27657
27658
27659 char *test_chxj_serf_get229(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
27660 {
27661   static char *css = "a:focus { display: none }\n"
27662                      "a:link  { display: none }\n"
27663                      "a       { display: none }\n"
27664                      "hr      { display: none }\n"
27665                      "a:visited { display:none }\n"
27666                      "dd { font-size:x-large }\n";
27667   *len = strlen(css);
27668   call_check = 1;
27669   return css;
27670 }
27671 void test_ixhtml10_dd_tag_with_css_019()
27672 {
27673 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
27674                      "</head><body><dd>あいう</dd></body></html>"
27675 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27676                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27677                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27678                        "<head></head><body><dd style=\"font-size:x-large;\">あいう</dd></body></html>"
27679   char  *ret;
27680   char  *tmp;
27681   device_table spec;
27682   chxjconvrule_entry entry;
27683   cookie_t cookie;
27684   apr_size_t destlen;
27685   APR_INIT;
27686   chxj_serf_get = test_chxj_serf_get229;
27687   call_check = 0;
27688
27689   COOKIE_INIT(cookie);
27690
27691   SPEC_INIT(spec);
27692   destlen = sizeof(TEST_STRING)-1;
27693   entry.action |= CONVRULE_CSS_ON_BIT;
27694
27695   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27696   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27697   ret = chxj_rencoding(&r, ret, &destlen);
27698   CU_ASSERT(ret != NULL);
27699   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27700   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27701   CU_ASSERT(call_check == 1);
27702
27703   APR_TERM;
27704 #undef TEST_STRING
27705 #undef RESULT_STRING
27706 }
27707 void test_ixhtml10_dd_tag_with_css_020()
27708 {
27709 #define  TEST_STRING "<html><head>" \
27710                      "</head><body><dd style=\"font-size:x-large\">あいう</dd></body></html>"
27711 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27712                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27713                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27714                        "<head></head><body><dd style=\"font-size:x-large;\">あいう</dd></body></html>"
27715   char  *ret;
27716   char  *tmp;
27717   device_table spec;
27718   chxjconvrule_entry entry;
27719   cookie_t cookie;
27720   apr_size_t destlen;
27721   APR_INIT;
27722   chxj_serf_get = test_chxj_serf_get229;
27723   call_check = 0;
27724
27725   COOKIE_INIT(cookie);
27726
27727   SPEC_INIT(spec);
27728   destlen = sizeof(TEST_STRING)-1;
27729   entry.action |= CONVRULE_CSS_ON_BIT;
27730
27731   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27732   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27733   ret = chxj_rencoding(&r, ret, &destlen);
27734   CU_ASSERT(ret != NULL);
27735   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27736   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27737   CU_ASSERT(call_check == 0);
27738
27739   APR_TERM;
27740 #undef TEST_STRING
27741 #undef RESULT_STRING
27742 }
27743
27744
27745 char *test_chxj_serf_get230(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
27746 {
27747   static char *css = "a:focus { display: none }\n"
27748                      "a:link  { display: none }\n"
27749                      "a       { display: none }\n"
27750                      "hr      { display: none }\n"
27751                      "a:visited { display:none }\n"
27752                      "dd { font-size:xx-large }\n";
27753   *len = strlen(css);
27754   call_check = 1;
27755   return css;
27756 }
27757 void test_ixhtml10_dd_tag_with_css_021()
27758 {
27759 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
27760                      "</head><body><dd>あいう</dd></body></html>"
27761 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27762                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27763                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27764                        "<head></head><body><dd style=\"font-size:xx-large;\">あいう</dd></body></html>"
27765   char  *ret;
27766   char  *tmp;
27767   device_table spec;
27768   chxjconvrule_entry entry;
27769   cookie_t cookie;
27770   apr_size_t destlen;
27771   APR_INIT;
27772   chxj_serf_get = test_chxj_serf_get230;
27773   call_check = 0;
27774
27775   COOKIE_INIT(cookie);
27776
27777   SPEC_INIT(spec);
27778   destlen = sizeof(TEST_STRING)-1;
27779   entry.action |= CONVRULE_CSS_ON_BIT;
27780
27781   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27782   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27783   ret = chxj_rencoding(&r, ret, &destlen);
27784   CU_ASSERT(ret != NULL);
27785   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27786   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27787   CU_ASSERT(call_check == 1);
27788
27789   APR_TERM;
27790 #undef TEST_STRING
27791 #undef RESULT_STRING
27792 }
27793 void test_ixhtml10_dd_tag_with_css_022()
27794 {
27795 #define  TEST_STRING "<html><head>" \
27796                      "</head><body><dd style=\"font-size:xx-large\">あいう</dd></body></html>"
27797 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27798                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27799                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27800                        "<head></head><body><dd style=\"font-size:xx-large;\">あいう</dd></body></html>"
27801   char  *ret;
27802   char  *tmp;
27803   device_table spec;
27804   chxjconvrule_entry entry;
27805   cookie_t cookie;
27806   apr_size_t destlen;
27807   APR_INIT;
27808   chxj_serf_get = test_chxj_serf_get230;
27809   call_check = 0;
27810
27811   COOKIE_INIT(cookie);
27812
27813   SPEC_INIT(spec);
27814   destlen = sizeof(TEST_STRING)-1;
27815   entry.action |= CONVRULE_CSS_ON_BIT;
27816
27817   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27818   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27819   ret = chxj_rencoding(&r, ret, &destlen);
27820   CU_ASSERT(ret != NULL);
27821   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27822   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27823   CU_ASSERT(call_check == 0);
27824
27825   APR_TERM;
27826 #undef TEST_STRING
27827 #undef RESULT_STRING
27828 }
27829
27830
27831
27832
27833
27834
27835
27836
27837
27838 /*===========================================================================*/
27839 /* menu tag with CSS                                                          */
27840 /*===========================================================================*/
27841 char *test_chxj_serf_get_css_menu001(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
27842 {
27843   static char *css = "a:focus { display: none }\n"
27844                      "a:link  { display: none }\n"
27845                      "a       { display: none }\n"
27846                      "hr      { display: none }\n"
27847                      "a:visited { display:none }\n"
27848                      "menu { color: #ff0000 }\n";
27849
27850   *len = strlen(css);
27851   call_check = 1;
27852   return css;
27853 }
27854 void test_ixhtml10_menu_tag_with_css_001()
27855 {
27856 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
27857                      "</head><body><menu>あいう</menu></body></html>"
27858 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27859                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27860                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27861                        "<head></head><body><ul style=\"color:#ff0000;\">あいう</ul></body></html>"
27862   char  *ret;
27863   char  *tmp;
27864   device_table spec;
27865   chxjconvrule_entry entry;
27866   cookie_t cookie;
27867   apr_size_t destlen;
27868   APR_INIT;
27869   chxj_serf_get = test_chxj_serf_get_css_menu001;
27870   call_check = 0;
27871
27872   COOKIE_INIT(cookie);
27873
27874   SPEC_INIT(spec);
27875   destlen = sizeof(TEST_STRING)-1;
27876   entry.action |= CONVRULE_CSS_ON_BIT;
27877
27878   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27879   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27880   ret = chxj_rencoding(&r, ret, &destlen);
27881   CU_ASSERT(ret != NULL);
27882   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27883   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27884   CU_ASSERT(call_check == 1);
27885
27886   APR_TERM;
27887 #undef TEST_STRING
27888 #undef RESULT_STRING
27889 }
27890 void test_ixhtml10_menu_tag_with_css_002()
27891 {
27892 #define  TEST_STRING "<html><head>" \
27893                      "</head><body><menu style=\"color:#ff0000\">あいう</menu></body></html>"
27894 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27895                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27896                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27897                        "<head></head><body><ul style=\"color:#ff0000;\">あいう</ul></body></html>"
27898   char  *ret;
27899   char  *tmp;
27900   device_table spec;
27901   chxjconvrule_entry entry;
27902   cookie_t cookie;
27903   apr_size_t destlen;
27904   APR_INIT;
27905   chxj_serf_get = test_chxj_serf_get_css_menu001;
27906   call_check = 0;
27907
27908   COOKIE_INIT(cookie);
27909
27910   SPEC_INIT(spec);
27911   destlen = sizeof(TEST_STRING)-1;
27912   entry.action |= CONVRULE_CSS_ON_BIT;
27913
27914   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27915   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27916   ret = chxj_rencoding(&r, ret, &destlen);
27917   CU_ASSERT(ret != NULL);
27918   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27919   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27920   CU_ASSERT(call_check == 0);
27921
27922   APR_TERM;
27923 #undef TEST_STRING
27924 #undef RESULT_STRING
27925 }
27926
27927
27928
27929 char *test_chxj_serf_get_css_menu004(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
27930 {
27931   static char *css = "a:focus { display: none }\n"
27932                      "a:link  { display: none }\n"
27933                      "a       { display: none }\n"
27934                      "hr      { display: none }\n"
27935                      "a:visited { display:none }\n"
27936                      "menu { list-style-type:square }\n";
27937 /*
27938 list-style-type      =>  square | square | square => type="square|square|square"に変換
27939 */
27940
27941   *len = strlen(css);
27942   call_check = 1;
27943   return css;
27944 }
27945 void test_ixhtml10_menu_tag_with_css_007()
27946 {
27947 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
27948                      "</head><body><menu>あいう</menu></body></html>"
27949 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27950                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27951                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27952                        "<head></head><body><ul style=\"list-style-type:square;\">あいう</ul></body></html>"
27953   char  *ret;
27954   char  *tmp;
27955   device_table spec;
27956   chxjconvrule_entry entry;
27957   cookie_t cookie;
27958   apr_size_t destlen;
27959   APR_INIT;
27960   chxj_serf_get = test_chxj_serf_get_css_menu004;
27961   call_check = 0;
27962
27963   COOKIE_INIT(cookie);
27964
27965   SPEC_INIT(spec);
27966   destlen = sizeof(TEST_STRING)-1;
27967   entry.action |= CONVRULE_CSS_ON_BIT;
27968
27969   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
27970   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
27971   ret = chxj_rencoding(&r, ret, &destlen);
27972   CU_ASSERT(ret != NULL);
27973   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
27974   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
27975   CU_ASSERT(call_check == 1);
27976
27977   APR_TERM;
27978 #undef TEST_STRING
27979 #undef RESULT_STRING
27980 }
27981 void test_ixhtml10_menu_tag_with_css_008()
27982 {
27983 #define  TEST_STRING "<html><head>" \
27984                      "</head><body><menu style=\"list-style-type:square\">あいう</menu></body></html>"
27985 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
27986                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
27987                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
27988                        "<head></head><body><ul style=\"list-style-type:square;\">あいう</ul></body></html>"
27989   char  *ret;
27990   char  *tmp;
27991   device_table spec;
27992   chxjconvrule_entry entry;
27993   cookie_t cookie;
27994   apr_size_t destlen;
27995   APR_INIT;
27996   chxj_serf_get = test_chxj_serf_get_css_menu004;
27997   call_check = 0;
27998
27999   COOKIE_INIT(cookie);
28000
28001   SPEC_INIT(spec);
28002   destlen = sizeof(TEST_STRING)-1;
28003   entry.action |= CONVRULE_CSS_ON_BIT;
28004
28005   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28006   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28007   ret = chxj_rencoding(&r, ret, &destlen);
28008   CU_ASSERT(ret != NULL);
28009   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28010   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28011   CU_ASSERT(call_check == 0);
28012
28013   APR_TERM;
28014 #undef TEST_STRING
28015 #undef RESULT_STRING
28016 }
28017
28018
28019
28020 char *test_chxj_serf_get_css_menu005(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
28021 {
28022   static char *css = "a:focus { display: none }\n"
28023                      "a:link  { display: none }\n"
28024                      "a       { display: none }\n"
28025                      "hr      { display: none }\n"
28026                      "a:visited { display:none }\n"
28027                      "menu { font-size:xx-small }\n";
28028   *len = strlen(css);
28029   call_check = 1;
28030   return css;
28031 }
28032 void test_ixhtml10_menu_tag_with_css_009()
28033 {
28034 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
28035                      "</head><body><menu>あいう</menu></body></html>"
28036 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28037                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28038                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28039                        "<head></head><body><ul style=\"font-size:xx-small;\">あいう</ul></body></html>"
28040   char  *ret;
28041   char  *tmp;
28042   device_table spec;
28043   chxjconvrule_entry entry;
28044   cookie_t cookie;
28045   apr_size_t destlen;
28046   APR_INIT;
28047   chxj_serf_get = test_chxj_serf_get_css_menu005;
28048   call_check = 0;
28049
28050   COOKIE_INIT(cookie);
28051
28052   SPEC_INIT(spec);
28053   destlen = sizeof(TEST_STRING)-1;
28054   entry.action |= CONVRULE_CSS_ON_BIT;
28055
28056   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28057   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28058   ret = chxj_rencoding(&r, ret, &destlen);
28059   CU_ASSERT(ret != NULL);
28060   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28061   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28062   CU_ASSERT(call_check == 1);
28063
28064   APR_TERM;
28065 #undef TEST_STRING
28066 #undef RESULT_STRING
28067 }
28068 void test_ixhtml10_menu_tag_with_css_010()
28069 {
28070 #define  TEST_STRING "<html><head>" \
28071                      "</head><body><menu style=\"font-size:xx-small\">あいう</menu></body></html>"
28072 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28073                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28074                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28075                        "<head></head><body><ul style=\"font-size:xx-small;\">あいう</ul></body></html>"
28076   char  *ret;
28077   char  *tmp;
28078   device_table spec;
28079   chxjconvrule_entry entry;
28080   cookie_t cookie;
28081   apr_size_t destlen;
28082   APR_INIT;
28083   chxj_serf_get = test_chxj_serf_get_css_menu005;
28084   call_check = 0;
28085
28086   COOKIE_INIT(cookie);
28087
28088   SPEC_INIT(spec);
28089   destlen = sizeof(TEST_STRING)-1;
28090   entry.action |= CONVRULE_CSS_ON_BIT;
28091
28092   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28093   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28094   ret = chxj_rencoding(&r, ret, &destlen);
28095   CU_ASSERT(ret != NULL);
28096   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28097   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28098   CU_ASSERT(call_check == 0);
28099
28100   APR_TERM;
28101 #undef TEST_STRING
28102 #undef RESULT_STRING
28103 }
28104
28105
28106
28107 char *test_chxj_serf_get_css_menu006(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
28108 {
28109   static char *css = "a:focus { display: none }\n"
28110                      "a:link  { display: none }\n"
28111                      "a       { display: none }\n"
28112                      "hr      { display: none }\n"
28113                      "a:visited { display:none }\n"
28114                      "menu { font-size:x-small }\n";
28115   *len = strlen(css);
28116   call_check = 1;
28117   return css;
28118 }
28119 void test_ixhtml10_menu_tag_with_css_011()
28120 {
28121 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
28122                      "</head><body><menu>あいう</menu></body></html>"
28123 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28124                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28125                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28126                        "<head></head><body><ul style=\"font-size:x-small;\">あいう</ul></body></html>"
28127   char  *ret;
28128   char  *tmp;
28129   device_table spec;
28130   chxjconvrule_entry entry;
28131   cookie_t cookie;
28132   apr_size_t destlen;
28133   APR_INIT;
28134   chxj_serf_get = test_chxj_serf_get_css_menu006;
28135   call_check = 0;
28136
28137   COOKIE_INIT(cookie);
28138
28139   SPEC_INIT(spec);
28140   destlen = sizeof(TEST_STRING)-1;
28141   entry.action |= CONVRULE_CSS_ON_BIT;
28142
28143   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28144   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28145   ret = chxj_rencoding(&r, ret, &destlen);
28146   CU_ASSERT(ret != NULL);
28147   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28148   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28149   CU_ASSERT(call_check == 1);
28150
28151   APR_TERM;
28152 #undef TEST_STRING
28153 #undef RESULT_STRING
28154 }
28155 void test_ixhtml10_menu_tag_with_css_012()
28156 {
28157 #define  TEST_STRING "<html><head>" \
28158                      "</head><body><menu style=\"font-size:x-small\">あいう</menu></body></html>"
28159 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28160                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28161                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28162                        "<head></head><body><ul style=\"font-size:x-small;\">あいう</ul></body></html>"
28163   char  *ret;
28164   char  *tmp;
28165   device_table spec;
28166   chxjconvrule_entry entry;
28167   cookie_t cookie;
28168   apr_size_t destlen;
28169   APR_INIT;
28170   chxj_serf_get = test_chxj_serf_get_css_menu006;
28171   call_check = 0;
28172
28173   COOKIE_INIT(cookie);
28174
28175   SPEC_INIT(spec);
28176   destlen = sizeof(TEST_STRING)-1;
28177   entry.action |= CONVRULE_CSS_ON_BIT;
28178
28179   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28180   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28181   ret = chxj_rencoding(&r, ret, &destlen);
28182   CU_ASSERT(ret != NULL);
28183   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28184   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28185   CU_ASSERT(call_check == 0);
28186
28187   APR_TERM;
28188 #undef TEST_STRING
28189 #undef RESULT_STRING
28190 }
28191
28192
28193
28194 char *test_chxj_serf_get_css_menu007(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
28195 {
28196   static char *css = "a:focus { display: none }\n"
28197                      "a:link  { display: none }\n"
28198                      "a       { display: none }\n"
28199                      "hr      { display: none }\n"
28200                      "a:visited { display:none }\n"
28201                      "menu { font-size:small }\n";
28202   *len = strlen(css);
28203   call_check = 1;
28204   return css;
28205 }
28206 void test_ixhtml10_menu_tag_with_css_013()
28207 {
28208 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
28209                      "</head><body><menu>あいう</menu></body></html>"
28210 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28211                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28212                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28213                        "<head></head><body><ul style=\"font-size:small;\">あいう</ul></body></html>"
28214   char  *ret;
28215   char  *tmp;
28216   device_table spec;
28217   chxjconvrule_entry entry;
28218   cookie_t cookie;
28219   apr_size_t destlen;
28220   APR_INIT;
28221   chxj_serf_get = test_chxj_serf_get_css_menu007;
28222   call_check = 0;
28223
28224   COOKIE_INIT(cookie);
28225
28226   SPEC_INIT(spec);
28227   destlen = sizeof(TEST_STRING)-1;
28228   entry.action |= CONVRULE_CSS_ON_BIT;
28229
28230   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28231   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28232   ret = chxj_rencoding(&r, ret, &destlen);
28233   CU_ASSERT(ret != NULL);
28234   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28235   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28236   CU_ASSERT(call_check == 1);
28237
28238   APR_TERM;
28239 #undef TEST_STRING
28240 #undef RESULT_STRING
28241 }
28242 void test_ixhtml10_menu_tag_with_css_014()
28243 {
28244 #define  TEST_STRING "<html><head>" \
28245                      "</head><body><menu style=\"font-size:small\">あいう</menu></body></html>"
28246 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28247                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28248                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28249                        "<head></head><body><ul style=\"font-size:small;\">あいう</ul></body></html>"
28250   char  *ret;
28251   char  *tmp;
28252   device_table spec;
28253   chxjconvrule_entry entry;
28254   cookie_t cookie;
28255   apr_size_t destlen;
28256   APR_INIT;
28257   chxj_serf_get = test_chxj_serf_get_css_menu007;
28258   call_check = 0;
28259
28260   COOKIE_INIT(cookie);
28261
28262   SPEC_INIT(spec);
28263   destlen = sizeof(TEST_STRING)-1;
28264   entry.action |= CONVRULE_CSS_ON_BIT;
28265
28266   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28267   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28268   ret = chxj_rencoding(&r, ret, &destlen);
28269   CU_ASSERT(ret != NULL);
28270   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28271   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28272   CU_ASSERT(call_check == 0);
28273
28274   APR_TERM;
28275 #undef TEST_STRING
28276 #undef RESULT_STRING
28277 }
28278 char *test_chxj_serf_get_css_menu008(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
28279 {
28280   static char *css = "a:focus { display: none }\n"
28281                      "a:link  { display: none }\n"
28282                      "a       { display: none }\n"
28283                      "hr      { display: none }\n"
28284                      "a:visited { display:none }\n"
28285                      "menu { font-size:medium }\n";
28286   *len = strlen(css);
28287   call_check = 1;
28288   return css;
28289 }
28290 void test_ixhtml10_menu_tag_with_css_015()
28291 {
28292 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
28293                      "</head><body><menu>あいう</menu></body></html>"
28294 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28295                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28296                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28297                        "<head></head><body><ul style=\"font-size:medium;\">あいう</ul></body></html>"
28298   char  *ret;
28299   char  *tmp;
28300   device_table spec;
28301   chxjconvrule_entry entry;
28302   cookie_t cookie;
28303   apr_size_t destlen;
28304   APR_INIT;
28305   chxj_serf_get = test_chxj_serf_get_css_menu008;
28306   call_check = 0;
28307
28308   COOKIE_INIT(cookie);
28309
28310   SPEC_INIT(spec);
28311   destlen = sizeof(TEST_STRING)-1;
28312   entry.action |= CONVRULE_CSS_ON_BIT;
28313
28314   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28315   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28316   ret = chxj_rencoding(&r, ret, &destlen);
28317   CU_ASSERT(ret != NULL);
28318   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28319   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28320   CU_ASSERT(call_check == 1);
28321
28322   APR_TERM;
28323 #undef TEST_STRING
28324 #undef RESULT_STRING
28325 }
28326 void test_ixhtml10_menu_tag_with_css_016()
28327 {
28328 #define  TEST_STRING "<html><head>" \
28329                      "</head><body><menu style=\"font-size:medium\">あいう</menu></body></html>"
28330 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28331                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28332                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28333                        "<head></head><body><ul style=\"font-size:medium;\">あいう</ul></body></html>"
28334   char  *ret;
28335   char  *tmp;
28336   device_table spec;
28337   chxjconvrule_entry entry;
28338   cookie_t cookie;
28339   apr_size_t destlen;
28340   APR_INIT;
28341   chxj_serf_get = test_chxj_serf_get_css_menu008;
28342   call_check = 0;
28343
28344   COOKIE_INIT(cookie);
28345
28346   SPEC_INIT(spec);
28347   destlen = sizeof(TEST_STRING)-1;
28348   entry.action |= CONVRULE_CSS_ON_BIT;
28349
28350   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28351   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28352   ret = chxj_rencoding(&r, ret, &destlen);
28353   CU_ASSERT(ret != NULL);
28354   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28355   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28356   CU_ASSERT(call_check == 0);
28357
28358   APR_TERM;
28359 #undef TEST_STRING
28360 #undef RESULT_STRING
28361 }
28362 char *test_chxj_serf_get_css_menu009(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
28363 {
28364   static char *css = "a:focus { display: none }\n"
28365                      "a:link  { display: none }\n"
28366                      "a       { display: none }\n"
28367                      "hr      { display: none }\n"
28368                      "a:visited { display:none }\n"
28369                      "menu { font-size:large }\n";
28370   *len = strlen(css);
28371   call_check = 1;
28372   return css;
28373 }
28374 void test_ixhtml10_menu_tag_with_css_017()
28375 {
28376 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
28377                      "</head><body><menu>あいう</menu></body></html>"
28378 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28379                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28380                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28381                        "<head></head><body><ul style=\"font-size:large;\">あいう</ul></body></html>"
28382   char  *ret;
28383   char  *tmp;
28384   device_table spec;
28385   chxjconvrule_entry entry;
28386   cookie_t cookie;
28387   apr_size_t destlen;
28388   APR_INIT;
28389   chxj_serf_get = test_chxj_serf_get_css_menu009;
28390   call_check = 0;
28391
28392   COOKIE_INIT(cookie);
28393
28394   SPEC_INIT(spec);
28395   destlen = sizeof(TEST_STRING)-1;
28396   entry.action |= CONVRULE_CSS_ON_BIT;
28397
28398   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28399   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28400   ret = chxj_rencoding(&r, ret, &destlen);
28401   CU_ASSERT(ret != NULL);
28402   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28403   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28404   CU_ASSERT(call_check == 1);
28405
28406   APR_TERM;
28407 #undef TEST_STRING
28408 #undef RESULT_STRING
28409 }
28410 void test_ixhtml10_menu_tag_with_css_018()
28411 {
28412 #define  TEST_STRING "<html><head>" \
28413                      "</head><body><menu style=\"font-size:large\">あいう</menu></body></html>"
28414 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28415                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28416                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28417                        "<head></head><body><ul style=\"font-size:large;\">あいう</ul></body></html>"
28418   char  *ret;
28419   char  *tmp;
28420   device_table spec;
28421   chxjconvrule_entry entry;
28422   cookie_t cookie;
28423   apr_size_t destlen;
28424   APR_INIT;
28425   chxj_serf_get = test_chxj_serf_get_css_menu009;
28426   call_check = 0;
28427
28428   COOKIE_INIT(cookie);
28429
28430   SPEC_INIT(spec);
28431   destlen = sizeof(TEST_STRING)-1;
28432   entry.action |= CONVRULE_CSS_ON_BIT;
28433
28434   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28435   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28436   ret = chxj_rencoding(&r, ret, &destlen);
28437   CU_ASSERT(ret != NULL);
28438   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28439   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28440   CU_ASSERT(call_check == 0);
28441
28442   APR_TERM;
28443 #undef TEST_STRING
28444 #undef RESULT_STRING
28445 }
28446
28447
28448 char *test_chxj_serf_get_css_menu010(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
28449 {
28450   static char *css = "a:focus { display: none }\n"
28451                      "a:link  { display: none }\n"
28452                      "a       { display: none }\n"
28453                      "hr      { display: none }\n"
28454                      "a:visited { display:none }\n"
28455                      "menu { font-size:x-large }\n";
28456   *len = strlen(css);
28457   call_check = 1;
28458   return css;
28459 }
28460 void test_ixhtml10_menu_tag_with_css_019()
28461 {
28462 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
28463                      "</head><body><menu>あいう</menu></body></html>"
28464 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28465                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28466                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28467                        "<head></head><body><ul style=\"font-size:x-large;\">あいう</ul></body></html>"
28468   char  *ret;
28469   char  *tmp;
28470   device_table spec;
28471   chxjconvrule_entry entry;
28472   cookie_t cookie;
28473   apr_size_t destlen;
28474   APR_INIT;
28475   chxj_serf_get = test_chxj_serf_get_css_menu010;
28476   call_check = 0;
28477
28478   COOKIE_INIT(cookie);
28479
28480   SPEC_INIT(spec);
28481   destlen = sizeof(TEST_STRING)-1;
28482   entry.action |= CONVRULE_CSS_ON_BIT;
28483
28484   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28485   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28486   ret = chxj_rencoding(&r, ret, &destlen);
28487   CU_ASSERT(ret != NULL);
28488   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28489   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28490   CU_ASSERT(call_check == 1);
28491
28492   APR_TERM;
28493 #undef TEST_STRING
28494 #undef RESULT_STRING
28495 }
28496 void test_ixhtml10_menu_tag_with_css_020()
28497 {
28498 #define  TEST_STRING "<html><head>" \
28499                      "</head><body><menu style=\"font-size:x-large\">あいう</menu></body></html>"
28500 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28501                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28502                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28503                        "<head></head><body><ul style=\"font-size:x-large;\">あいう</ul></body></html>"
28504   char  *ret;
28505   char  *tmp;
28506   device_table spec;
28507   chxjconvrule_entry entry;
28508   cookie_t cookie;
28509   apr_size_t destlen;
28510   APR_INIT;
28511   chxj_serf_get = test_chxj_serf_get_css_menu010;
28512   call_check = 0;
28513
28514   COOKIE_INIT(cookie);
28515
28516   SPEC_INIT(spec);
28517   destlen = sizeof(TEST_STRING)-1;
28518   entry.action |= CONVRULE_CSS_ON_BIT;
28519
28520   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28521   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28522   ret = chxj_rencoding(&r, ret, &destlen);
28523   CU_ASSERT(ret != NULL);
28524   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28525   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28526   CU_ASSERT(call_check == 0);
28527
28528   APR_TERM;
28529 #undef TEST_STRING
28530 #undef RESULT_STRING
28531 }
28532
28533
28534 char *test_chxj_serf_get_css_menu011(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
28535 {
28536   static char *css = "a:focus { display: none }\n"
28537                      "a:link  { display: none }\n"
28538                      "a       { display: none }\n"
28539                      "hr      { display: none }\n"
28540                      "a:visited { display:none }\n"
28541                      "menu { font-size:xx-large }\n";
28542   *len = strlen(css);
28543   call_check = 1;
28544   return css;
28545 }
28546 void test_ixhtml10_menu_tag_with_css_021()
28547 {
28548 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
28549                      "</head><body><menu>あいう</menu></body></html>"
28550 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28551                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28552                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28553                        "<head></head><body><ul style=\"font-size:xx-large;\">あいう</ul></body></html>"
28554   char  *ret;
28555   char  *tmp;
28556   device_table spec;
28557   chxjconvrule_entry entry;
28558   cookie_t cookie;
28559   apr_size_t destlen;
28560   APR_INIT;
28561   chxj_serf_get = test_chxj_serf_get_css_menu011;
28562   call_check = 0;
28563
28564   COOKIE_INIT(cookie);
28565
28566   SPEC_INIT(spec);
28567   destlen = sizeof(TEST_STRING)-1;
28568   entry.action |= CONVRULE_CSS_ON_BIT;
28569
28570   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28571   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28572   ret = chxj_rencoding(&r, ret, &destlen);
28573   CU_ASSERT(ret != NULL);
28574   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28575   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28576   CU_ASSERT(call_check == 1);
28577
28578   APR_TERM;
28579 #undef TEST_STRING
28580 #undef RESULT_STRING
28581 }
28582 void test_ixhtml10_menu_tag_with_css_022()
28583 {
28584 #define  TEST_STRING "<html><head>" \
28585                      "</head><body><menu style=\"font-size:xx-large\">あいう</menu></body></html>"
28586 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28587                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28588                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28589                         "<head></head><body><ul style=\"font-size:xx-large;\">あいう</ul></body></html>"
28590   char  *ret;
28591   char  *tmp;
28592   device_table spec;
28593   chxjconvrule_entry entry;
28594   cookie_t cookie;
28595   apr_size_t destlen;
28596   APR_INIT;
28597   chxj_serf_get = test_chxj_serf_get_css_menu011;
28598   call_check = 0;
28599
28600   COOKIE_INIT(cookie);
28601
28602   SPEC_INIT(spec);
28603   destlen = sizeof(TEST_STRING)-1;
28604   entry.action |= CONVRULE_CSS_ON_BIT;
28605
28606   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28607   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28608   ret = chxj_rencoding(&r, ret, &destlen);
28609   CU_ASSERT(ret != NULL);
28610   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28611   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28612   CU_ASSERT(call_check == 0);
28613
28614   APR_TERM;
28615 #undef TEST_STRING
28616 #undef RESULT_STRING
28617 }
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630
28631 /*===========================================================================*/
28632 /* blink tag with CSS                                                          */
28633 /*===========================================================================*/
28634 char *test_chxj_serf_get_blink220(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
28635 {
28636   static char *css = "a:focus { display: none }\n"
28637                      "a:link  { display: none }\n"
28638                      "a       { display: none }\n"
28639                      "hr      { display: none }\n"
28640                      "a:visited { display:none }\n"
28641                      "blink { color: #ff0000 }\n";
28642
28643   *len = strlen(css);
28644   call_check = 1;
28645   return css;
28646 }
28647 void test_ixhtml10_blink_tag_with_css_001()
28648 {
28649 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
28650                      "</head><body><blink>あいう</blink></body></html>"
28651 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28652                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28653                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28654                        "<head></head><body><span style=\"text-decoration:blink;color:#ff0000;\">あいう</span></body></html>"
28655   char  *ret;
28656   char  *tmp;
28657   device_table spec;
28658   chxjconvrule_entry entry;
28659   cookie_t cookie;
28660   apr_size_t destlen;
28661   APR_INIT;
28662   chxj_serf_get = test_chxj_serf_get_blink220;
28663   call_check = 0;
28664
28665   COOKIE_INIT(cookie);
28666
28667   SPEC_INIT(spec);
28668   destlen = sizeof(TEST_STRING)-1;
28669   entry.action |= CONVRULE_CSS_ON_BIT;
28670
28671   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28672   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28673   ret = chxj_rencoding(&r, ret, &destlen);
28674   CU_ASSERT(ret != NULL);
28675   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28676   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28677   CU_ASSERT(call_check == 1);
28678
28679   APR_TERM;
28680 #undef TEST_STRING
28681 #undef RESULT_STRING
28682 }
28683 void test_ixhtml10_blink_tag_with_css_002()
28684 {
28685 #define  TEST_STRING "<html><head>" \
28686                      "</head><body><blink style=\"color:#ff0000\">あいう</blink></body></html>"
28687 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28688                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28689                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28690                        "<head></head><body><span style=\"text-decoration:blink;color:#ff0000;\">あいう</span></body></html>"
28691   char  *ret;
28692   char  *tmp;
28693   device_table spec;
28694   chxjconvrule_entry entry;
28695   cookie_t cookie;
28696   apr_size_t destlen;
28697   APR_INIT;
28698   chxj_serf_get = test_chxj_serf_get_blink220;
28699   call_check = 0;
28700
28701   COOKIE_INIT(cookie);
28702
28703   SPEC_INIT(spec);
28704   destlen = sizeof(TEST_STRING)-1;
28705   entry.action |= CONVRULE_CSS_ON_BIT;
28706
28707   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28708   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28709   ret = chxj_rencoding(&r, ret, &destlen);
28710   CU_ASSERT(ret != NULL);
28711   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28712   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28713   CU_ASSERT(call_check == 0);
28714
28715   APR_TERM;
28716 #undef TEST_STRING
28717 #undef RESULT_STRING
28718 }
28719
28720
28721 char *test_chxj_serf_get_blink224(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
28722 {
28723   static char *css = "a:focus { display: none }\n"
28724                      "a:link  { display: none }\n"
28725                      "a       { display: none }\n"
28726                      "hr      { display: none }\n"
28727                      "a:visited { display:none }\n"
28728                      "blink { font-size:xx-small }\n";
28729   *len = strlen(css);
28730   call_check = 1;
28731   return css;
28732 }
28733 void test_ixhtml10_blink_tag_with_css_009()
28734 {
28735 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
28736                      "</head><body><blink>あいう</blink></body></html>"
28737 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28738                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28739                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28740                        "<head></head><body><span style=\"text-decoration:blink;font-size:xx-small;\">あいう</span></body></html>"
28741   char  *ret;
28742   char  *tmp;
28743   device_table spec;
28744   chxjconvrule_entry entry;
28745   cookie_t cookie;
28746   apr_size_t destlen;
28747   APR_INIT;
28748   chxj_serf_get = test_chxj_serf_get_blink224;
28749   call_check = 0;
28750
28751   COOKIE_INIT(cookie);
28752
28753   SPEC_INIT(spec);
28754   destlen = sizeof(TEST_STRING)-1;
28755   entry.action |= CONVRULE_CSS_ON_BIT;
28756
28757   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28758   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28759   ret = chxj_rencoding(&r, ret, &destlen);
28760   CU_ASSERT(ret != NULL);
28761   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28762   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28763   CU_ASSERT(call_check == 1);
28764
28765   APR_TERM;
28766 #undef TEST_STRING
28767 #undef RESULT_STRING
28768 }
28769 void test_ixhtml10_blink_tag_with_css_010()
28770 {
28771 #define  TEST_STRING "<html><head>" \
28772                      "</head><body><blink style=\"font-size:xx-small\">あいう</blink></body></html>"
28773 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28774                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28775                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28776                        "<head></head><body><span style=\"text-decoration:blink;font-size:xx-small;\">あいう</span></body></html>"
28777   char  *ret;
28778   char  *tmp;
28779   device_table spec;
28780   chxjconvrule_entry entry;
28781   cookie_t cookie;
28782   apr_size_t destlen;
28783   APR_INIT;
28784   chxj_serf_get = test_chxj_serf_get_blink224;
28785   call_check = 0;
28786
28787   COOKIE_INIT(cookie);
28788
28789   SPEC_INIT(spec);
28790   destlen = sizeof(TEST_STRING)-1;
28791   entry.action |= CONVRULE_CSS_ON_BIT;
28792
28793   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28794   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28795   ret = chxj_rencoding(&r, ret, &destlen);
28796   CU_ASSERT(ret != NULL);
28797   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28798   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28799   CU_ASSERT(call_check == 0);
28800
28801   APR_TERM;
28802 #undef TEST_STRING
28803 #undef RESULT_STRING
28804 }
28805
28806
28807
28808 char *test_chxj_serf_get_blink225(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
28809 {
28810   static char *css = "a:focus { display: none }\n"
28811                      "a:link  { display: none }\n"
28812                      "a       { display: none }\n"
28813                      "hr      { display: none }\n"
28814                      "a:visited { display:none }\n"
28815                      "blink { font-size:x-small }\n";
28816   *len = strlen(css);
28817   call_check = 1;
28818   return css;
28819 }
28820 void test_ixhtml10_blink_tag_with_css_011()
28821 {
28822 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
28823                      "</head><body><blink>あいう</blink></body></html>"
28824 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28825                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28826                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28827                        "<head></head><body><span style=\"text-decoration:blink;font-size:x-small;\">あいう</span></body></html>"
28828   char  *ret;
28829   char  *tmp;
28830   device_table spec;
28831   chxjconvrule_entry entry;
28832   cookie_t cookie;
28833   apr_size_t destlen;
28834   APR_INIT;
28835   chxj_serf_get = test_chxj_serf_get_blink225;
28836   call_check = 0;
28837
28838   COOKIE_INIT(cookie);
28839
28840   SPEC_INIT(spec);
28841   destlen = sizeof(TEST_STRING)-1;
28842   entry.action |= CONVRULE_CSS_ON_BIT;
28843
28844   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28845   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28846   ret = chxj_rencoding(&r, ret, &destlen);
28847   CU_ASSERT(ret != NULL);
28848   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28849   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28850   CU_ASSERT(call_check == 1);
28851
28852   APR_TERM;
28853 #undef TEST_STRING
28854 #undef RESULT_STRING
28855 }
28856 void test_ixhtml10_blink_tag_with_css_012()
28857 {
28858 #define  TEST_STRING "<html><head>" \
28859                      "</head><body><blink style=\"font-size:x-small\">あいう</blink></body></html>"
28860 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28861                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28862                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28863                        "<head></head><body><span style=\"text-decoration:blink;font-size:x-small;\">あいう</span></body></html>"
28864   char  *ret;
28865   char  *tmp;
28866   device_table spec;
28867   chxjconvrule_entry entry;
28868   cookie_t cookie;
28869   apr_size_t destlen;
28870   APR_INIT;
28871   chxj_serf_get = test_chxj_serf_get_blink225;
28872   call_check = 0;
28873
28874   COOKIE_INIT(cookie);
28875
28876   SPEC_INIT(spec);
28877   destlen = sizeof(TEST_STRING)-1;
28878   entry.action |= CONVRULE_CSS_ON_BIT;
28879
28880   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28881   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28882   ret = chxj_rencoding(&r, ret, &destlen);
28883   CU_ASSERT(ret != NULL);
28884   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28885   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28886   CU_ASSERT(call_check == 0);
28887
28888   APR_TERM;
28889 #undef TEST_STRING
28890 #undef RESULT_STRING
28891 }
28892
28893
28894
28895 char *test_chxj_serf_get_blink226(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
28896 {
28897   static char *css = "a:focus { display: none }\n"
28898                      "a:link  { display: none }\n"
28899                      "a       { display: none }\n"
28900                      "hr      { display: none }\n"
28901                      "a:visited { display:none }\n"
28902                      "blink { font-size:small }\n";
28903   *len = strlen(css);
28904   call_check = 1;
28905   return css;
28906 }
28907 void test_ixhtml10_blink_tag_with_css_013()
28908 {
28909 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
28910                      "</head><body><blink>あいう</blink></body></html>"
28911 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28912                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28913                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28914                        "<head></head><body><span style=\"text-decoration:blink;font-size:small;\">あいう</span></body></html>"
28915   char  *ret;
28916   char  *tmp;
28917   device_table spec;
28918   chxjconvrule_entry entry;
28919   cookie_t cookie;
28920   apr_size_t destlen;
28921   APR_INIT;
28922   chxj_serf_get = test_chxj_serf_get_blink226;
28923   call_check = 0;
28924
28925   COOKIE_INIT(cookie);
28926
28927   SPEC_INIT(spec);
28928   destlen = sizeof(TEST_STRING)-1;
28929   entry.action |= CONVRULE_CSS_ON_BIT;
28930
28931   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28932   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28933   ret = chxj_rencoding(&r, ret, &destlen);
28934   CU_ASSERT(ret != NULL);
28935   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28936   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28937   CU_ASSERT(call_check == 1);
28938
28939   APR_TERM;
28940 #undef TEST_STRING
28941 #undef RESULT_STRING
28942 }
28943 void test_ixhtml10_blink_tag_with_css_014()
28944 {
28945 #define  TEST_STRING "<html><head>" \
28946                      "</head><body><blink style=\"font-size:small\">あいう</blink></body></html>"
28947 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28948                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28949                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28950                        "<head></head><body><span style=\"text-decoration:blink;font-size:small;\">あいう</span></body></html>"
28951   char  *ret;
28952   char  *tmp;
28953   device_table spec;
28954   chxjconvrule_entry entry;
28955   cookie_t cookie;
28956   apr_size_t destlen;
28957   APR_INIT;
28958   chxj_serf_get = test_chxj_serf_get_blink226;
28959   call_check = 0;
28960
28961   COOKIE_INIT(cookie);
28962
28963   SPEC_INIT(spec);
28964   destlen = sizeof(TEST_STRING)-1;
28965   entry.action |= CONVRULE_CSS_ON_BIT;
28966
28967   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
28968   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
28969   ret = chxj_rencoding(&r, ret, &destlen);
28970   CU_ASSERT(ret != NULL);
28971   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
28972   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
28973   CU_ASSERT(call_check == 0);
28974
28975   APR_TERM;
28976 #undef TEST_STRING
28977 #undef RESULT_STRING
28978 }
28979 char *test_chxj_serf_get_blink227(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
28980 {
28981   static char *css = "a:focus { display: none }\n"
28982                      "a:link  { display: none }\n"
28983                      "a       { display: none }\n"
28984                      "hr      { display: none }\n"
28985                      "a:visited { display:none }\n"
28986                      "blink { font-size:medium }\n";
28987   *len = strlen(css);
28988   call_check = 1;
28989   return css;
28990 }
28991 void test_ixhtml10_blink_tag_with_css_015()
28992 {
28993 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
28994                      "</head><body><blink>あいう</blink></body></html>"
28995 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
28996                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
28997                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
28998                        "<head></head><body><span style=\"text-decoration:blink;font-size:medium;\">あいう</span></body></html>"
28999   char  *ret;
29000   char  *tmp;
29001   device_table spec;
29002   chxjconvrule_entry entry;
29003   cookie_t cookie;
29004   apr_size_t destlen;
29005   APR_INIT;
29006   chxj_serf_get = test_chxj_serf_get_blink227;
29007   call_check = 0;
29008
29009   COOKIE_INIT(cookie);
29010
29011   SPEC_INIT(spec);
29012   destlen = sizeof(TEST_STRING)-1;
29013   entry.action |= CONVRULE_CSS_ON_BIT;
29014
29015   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29016   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29017   ret = chxj_rencoding(&r, ret, &destlen);
29018   CU_ASSERT(ret != NULL);
29019   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29020   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29021   CU_ASSERT(call_check == 1);
29022
29023   APR_TERM;
29024 #undef TEST_STRING
29025 #undef RESULT_STRING
29026 }
29027 void test_ixhtml10_blink_tag_with_css_016()
29028 {
29029 #define  TEST_STRING "<html><head>" \
29030                      "</head><body><blink style=\"font-size:medium\">あいう</blink></body></html>"
29031 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29032                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29033                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29034                        "<head></head><body><span style=\"text-decoration:blink;font-size:medium;\">あいう</span></body></html>"
29035   char  *ret;
29036   char  *tmp;
29037   device_table spec;
29038   chxjconvrule_entry entry;
29039   cookie_t cookie;
29040   apr_size_t destlen;
29041   APR_INIT;
29042   chxj_serf_get = test_chxj_serf_get_blink227;
29043   call_check = 0;
29044
29045   COOKIE_INIT(cookie);
29046
29047   SPEC_INIT(spec);
29048   destlen = sizeof(TEST_STRING)-1;
29049   entry.action |= CONVRULE_CSS_ON_BIT;
29050
29051   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29052   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29053   ret = chxj_rencoding(&r, ret, &destlen);
29054   CU_ASSERT(ret != NULL);
29055   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29056   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29057   CU_ASSERT(call_check == 0);
29058
29059   APR_TERM;
29060 #undef TEST_STRING
29061 #undef RESULT_STRING
29062 }
29063 char *test_chxj_serf_get_blink228(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
29064 {
29065   static char *css = "a:focus { display: none }\n"
29066                      "a:link  { display: none }\n"
29067                      "a       { display: none }\n"
29068                      "hr      { display: none }\n"
29069                      "a:visited { display:none }\n"
29070                      "blink { font-size:large }\n";
29071   *len = strlen(css);
29072   call_check = 1;
29073   return css;
29074 }
29075 void test_ixhtml10_blink_tag_with_css_017()
29076 {
29077 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
29078                      "</head><body><blink>あいう</blink></body></html>"
29079 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29080                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29081                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29082                        "<head></head><body><span style=\"text-decoration:blink;font-size:large;\">あいう</span></body></html>"
29083   char  *ret;
29084   char  *tmp;
29085   device_table spec;
29086   chxjconvrule_entry entry;
29087   cookie_t cookie;
29088   apr_size_t destlen;
29089   APR_INIT;
29090   chxj_serf_get = test_chxj_serf_get_blink228;
29091   call_check = 0;
29092
29093   COOKIE_INIT(cookie);
29094
29095   SPEC_INIT(spec);
29096   destlen = sizeof(TEST_STRING)-1;
29097   entry.action |= CONVRULE_CSS_ON_BIT;
29098
29099   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29100   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29101   ret = chxj_rencoding(&r, ret, &destlen);
29102   CU_ASSERT(ret != NULL);
29103   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29104   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29105   CU_ASSERT(call_check == 1);
29106
29107   APR_TERM;
29108 #undef TEST_STRING
29109 #undef RESULT_STRING
29110 }
29111 void test_ixhtml10_blink_tag_with_css_018()
29112 {
29113 #define  TEST_STRING "<html><head>" \
29114                      "</head><body><blink style=\"font-size:large\">あいう</blink></body></html>"
29115 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29116                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29117                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29118                        "<head></head><body><span style=\"text-decoration:blink;font-size:large;\">あいう</span></body></html>"
29119   char  *ret;
29120   char  *tmp;
29121   device_table spec;
29122   chxjconvrule_entry entry;
29123   cookie_t cookie;
29124   apr_size_t destlen;
29125   APR_INIT;
29126   chxj_serf_get = test_chxj_serf_get_blink228;
29127   call_check = 0;
29128
29129   COOKIE_INIT(cookie);
29130
29131   SPEC_INIT(spec);
29132   destlen = sizeof(TEST_STRING)-1;
29133   entry.action |= CONVRULE_CSS_ON_BIT;
29134
29135   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29136   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29137   ret = chxj_rencoding(&r, ret, &destlen);
29138   CU_ASSERT(ret != NULL);
29139   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29140   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29141   CU_ASSERT(call_check == 0);
29142
29143   APR_TERM;
29144 #undef TEST_STRING
29145 #undef RESULT_STRING
29146 }
29147
29148
29149 char *test_chxj_serf_get_blink229(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
29150 {
29151   static char *css = "a:focus { display: none }\n"
29152                      "a:link  { display: none }\n"
29153                      "a       { display: none }\n"
29154                      "hr      { display: none }\n"
29155                      "a:visited { display:none }\n"
29156                      "blink { font-size:x-large }\n";
29157   *len = strlen(css);
29158   call_check = 1;
29159   return css;
29160 }
29161 void test_ixhtml10_blink_tag_with_css_019()
29162 {
29163 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
29164                      "</head><body><blink>あいう</blink></body></html>"
29165 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29166                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29167                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29168                        "<head></head><body><span style=\"text-decoration:blink;font-size:x-large;\">あいう</span></body></html>"
29169   char  *ret;
29170   char  *tmp;
29171   device_table spec;
29172   chxjconvrule_entry entry;
29173   cookie_t cookie;
29174   apr_size_t destlen;
29175   APR_INIT;
29176   chxj_serf_get = test_chxj_serf_get_blink229;
29177   call_check = 0;
29178
29179   COOKIE_INIT(cookie);
29180
29181   SPEC_INIT(spec);
29182   destlen = sizeof(TEST_STRING)-1;
29183   entry.action |= CONVRULE_CSS_ON_BIT;
29184
29185   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29186   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29187   ret = chxj_rencoding(&r, ret, &destlen);
29188   CU_ASSERT(ret != NULL);
29189   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29190   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29191   CU_ASSERT(call_check == 1);
29192
29193   APR_TERM;
29194 #undef TEST_STRING
29195 #undef RESULT_STRING
29196 }
29197 void test_ixhtml10_blink_tag_with_css_020()
29198 {
29199 #define  TEST_STRING "<html><head>" \
29200                      "</head><body><blink style=\"font-size:x-large\">あいう</blink></body></html>"
29201 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29202                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29203                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29204                        "<head></head><body><span style=\"text-decoration:blink;font-size:x-large;\">あいう</span></body></html>"
29205   char  *ret;
29206   char  *tmp;
29207   device_table spec;
29208   chxjconvrule_entry entry;
29209   cookie_t cookie;
29210   apr_size_t destlen;
29211   APR_INIT;
29212   chxj_serf_get = test_chxj_serf_get_blink229;
29213   call_check = 0;
29214
29215   COOKIE_INIT(cookie);
29216
29217   SPEC_INIT(spec);
29218   destlen = sizeof(TEST_STRING)-1;
29219   entry.action |= CONVRULE_CSS_ON_BIT;
29220
29221   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29222   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29223   ret = chxj_rencoding(&r, ret, &destlen);
29224   CU_ASSERT(ret != NULL);
29225   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29226   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29227   CU_ASSERT(call_check == 0);
29228
29229   APR_TERM;
29230 #undef TEST_STRING
29231 #undef RESULT_STRING
29232 }
29233
29234
29235 char *test_chxj_serf_get_blink230(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
29236 {
29237   static char *css = "a:focus { display: none }\n"
29238                      "a:link  { display: none }\n"
29239                      "a       { display: none }\n"
29240                      "hr      { display: none }\n"
29241                      "a:visited { display:none }\n"
29242                      "blink { font-size:xx-large }\n";
29243   *len = strlen(css);
29244   call_check = 1;
29245   return css;
29246 }
29247 void test_ixhtml10_blink_tag_with_css_021()
29248 {
29249 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
29250                      "</head><body><blink>あいう</blink></body></html>"
29251 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29252                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29253                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29254                        "<head></head><body><span style=\"text-decoration:blink;font-size:xx-large;\">あいう</span></body></html>"
29255   char  *ret;
29256   char  *tmp;
29257   device_table spec;
29258   chxjconvrule_entry entry;
29259   cookie_t cookie;
29260   apr_size_t destlen;
29261   APR_INIT;
29262   chxj_serf_get = test_chxj_serf_get_blink230;
29263   call_check = 0;
29264
29265   COOKIE_INIT(cookie);
29266
29267   SPEC_INIT(spec);
29268   destlen = sizeof(TEST_STRING)-1;
29269   entry.action |= CONVRULE_CSS_ON_BIT;
29270
29271   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29272   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29273   ret = chxj_rencoding(&r, ret, &destlen);
29274   CU_ASSERT(ret != NULL);
29275   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29276   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29277   CU_ASSERT(call_check == 1);
29278
29279   APR_TERM;
29280 #undef TEST_STRING
29281 #undef RESULT_STRING
29282 }
29283 void test_ixhtml10_blink_tag_with_css_022()
29284 {
29285 #define  TEST_STRING "<html><head>" \
29286                      "</head><body><blink style=\"font-size:xx-large\">あいう</blink></body></html>"
29287 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29288                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29289                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29290                        "<head></head><body><span style=\"text-decoration:blink;font-size:xx-large;\">あいう</span></body></html>"
29291   char  *ret;
29292   char  *tmp;
29293   device_table spec;
29294   chxjconvrule_entry entry;
29295   cookie_t cookie;
29296   apr_size_t destlen;
29297   APR_INIT;
29298   chxj_serf_get = test_chxj_serf_get_blink230;
29299   call_check = 0;
29300
29301   COOKIE_INIT(cookie);
29302
29303   SPEC_INIT(spec);
29304   destlen = sizeof(TEST_STRING)-1;
29305   entry.action |= CONVRULE_CSS_ON_BIT;
29306
29307   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29308   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29309   ret = chxj_rencoding(&r, ret, &destlen);
29310   CU_ASSERT(ret != NULL);
29311   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29312   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29313   CU_ASSERT(call_check == 0);
29314
29315   APR_TERM;
29316 #undef TEST_STRING
29317 #undef RESULT_STRING
29318 }
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328 /*===========================================================================*/
29329 /* marquee tag with CSS                                                          */
29330 /*===========================================================================*/
29331 char *test_chxj_serf_get_marquee220(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
29332 {
29333   static char *css = "a:focus { display: none }\n"
29334                      "a:link  { display: none }\n"
29335                      "a       { display: none }\n"
29336                      "hr      { display: none }\n"
29337                      "a:visited { display:none }\n"
29338                      "marquee { color: #ff0000 }\n";
29339
29340   *len = strlen(css);
29341   call_check = 1;
29342   return css;
29343 }
29344 void test_ixhtml10_marquee_tag_with_css_001()
29345 {
29346 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
29347                      "</head><body><marquee>あいう</marquee></body></html>"
29348 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29349                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29350                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29351                        "<head></head><body><span style=\"display:-wap-marquee;color:#ff0000;\">あいう</span></body></html>"
29352   char  *ret;
29353   char  *tmp;
29354   device_table spec;
29355   chxjconvrule_entry entry;
29356   cookie_t cookie;
29357   apr_size_t destlen;
29358   APR_INIT;
29359   chxj_serf_get = test_chxj_serf_get_marquee220;
29360   call_check = 0;
29361
29362   COOKIE_INIT(cookie);
29363
29364   SPEC_INIT(spec);
29365   destlen = sizeof(TEST_STRING)-1;
29366   entry.action |= CONVRULE_CSS_ON_BIT;
29367
29368   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29369   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29370   ret = chxj_rencoding(&r, ret, &destlen);
29371   CU_ASSERT(ret != NULL);
29372   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29373   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29374   CU_ASSERT(call_check == 1);
29375
29376   APR_TERM;
29377 #undef TEST_STRING
29378 #undef RESULT_STRING
29379 }
29380 void test_ixhtml10_marquee_tag_with_css_002()
29381 {
29382 #define  TEST_STRING "<html><head>" \
29383                      "</head><body><marquee style=\"color:#ff0000\">あいう</marquee></body></html>"
29384 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29385                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29386                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29387                        "<head></head><body><span style=\"display:-wap-marquee;color:#ff0000;\">あいう</span></body></html>"
29388   char  *ret;
29389   char  *tmp;
29390   device_table spec;
29391   chxjconvrule_entry entry;
29392   cookie_t cookie;
29393   apr_size_t destlen;
29394   APR_INIT;
29395   chxj_serf_get = test_chxj_serf_get_marquee220;
29396   call_check = 0;
29397
29398   COOKIE_INIT(cookie);
29399
29400   SPEC_INIT(spec);
29401   destlen = sizeof(TEST_STRING)-1;
29402   entry.action |= CONVRULE_CSS_ON_BIT;
29403
29404   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29405   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29406   ret = chxj_rencoding(&r, ret, &destlen);
29407   CU_ASSERT(ret != NULL);
29408   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29409   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29410   CU_ASSERT(call_check == 0);
29411
29412   APR_TERM;
29413 #undef TEST_STRING
29414 #undef RESULT_STRING
29415 }
29416
29417
29418 char *test_chxj_serf_get_marquee224(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
29419 {
29420   static char *css = "a:focus { display: none }\n"
29421                      "a:link  { display: none }\n"
29422                      "a       { display: none }\n"
29423                      "hr      { display: none }\n"
29424                      "a:visited { display:none }\n"
29425                      "marquee { font-size:xx-small }\n";
29426   *len = strlen(css);
29427   call_check = 1;
29428   return css;
29429 }
29430 void test_ixhtml10_marquee_tag_with_css_009()
29431 {
29432 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
29433                      "</head><body><marquee>あいう</marquee></body></html>"
29434 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29435                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29436                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29437                        "<head></head><body><span style=\"display:-wap-marquee;font-size:xx-small;\">あいう</span></body></html>"
29438   char  *ret;
29439   char  *tmp;
29440   device_table spec;
29441   chxjconvrule_entry entry;
29442   cookie_t cookie;
29443   apr_size_t destlen;
29444   APR_INIT;
29445   chxj_serf_get = test_chxj_serf_get_marquee224;
29446   call_check = 0;
29447
29448   COOKIE_INIT(cookie);
29449
29450   SPEC_INIT(spec);
29451   destlen = sizeof(TEST_STRING)-1;
29452   entry.action |= CONVRULE_CSS_ON_BIT;
29453
29454   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29455   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29456   ret = chxj_rencoding(&r, ret, &destlen);
29457   CU_ASSERT(ret != NULL);
29458   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29459   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29460   CU_ASSERT(call_check == 1);
29461
29462   APR_TERM;
29463 #undef TEST_STRING
29464 #undef RESULT_STRING
29465 }
29466 void test_ixhtml10_marquee_tag_with_css_010()
29467 {
29468 #define  TEST_STRING "<html><head>" \
29469                      "</head><body><marquee style=\"font-size:xx-small\">あいう</marquee></body></html>"
29470 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29471                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29472                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29473                        "<head></head><body><span style=\"display:-wap-marquee;font-size:xx-small;\">あいう</span></body></html>"
29474   char  *ret;
29475   char  *tmp;
29476   device_table spec;
29477   chxjconvrule_entry entry;
29478   cookie_t cookie;
29479   apr_size_t destlen;
29480   APR_INIT;
29481   chxj_serf_get = test_chxj_serf_get_marquee224;
29482   call_check = 0;
29483
29484   COOKIE_INIT(cookie);
29485
29486   SPEC_INIT(spec);
29487   destlen = sizeof(TEST_STRING)-1;
29488   entry.action |= CONVRULE_CSS_ON_BIT;
29489
29490   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29491   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29492   ret = chxj_rencoding(&r, ret, &destlen);
29493   CU_ASSERT(ret != NULL);
29494   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29495   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29496   CU_ASSERT(call_check == 0);
29497
29498   APR_TERM;
29499 #undef TEST_STRING
29500 #undef RESULT_STRING
29501 }
29502
29503
29504
29505 char *test_chxj_serf_get_marquee225(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
29506 {
29507   static char *css = "a:focus { display: none }\n"
29508                      "a:link  { display: none }\n"
29509                      "a       { display: none }\n"
29510                      "hr      { display: none }\n"
29511                      "a:visited { display:none }\n"
29512                      "marquee { font-size:x-small }\n";
29513   *len = strlen(css);
29514   call_check = 1;
29515   return css;
29516 }
29517 void test_ixhtml10_marquee_tag_with_css_011()
29518 {
29519 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
29520                      "</head><body><marquee>あいう</marquee></body></html>"
29521 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29522                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29523                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29524                        "<head></head><body><span style=\"display:-wap-marquee;font-size:x-small;\">あいう</span></body></html>"
29525   char  *ret;
29526   char  *tmp;
29527   device_table spec;
29528   chxjconvrule_entry entry;
29529   cookie_t cookie;
29530   apr_size_t destlen;
29531   APR_INIT;
29532   chxj_serf_get = test_chxj_serf_get_marquee225;
29533   call_check = 0;
29534
29535   COOKIE_INIT(cookie);
29536
29537   SPEC_INIT(spec);
29538   destlen = sizeof(TEST_STRING)-1;
29539   entry.action |= CONVRULE_CSS_ON_BIT;
29540
29541   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29542   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29543   ret = chxj_rencoding(&r, ret, &destlen);
29544   CU_ASSERT(ret != NULL);
29545   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29546   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29547   CU_ASSERT(call_check == 1);
29548
29549   APR_TERM;
29550 #undef TEST_STRING
29551 #undef RESULT_STRING
29552 }
29553 void test_ixhtml10_marquee_tag_with_css_012()
29554 {
29555 #define  TEST_STRING "<html><head>" \
29556                      "</head><body><marquee style=\"font-size:x-small\">あいう</marquee></body></html>"
29557 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29558                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29559                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29560                        "<head></head><body><span style=\"display:-wap-marquee;font-size:x-small;\">あいう</span></body></html>"
29561   char  *ret;
29562   char  *tmp;
29563   device_table spec;
29564   chxjconvrule_entry entry;
29565   cookie_t cookie;
29566   apr_size_t destlen;
29567   APR_INIT;
29568   chxj_serf_get = test_chxj_serf_get_marquee225;
29569   call_check = 0;
29570
29571   COOKIE_INIT(cookie);
29572
29573   SPEC_INIT(spec);
29574   destlen = sizeof(TEST_STRING)-1;
29575   entry.action |= CONVRULE_CSS_ON_BIT;
29576
29577   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29578   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29579   ret = chxj_rencoding(&r, ret, &destlen);
29580   CU_ASSERT(ret != NULL);
29581   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29582   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29583   CU_ASSERT(call_check == 0);
29584
29585   APR_TERM;
29586 #undef TEST_STRING
29587 #undef RESULT_STRING
29588 }
29589
29590
29591
29592 char *test_chxj_serf_get_marquee226(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
29593 {
29594   static char *css = "a:focus { display: none }\n"
29595                      "a:link  { display: none }\n"
29596                      "a       { display: none }\n"
29597                      "hr      { display: none }\n"
29598                      "a:visited { display:none }\n"
29599                      "marquee { font-size:small }\n";
29600   *len = strlen(css);
29601   call_check = 1;
29602   return css;
29603 }
29604 void test_ixhtml10_marquee_tag_with_css_013()
29605 {
29606 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
29607                      "</head><body><marquee>あいう</marquee></body></html>"
29608 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29609                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29610                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29611                        "<head></head><body><span style=\"display:-wap-marquee;font-size:small;\">あいう</span></body></html>"
29612   char  *ret;
29613   char  *tmp;
29614   device_table spec;
29615   chxjconvrule_entry entry;
29616   cookie_t cookie;
29617   apr_size_t destlen;
29618   APR_INIT;
29619   chxj_serf_get = test_chxj_serf_get_marquee226;
29620   call_check = 0;
29621
29622   COOKIE_INIT(cookie);
29623
29624   SPEC_INIT(spec);
29625   destlen = sizeof(TEST_STRING)-1;
29626   entry.action |= CONVRULE_CSS_ON_BIT;
29627
29628   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29629   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29630   ret = chxj_rencoding(&r, ret, &destlen);
29631   CU_ASSERT(ret != NULL);
29632   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29633   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29634   CU_ASSERT(call_check == 1);
29635
29636   APR_TERM;
29637 #undef TEST_STRING
29638 #undef RESULT_STRING
29639 }
29640 void test_ixhtml10_marquee_tag_with_css_014()
29641 {
29642 #define  TEST_STRING "<html><head>" \
29643                      "</head><body><marquee style=\"font-size:small\">あいう</marquee></body></html>"
29644 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29645                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29646                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29647                        "<head></head><body><span style=\"display:-wap-marquee;font-size:small;\">あいう</span></body></html>"
29648   char  *ret;
29649   char  *tmp;
29650   device_table spec;
29651   chxjconvrule_entry entry;
29652   cookie_t cookie;
29653   apr_size_t destlen;
29654   APR_INIT;
29655   chxj_serf_get = test_chxj_serf_get_marquee226;
29656   call_check = 0;
29657
29658   COOKIE_INIT(cookie);
29659
29660   SPEC_INIT(spec);
29661   destlen = sizeof(TEST_STRING)-1;
29662   entry.action |= CONVRULE_CSS_ON_BIT;
29663
29664   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29665   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29666   ret = chxj_rencoding(&r, ret, &destlen);
29667   CU_ASSERT(ret != NULL);
29668   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29669   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29670   CU_ASSERT(call_check == 0);
29671
29672   APR_TERM;
29673 #undef TEST_STRING
29674 #undef RESULT_STRING
29675 }
29676 char *test_chxj_serf_get_marquee227(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
29677 {
29678   static char *css = "a:focus { display: none }\n"
29679                      "a:link  { display: none }\n"
29680                      "a       { display: none }\n"
29681                      "hr      { display: none }\n"
29682                      "a:visited { display:none }\n"
29683                      "marquee { font-size:medium }\n";
29684   *len = strlen(css);
29685   call_check = 1;
29686   return css;
29687 }
29688 void test_ixhtml10_marquee_tag_with_css_015()
29689 {
29690 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
29691                      "</head><body><marquee>あいう</marquee></body></html>"
29692 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29693                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29694                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29695                        "<head></head><body><span style=\"display:-wap-marquee;font-size:medium;\">あいう</span></body></html>"
29696   char  *ret;
29697   char  *tmp;
29698   device_table spec;
29699   chxjconvrule_entry entry;
29700   cookie_t cookie;
29701   apr_size_t destlen;
29702   APR_INIT;
29703   chxj_serf_get = test_chxj_serf_get_marquee227;
29704   call_check = 0;
29705
29706   COOKIE_INIT(cookie);
29707
29708   SPEC_INIT(spec);
29709   destlen = sizeof(TEST_STRING)-1;
29710   entry.action |= CONVRULE_CSS_ON_BIT;
29711
29712   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29713   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29714   ret = chxj_rencoding(&r, ret, &destlen);
29715   CU_ASSERT(ret != NULL);
29716   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29717   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29718   CU_ASSERT(call_check == 1);
29719
29720   APR_TERM;
29721 #undef TEST_STRING
29722 #undef RESULT_STRING
29723 }
29724 void test_ixhtml10_marquee_tag_with_css_016()
29725 {
29726 #define  TEST_STRING "<html><head>" \
29727                      "</head><body><marquee style=\"font-size:medium\">あいう</marquee></body></html>"
29728 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29729                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29730                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29731                        "<head></head><body><span style=\"display:-wap-marquee;font-size:medium;\">あいう</span></body></html>"
29732   char  *ret;
29733   char  *tmp;
29734   device_table spec;
29735   chxjconvrule_entry entry;
29736   cookie_t cookie;
29737   apr_size_t destlen;
29738   APR_INIT;
29739   chxj_serf_get = test_chxj_serf_get_marquee227;
29740   call_check = 0;
29741
29742   COOKIE_INIT(cookie);
29743
29744   SPEC_INIT(spec);
29745   destlen = sizeof(TEST_STRING)-1;
29746   entry.action |= CONVRULE_CSS_ON_BIT;
29747
29748   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29749   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29750   ret = chxj_rencoding(&r, ret, &destlen);
29751   CU_ASSERT(ret != NULL);
29752   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29753   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29754   CU_ASSERT(call_check == 0);
29755
29756   APR_TERM;
29757 #undef TEST_STRING
29758 #undef RESULT_STRING
29759 }
29760 char *test_chxj_serf_get_marquee228(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
29761 {
29762   static char *css = "a:focus { display: none }\n"
29763                      "a:link  { display: none }\n"
29764                      "a       { display: none }\n"
29765                      "hr      { display: none }\n"
29766                      "a:visited { display:none }\n"
29767                      "marquee { font-size:large }\n";
29768   *len = strlen(css);
29769   call_check = 1;
29770   return css;
29771 }
29772 void test_ixhtml10_marquee_tag_with_css_017()
29773 {
29774 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
29775                      "</head><body><marquee>あいう</marquee></body></html>"
29776 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29777                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29778                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29779                        "<head></head><body><span style=\"display:-wap-marquee;font-size:large;\">あいう</span></body></html>"
29780   char  *ret;
29781   char  *tmp;
29782   device_table spec;
29783   chxjconvrule_entry entry;
29784   cookie_t cookie;
29785   apr_size_t destlen;
29786   APR_INIT;
29787   chxj_serf_get = test_chxj_serf_get_marquee228;
29788   call_check = 0;
29789
29790   COOKIE_INIT(cookie);
29791
29792   SPEC_INIT(spec);
29793   destlen = sizeof(TEST_STRING)-1;
29794   entry.action |= CONVRULE_CSS_ON_BIT;
29795
29796   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29797   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29798   ret = chxj_rencoding(&r, ret, &destlen);
29799   CU_ASSERT(ret != NULL);
29800   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29801   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29802   CU_ASSERT(call_check == 1);
29803
29804   APR_TERM;
29805 #undef TEST_STRING
29806 #undef RESULT_STRING
29807 }
29808 void test_ixhtml10_marquee_tag_with_css_018()
29809 {
29810 #define  TEST_STRING "<html><head>" \
29811                      "</head><body><marquee style=\"font-size:large\">あいう</marquee></body></html>"
29812 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29813                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29814                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29815                        "<head></head><body><span style=\"display:-wap-marquee;font-size:large;\">あいう</span></body></html>"
29816   char  *ret;
29817   char  *tmp;
29818   device_table spec;
29819   chxjconvrule_entry entry;
29820   cookie_t cookie;
29821   apr_size_t destlen;
29822   APR_INIT;
29823   chxj_serf_get = test_chxj_serf_get_marquee228;
29824   call_check = 0;
29825
29826   COOKIE_INIT(cookie);
29827
29828   SPEC_INIT(spec);
29829   destlen = sizeof(TEST_STRING)-1;
29830   entry.action |= CONVRULE_CSS_ON_BIT;
29831
29832   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29833   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29834   ret = chxj_rencoding(&r, ret, &destlen);
29835   CU_ASSERT(ret != NULL);
29836   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29837   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29838   CU_ASSERT(call_check == 0);
29839
29840   APR_TERM;
29841 #undef TEST_STRING
29842 #undef RESULT_STRING
29843 }
29844
29845
29846 char *test_chxj_serf_get_marquee229(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
29847 {
29848   static char *css = "a:focus { display: none }\n"
29849                      "a:link  { display: none }\n"
29850                      "a       { display: none }\n"
29851                      "hr      { display: none }\n"
29852                      "a:visited { display:none }\n"
29853                      "marquee { font-size:x-large }\n";
29854   *len = strlen(css);
29855   call_check = 1;
29856   return css;
29857 }
29858 void test_ixhtml10_marquee_tag_with_css_019()
29859 {
29860 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
29861                      "</head><body><marquee>あいう</marquee></body></html>"
29862 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29863                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29864                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29865                        "<head></head><body><span style=\"display:-wap-marquee;font-size:x-large;\">あいう</span></body></html>"
29866   char  *ret;
29867   char  *tmp;
29868   device_table spec;
29869   chxjconvrule_entry entry;
29870   cookie_t cookie;
29871   apr_size_t destlen;
29872   APR_INIT;
29873   chxj_serf_get = test_chxj_serf_get_marquee229;
29874   call_check = 0;
29875
29876   COOKIE_INIT(cookie);
29877
29878   SPEC_INIT(spec);
29879   destlen = sizeof(TEST_STRING)-1;
29880   entry.action |= CONVRULE_CSS_ON_BIT;
29881
29882   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29883   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29884   ret = chxj_rencoding(&r, ret, &destlen);
29885   CU_ASSERT(ret != NULL);
29886   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29887   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29888   CU_ASSERT(call_check == 1);
29889
29890   APR_TERM;
29891 #undef TEST_STRING
29892 #undef RESULT_STRING
29893 }
29894 void test_ixhtml10_marquee_tag_with_css_020()
29895 {
29896 #define  TEST_STRING "<html><head>" \
29897                      "</head><body><marquee style=\"font-size:x-large\">あいう</marquee></body></html>"
29898 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29899                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29900                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29901                        "<head></head><body><span style=\"display:-wap-marquee;font-size:x-large;\">あいう</span></body></html>"
29902   char  *ret;
29903   char  *tmp;
29904   device_table spec;
29905   chxjconvrule_entry entry;
29906   cookie_t cookie;
29907   apr_size_t destlen;
29908   APR_INIT;
29909   chxj_serf_get = test_chxj_serf_get_marquee229;
29910   call_check = 0;
29911
29912   COOKIE_INIT(cookie);
29913
29914   SPEC_INIT(spec);
29915   destlen = sizeof(TEST_STRING)-1;
29916   entry.action |= CONVRULE_CSS_ON_BIT;
29917
29918   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29919   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29920   ret = chxj_rencoding(&r, ret, &destlen);
29921   CU_ASSERT(ret != NULL);
29922   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29923   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29924   CU_ASSERT(call_check == 0);
29925
29926   APR_TERM;
29927 #undef TEST_STRING
29928 #undef RESULT_STRING
29929 }
29930
29931
29932 char *test_chxj_serf_get_marquee230(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
29933 {
29934   static char *css = "a:focus { display: none }\n"
29935                      "a:link  { display: none }\n"
29936                      "a       { display: none }\n"
29937                      "hr      { display: none }\n"
29938                      "a:visited { display:none }\n"
29939                      "marquee { font-size:xx-large }\n";
29940   *len = strlen(css);
29941   call_check = 1;
29942   return css;
29943 }
29944 void test_ixhtml10_marquee_tag_with_css_021()
29945 {
29946 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
29947                      "</head><body><marquee>あいう</marquee></body></html>"
29948 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29949                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29950                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29951                        "<head></head><body><span style=\"display:-wap-marquee;font-size:xx-large;\">あいう</span></body></html>"
29952   char  *ret;
29953   char  *tmp;
29954   device_table spec;
29955   chxjconvrule_entry entry;
29956   cookie_t cookie;
29957   apr_size_t destlen;
29958   APR_INIT;
29959   chxj_serf_get = test_chxj_serf_get_marquee230;
29960   call_check = 0;
29961
29962   COOKIE_INIT(cookie);
29963
29964   SPEC_INIT(spec);
29965   destlen = sizeof(TEST_STRING)-1;
29966   entry.action |= CONVRULE_CSS_ON_BIT;
29967
29968   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
29969   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
29970   ret = chxj_rencoding(&r, ret, &destlen);
29971   CU_ASSERT(ret != NULL);
29972   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
29973   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
29974   CU_ASSERT(call_check == 1);
29975
29976   APR_TERM;
29977 #undef TEST_STRING
29978 #undef RESULT_STRING
29979 }
29980 void test_ixhtml10_marquee_tag_with_css_022()
29981 {
29982 #define  TEST_STRING "<html><head>" \
29983                      "</head><body><marquee style=\"font-size:xx-large\">あいう</marquee></body></html>"
29984 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
29985                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
29986                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
29987                        "<head></head><body><span style=\"display:-wap-marquee;font-size:xx-large;\">あいう</span></body></html>"
29988   char  *ret;
29989   char  *tmp;
29990   device_table spec;
29991   chxjconvrule_entry entry;
29992   cookie_t cookie;
29993   apr_size_t destlen;
29994   APR_INIT;
29995   chxj_serf_get = test_chxj_serf_get_marquee230;
29996   call_check = 0;
29997
29998   COOKIE_INIT(cookie);
29999
30000   SPEC_INIT(spec);
30001   destlen = sizeof(TEST_STRING)-1;
30002   entry.action |= CONVRULE_CSS_ON_BIT;
30003
30004   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30005   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30006   ret = chxj_rencoding(&r, ret, &destlen);
30007   CU_ASSERT(ret != NULL);
30008   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30009   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30010   CU_ASSERT(call_check == 0);
30011
30012   APR_TERM;
30013 #undef TEST_STRING
30014 #undef RESULT_STRING
30015 }
30016
30017
30018
30019 /*===========================================================================*/
30020 /* span tag with CSS                                                         */
30021 /*===========================================================================*/
30022 char *test_chxj_serf_get_span001(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
30023 {
30024   static char *css = "a:focus { display: none }\n"
30025                      "a:link  { display: none }\n"
30026                      "a       { display: none }\n"
30027                      "hr      { display: none }\n"
30028                      "a:visited { display:none }\n"
30029                      "span     { text-align:right }\n";
30030   *len = strlen(css);
30031   call_check = 1;
30032   return css;
30033 }
30034 void test_ixhtml10_span_tag_with_css_001()
30035 {
30036 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
30037                      "</head><body><span>あいう</span></body></html>"
30038 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30039                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30040                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30041                        "<head></head><body><span style=\"text-align:right;\">あいう</span></body></html>"
30042   char  *ret;
30043   char  *tmp;
30044   device_table spec;
30045   chxjconvrule_entry entry;
30046   cookie_t cookie;
30047   apr_size_t destlen;
30048   APR_INIT;
30049   chxj_serf_get = test_chxj_serf_get_span001;
30050   call_check = 0;
30051
30052   COOKIE_INIT(cookie);
30053
30054   SPEC_INIT(spec);
30055   destlen = sizeof(TEST_STRING)-1;
30056   entry.action |= CONVRULE_CSS_ON_BIT;
30057
30058   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30059   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30060   ret = chxj_rencoding(&r, ret, &destlen);
30061   CU_ASSERT(ret != NULL);
30062   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30063   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30064   CU_ASSERT(call_check == 1);
30065
30066   APR_TERM;
30067 #undef TEST_STRING
30068 #undef RESULT_STRING
30069 }
30070 void test_ixhtml10_span_tag_with_css_002()
30071 {
30072 #define  TEST_STRING "<html><head>" \
30073                      "</head><body><span style=\"text-align:right\">あいう</span></body></html>"
30074 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30075                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30076                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30077                        "<head></head><body><span style=\"text-align:right;\">あいう</span></body></html>"
30078   char  *ret;
30079   char  *tmp;
30080   device_table spec;
30081   chxjconvrule_entry entry;
30082   cookie_t cookie;
30083   apr_size_t destlen;
30084   APR_INIT;
30085   chxj_serf_get = test_chxj_serf_get_span001;
30086   call_check = 0;
30087
30088   COOKIE_INIT(cookie);
30089
30090   SPEC_INIT(spec);
30091   destlen = sizeof(TEST_STRING)-1;
30092   entry.action |= CONVRULE_CSS_ON_BIT;
30093
30094   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30095   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30096   ret = chxj_rencoding(&r, ret, &destlen);
30097   CU_ASSERT(ret != NULL);
30098   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30099   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30100   CU_ASSERT(call_check == 0);
30101
30102   APR_TERM;
30103 #undef TEST_STRING
30104 #undef RESULT_STRING
30105 }
30106
30107 char *test_chxj_serf_get_span002(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
30108 {
30109   static char *css = "a:focus { display: none }\n"
30110                      "a:link  { display: none }\n"
30111                      "a       { display: none }\n"
30112                      "hr      { display: none }\n"
30113                      "a:visited { display:none }\n"
30114                      "span     { text-align:left }\n";
30115   *len = strlen(css);
30116   call_check = 1;
30117   return css;
30118 }
30119 void test_ixhtml10_span_tag_with_css_003()
30120 {
30121 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
30122                      "</head><body><span>あいう</span></body></html>"
30123 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30124                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30125                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30126                        "<head></head><body><span style=\"text-align:left;\">あいう</span></body></html>"
30127   char  *ret;
30128   char  *tmp;
30129   device_table spec;
30130   chxjconvrule_entry entry;
30131   cookie_t cookie;
30132   apr_size_t destlen;
30133   APR_INIT;
30134   chxj_serf_get = test_chxj_serf_get_span002;
30135   call_check = 0;
30136
30137   COOKIE_INIT(cookie);
30138
30139   SPEC_INIT(spec);
30140   destlen = sizeof(TEST_STRING)-1;
30141   entry.action |= CONVRULE_CSS_ON_BIT;
30142
30143   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30144   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30145   ret = chxj_rencoding(&r, ret, &destlen);
30146   CU_ASSERT(ret != NULL);
30147   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30148   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30149   CU_ASSERT(call_check == 1);
30150
30151   APR_TERM;
30152 #undef TEST_STRING
30153 #undef RESULT_STRING
30154 }
30155 void test_ixhtml10_span_tag_with_css_004()
30156 {
30157 #define  TEST_STRING "<html><head>" \
30158                      "</head><body><span style=\"text-align:left\">あいう</span></body></html>"
30159 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30160                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30161                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30162                        "<head></head><body><span style=\"text-align:left;\">あいう</span></body></html>"
30163   char  *ret;
30164   char  *tmp;
30165   device_table spec;
30166   chxjconvrule_entry entry;
30167   cookie_t cookie;
30168   apr_size_t destlen;
30169   APR_INIT;
30170   chxj_serf_get = test_chxj_serf_get_span002;
30171   call_check = 0;
30172
30173   COOKIE_INIT(cookie);
30174
30175   SPEC_INIT(spec);
30176   destlen = sizeof(TEST_STRING)-1;
30177   entry.action |= CONVRULE_CSS_ON_BIT;
30178
30179   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30180   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30181   ret = chxj_rencoding(&r, ret, &destlen);
30182   CU_ASSERT(ret != NULL);
30183   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30184   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30185   CU_ASSERT(call_check == 0);
30186
30187   APR_TERM;
30188 #undef TEST_STRING
30189 #undef RESULT_STRING
30190 }
30191
30192
30193
30194 char *test_chxj_serf_get_span003(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
30195 {
30196   static char *css = "a:focus { display: none }\n"
30197                      "a:link  { display: none }\n"
30198                      "a       { display: none }\n"
30199                      "hr      { display: none }\n"
30200                      "a:visited { display:none }\n"
30201                      "span     { text-align:center }\n";
30202   *len = strlen(css);
30203   call_check = 1;
30204   return css;
30205 }
30206 void test_ixhtml10_span_tag_with_css_005()
30207 {
30208 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
30209                      "</head><body><span>あいう</span></body></html>"
30210 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30211                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30212                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30213                        "<head></head><body><span style=\"text-align:center;\">あいう</span></body></html>"
30214   char  *ret;
30215   char  *tmp;
30216   device_table spec;
30217   chxjconvrule_entry entry;
30218   cookie_t cookie;
30219   apr_size_t destlen;
30220   APR_INIT;
30221   chxj_serf_get = test_chxj_serf_get_span003;
30222   call_check = 0;
30223
30224   COOKIE_INIT(cookie);
30225
30226   SPEC_INIT(spec);
30227   destlen = sizeof(TEST_STRING)-1;
30228   entry.action |= CONVRULE_CSS_ON_BIT;
30229
30230   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30231   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30232   ret = chxj_rencoding(&r, ret, &destlen);
30233   CU_ASSERT(ret != NULL);
30234   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30235   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30236   CU_ASSERT(call_check == 1);
30237
30238   APR_TERM;
30239 #undef TEST_STRING
30240 #undef RESULT_STRING
30241 }
30242 void test_ixhtml10_span_tag_with_css_006()
30243 {
30244 #define  TEST_STRING "<html><head>" \
30245                      "</head><body><span style=\"text-align:center\">あいう</span></body></html>"
30246 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30247                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30248                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30249                        "<head></head><body><span style=\"text-align:center;\">あいう</span></body></html>"
30250   char  *ret;
30251   char  *tmp;
30252   device_table spec;
30253   chxjconvrule_entry entry;
30254   cookie_t cookie;
30255   apr_size_t destlen;
30256   APR_INIT;
30257   chxj_serf_get = test_chxj_serf_get_span003;
30258   call_check = 0;
30259
30260   COOKIE_INIT(cookie);
30261
30262   SPEC_INIT(spec);
30263   destlen = sizeof(TEST_STRING)-1;
30264   entry.action |= CONVRULE_CSS_ON_BIT;
30265
30266   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30267   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30268   ret = chxj_rencoding(&r, ret, &destlen);
30269   CU_ASSERT(ret != NULL);
30270   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30271   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30272   CU_ASSERT(call_check == 0);
30273
30274   APR_TERM;
30275 #undef TEST_STRING
30276 #undef RESULT_STRING
30277 }
30278
30279
30280 char *test_chxj_serf_get_span004(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
30281 {
30282   static char *css = "a:focus { display: none }\n"
30283                      "a:link  { display: none }\n"
30284                      "a       { display: none }\n"
30285                      "hr      { display: none }\n"
30286                      "a:visited { display:none }\n"
30287                      "span     { color:#ff0000 }\n";
30288   *len = strlen(css);
30289   call_check = 1;
30290   return css;
30291 }
30292 void test_ixhtml10_span_tag_with_css_007()
30293 {
30294 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
30295                      "</head><body><span>あいう</span></body></html>"
30296 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30297                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30298                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30299                        "<head></head><body><span style=\"color:#ff0000;\">あいう</span></body></html>"
30300   char  *ret;
30301   char  *tmp;
30302   device_table spec;
30303   chxjconvrule_entry entry;
30304   cookie_t cookie;
30305   apr_size_t destlen;
30306   APR_INIT;
30307   chxj_serf_get = test_chxj_serf_get_span004;
30308   call_check = 0;
30309
30310   COOKIE_INIT(cookie);
30311
30312   SPEC_INIT(spec);
30313   destlen = sizeof(TEST_STRING)-1;
30314   entry.action |= CONVRULE_CSS_ON_BIT;
30315
30316   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30317   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30318   ret = chxj_rencoding(&r, ret, &destlen);
30319   CU_ASSERT(ret != NULL);
30320   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30321   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30322   CU_ASSERT(call_check == 1);
30323
30324   APR_TERM;
30325 #undef TEST_STRING
30326 #undef RESULT_STRING
30327 }
30328 void test_ixhtml10_span_tag_with_css_008()
30329 {
30330 #define  TEST_STRING "<html><head>" \
30331                      "</head><body><span style=\"color:#ff0000\">あいう</span></body></html>"
30332 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30333                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30334                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30335                        "<head></head><body><span style=\"color:#ff0000;\">あいう</span></body></html>"
30336   char  *ret;
30337   char  *tmp;
30338   device_table spec;
30339   chxjconvrule_entry entry;
30340   cookie_t cookie;
30341   apr_size_t destlen;
30342   APR_INIT;
30343   chxj_serf_get = test_chxj_serf_get_span004;
30344   call_check = 0;
30345
30346   COOKIE_INIT(cookie);
30347
30348   SPEC_INIT(spec);
30349   destlen = sizeof(TEST_STRING)-1;
30350   entry.action |= CONVRULE_CSS_ON_BIT;
30351
30352   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30353   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30354   ret = chxj_rencoding(&r, ret, &destlen);
30355   CU_ASSERT(ret != NULL);
30356   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30357   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30358   CU_ASSERT(call_check == 0);
30359
30360   APR_TERM;
30361 #undef TEST_STRING
30362 #undef RESULT_STRING
30363 }
30364
30365 char *test_chxj_serf_get_span005(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
30366 {
30367   static char *css = "a:focus { display: none }\n"
30368                      "a:link  { display: none }\n"
30369                      "a       { display: none }\n"
30370                      "hr      { display: none }\n"
30371                      "a:visited { display:none }\n"
30372                      "span     { text-decoration:blink }\n";
30373   *len = strlen(css);
30374   call_check = 1;
30375   return css;
30376 }
30377 void test_ixhtml10_span_tag_with_css_009()
30378 {
30379 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
30380                      "</head><body><span>あいう</span></body></html>"
30381 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30382                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30383                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30384                        "<head></head><body><span style=\"text-decoration:blink;\">あいう</span></body></html>"
30385   char  *ret;
30386   char  *tmp;
30387   device_table spec;
30388   chxjconvrule_entry entry;
30389   cookie_t cookie;
30390   apr_size_t destlen;
30391   APR_INIT;
30392   chxj_serf_get = test_chxj_serf_get_span005;
30393   call_check = 0;
30394
30395   COOKIE_INIT(cookie);
30396
30397   SPEC_INIT(spec);
30398   destlen = sizeof(TEST_STRING)-1;
30399   entry.action |= CONVRULE_CSS_ON_BIT;
30400
30401   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30402   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30403   ret = chxj_rencoding(&r, ret, &destlen);
30404   CU_ASSERT(ret != NULL);
30405   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30406   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30407   CU_ASSERT(call_check == 1);
30408
30409   APR_TERM;
30410 #undef TEST_STRING
30411 #undef RESULT_STRING
30412 }
30413 void test_ixhtml10_span_tag_with_css_010()
30414 {
30415 #define  TEST_STRING "<html><head>" \
30416                      "</head><body><span style=\"text-decoration:blink\">あいう</span></body></html>"
30417 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30418                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30419                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30420                        "<head></head><body><span style=\"text-decoration:blink;\">あいう</span></body></html>"
30421   char  *ret;
30422   char  *tmp;
30423   device_table spec;
30424   chxjconvrule_entry entry;
30425   cookie_t cookie;
30426   apr_size_t destlen;
30427   APR_INIT;
30428   chxj_serf_get = test_chxj_serf_get_span005;
30429   call_check = 0;
30430
30431   COOKIE_INIT(cookie);
30432
30433   SPEC_INIT(spec);
30434   destlen = sizeof(TEST_STRING)-1;
30435   entry.action |= CONVRULE_CSS_ON_BIT;
30436
30437   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30438   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30439   ret = chxj_rencoding(&r, ret, &destlen);
30440   CU_ASSERT(ret != NULL);
30441   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30442   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30443   CU_ASSERT(call_check == 0);
30444
30445   APR_TERM;
30446 #undef TEST_STRING
30447 #undef RESULT_STRING
30448 }
30449 char *test_chxj_serf_get_span006(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
30450 {
30451   static char *css = "a:focus { display: none }\n"
30452                      "a:link  { display: none }\n"
30453                      "a       { display: none }\n"
30454                      "hr      { display: none }\n"
30455                      "a:visited { display:none }\n"
30456                      "span     { display:-wap-marquee }\n";
30457   *len = strlen(css);
30458   call_check = 1;
30459   return css;
30460 }
30461 void test_ixhtml10_span_tag_with_css_011()
30462 {
30463 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
30464                      "</head><body><span>あいう</span></body></html>"
30465 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30466                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30467                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30468                        "<head></head><body><span style=\"display:-wap-marquee;\">あいう</span></body></html>"
30469   char  *ret;
30470   char  *tmp;
30471   device_table spec;
30472   chxjconvrule_entry entry;
30473   cookie_t cookie;
30474   apr_size_t destlen;
30475   APR_INIT;
30476   chxj_serf_get = test_chxj_serf_get_span006;
30477   call_check = 0;
30478
30479   COOKIE_INIT(cookie);
30480
30481   SPEC_INIT(spec);
30482   destlen = sizeof(TEST_STRING)-1;
30483   entry.action |= CONVRULE_CSS_ON_BIT;
30484
30485   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30486   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30487   ret = chxj_rencoding(&r, ret, &destlen);
30488   CU_ASSERT(ret != NULL);
30489   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30490   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30491   CU_ASSERT(call_check == 1);
30492
30493   APR_TERM;
30494 #undef TEST_STRING
30495 #undef RESULT_STRING
30496 }
30497 void test_ixhtml10_span_tag_with_css_012()
30498 {
30499 #define  TEST_STRING "<html><head>" \
30500                      "</head><body><span style=\"display:-wap-marquee\">あいう</span></body></html>"
30501 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30502                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30503                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30504                        "<head></head><body><span style=\"display:-wap-marquee;\">あいう</span></body></html>"
30505   char  *ret;
30506   char  *tmp;
30507   device_table spec;
30508   chxjconvrule_entry entry;
30509   cookie_t cookie;
30510   apr_size_t destlen;
30511   APR_INIT;
30512   chxj_serf_get = test_chxj_serf_get_span006;
30513   call_check = 0;
30514
30515   COOKIE_INIT(cookie);
30516
30517   SPEC_INIT(spec);
30518   destlen = sizeof(TEST_STRING)-1;
30519   entry.action |= CONVRULE_CSS_ON_BIT;
30520
30521   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30522   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30523   ret = chxj_rencoding(&r, ret, &destlen);
30524   CU_ASSERT(ret != NULL);
30525   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30526   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30527   CU_ASSERT(call_check == 0);
30528
30529   APR_TERM;
30530 #undef TEST_STRING
30531 #undef RESULT_STRING
30532 }
30533 char *test_chxj_serf_get_span007(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
30534 {
30535   static char *css = "a:focus { display: none }\n"
30536                      "a:link  { display: none }\n"
30537                      "a       { display: none }\n"
30538                      "hr      { display: none }\n"
30539                      "a:visited { display:none }\n"
30540                      "span     { display:-wap-marquee;-wap-marquee-dir:ltr; }\n";
30541   *len = strlen(css);
30542   call_check = 1;
30543   return css;
30544 }
30545 void test_ixhtml10_span_tag_with_css_013()
30546 {
30547 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
30548                      "</head><body><span>あいう</span></body></html>"
30549 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30550                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30551                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30552                        "<head></head><body><span style=\"display:-wap-marquee;-wap-marquee-dir:ltr;\">あいう</span></body></html>"
30553   char  *ret;
30554   char  *tmp;
30555   device_table spec;
30556   chxjconvrule_entry entry;
30557   cookie_t cookie;
30558   apr_size_t destlen;
30559   APR_INIT;
30560   chxj_serf_get = test_chxj_serf_get_span007;
30561   call_check = 0;
30562
30563   COOKIE_INIT(cookie);
30564
30565   SPEC_INIT(spec);
30566   destlen = sizeof(TEST_STRING)-1;
30567   entry.action |= CONVRULE_CSS_ON_BIT;
30568
30569   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30570   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30571   ret = chxj_rencoding(&r, ret, &destlen);
30572   CU_ASSERT(ret != NULL);
30573   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30574   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30575   CU_ASSERT(call_check == 1);
30576
30577   APR_TERM;
30578 #undef TEST_STRING
30579 #undef RESULT_STRING
30580 }
30581 void test_ixhtml10_span_tag_with_css_014()
30582 {
30583 #define  TEST_STRING "<html><head>" \
30584                      "</head><body><span style=\"display:-wap-marquee;-wap-marquee-dir:ltr\">あいう</span></body></html>"
30585 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30586                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30587                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30588                        "<head></head><body><span style=\"display:-wap-marquee;-wap-marquee-dir:ltr;\">あいう</span></body></html>"
30589   char  *ret;
30590   char  *tmp;
30591   device_table spec;
30592   chxjconvrule_entry entry;
30593   cookie_t cookie;
30594   apr_size_t destlen;
30595   APR_INIT;
30596   chxj_serf_get = test_chxj_serf_get_span007;
30597   call_check = 0;
30598
30599   COOKIE_INIT(cookie);
30600
30601   SPEC_INIT(spec);
30602   destlen = sizeof(TEST_STRING)-1;
30603   entry.action |= CONVRULE_CSS_ON_BIT;
30604
30605   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30606   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30607   ret = chxj_rencoding(&r, ret, &destlen);
30608   CU_ASSERT(ret != NULL);
30609   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30610   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30611   CU_ASSERT(call_check == 0);
30612
30613   APR_TERM;
30614 #undef TEST_STRING
30615 #undef RESULT_STRING
30616 }
30617 char *test_chxj_serf_get_span008(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
30618 {
30619   static char *css = "a:focus { display: none }\n"
30620                      "a:link  { display: none }\n"
30621                      "a       { display: none }\n"
30622                      "hr      { display: none }\n"
30623                      "a:visited { display:none }\n"
30624                      "span     { display:-wap-marquee;-wap-marquee-dir:rtl; }\n";
30625   *len = strlen(css);
30626   call_check = 1;
30627   return css;
30628 }
30629 void test_ixhtml10_span_tag_with_css_015()
30630 {
30631 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
30632                      "</head><body><span>あいう</span></body></html>"
30633 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30634                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30635                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30636                        "<head></head><body><span style=\"display:-wap-marquee;-wap-marquee-dir:rtl;\">あいう</span></body></html>"
30637   char  *ret;
30638   char  *tmp;
30639   device_table spec;
30640   chxjconvrule_entry entry;
30641   cookie_t cookie;
30642   apr_size_t destlen;
30643   APR_INIT;
30644   chxj_serf_get = test_chxj_serf_get_span008;
30645   call_check = 0;
30646
30647   COOKIE_INIT(cookie);
30648
30649   SPEC_INIT(spec);
30650   destlen = sizeof(TEST_STRING)-1;
30651   entry.action |= CONVRULE_CSS_ON_BIT;
30652
30653   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30654   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30655   ret = chxj_rencoding(&r, ret, &destlen);
30656   CU_ASSERT(ret != NULL);
30657   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30658   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30659   CU_ASSERT(call_check == 1);
30660
30661   APR_TERM;
30662 #undef TEST_STRING
30663 #undef RESULT_STRING
30664 }
30665 void test_ixhtml10_span_tag_with_css_016()
30666 {
30667 #define  TEST_STRING "<html><head>" \
30668                      "</head><body><span style=\"display:-wap-marquee;-wap-marquee-dir:rtl\">あいう</span></body></html>"
30669 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30670                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30671                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30672                        "<head></head><body><span style=\"display:-wap-marquee;-wap-marquee-dir:rtl;\">あいう</span></body></html>"
30673   char  *ret;
30674   char  *tmp;
30675   device_table spec;
30676   chxjconvrule_entry entry;
30677   cookie_t cookie;
30678   apr_size_t destlen;
30679   APR_INIT;
30680   chxj_serf_get = test_chxj_serf_get_span008;
30681   call_check = 0;
30682
30683   COOKIE_INIT(cookie);
30684
30685   SPEC_INIT(spec);
30686   destlen = sizeof(TEST_STRING)-1;
30687   entry.action |= CONVRULE_CSS_ON_BIT;
30688
30689   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30690   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30691   ret = chxj_rencoding(&r, ret, &destlen);
30692   CU_ASSERT(ret != NULL);
30693   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30694   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30695   CU_ASSERT(call_check == 0);
30696
30697   APR_TERM;
30698 #undef TEST_STRING
30699 #undef RESULT_STRING
30700 }
30701 char *test_chxj_serf_get_span009(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
30702 {
30703   static char *css = "a:focus { display: none }\n"
30704                      "a:link  { display: none }\n"
30705                      "a       { display: none }\n"
30706                      "hr      { display: none }\n"
30707                      "a:visited { display:none }\n"
30708                      "span     { display:-wap-marquee;-wap-marquee-style:scroll; }\n";
30709   *len = strlen(css);
30710   call_check = 1;
30711   return css;
30712 }
30713 void test_ixhtml10_span_tag_with_css_017()
30714 {
30715 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
30716                      "</head><body><span>あいう</span></body></html>"
30717 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30718                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30719                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30720                        "<head></head><body><span style=\"display:-wap-marquee;-wap-marquee-style:scroll;\">あいう</span></body></html>"
30721   char  *ret;
30722   char  *tmp;
30723   device_table spec;
30724   chxjconvrule_entry entry;
30725   cookie_t cookie;
30726   apr_size_t destlen;
30727   APR_INIT;
30728   chxj_serf_get = test_chxj_serf_get_span009;
30729   call_check = 0;
30730
30731   COOKIE_INIT(cookie);
30732
30733   SPEC_INIT(spec);
30734   destlen = sizeof(TEST_STRING)-1;
30735   entry.action |= CONVRULE_CSS_ON_BIT;
30736
30737   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30738   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30739   ret = chxj_rencoding(&r, ret, &destlen);
30740   CU_ASSERT(ret != NULL);
30741   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30742   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30743   CU_ASSERT(call_check == 1);
30744
30745   APR_TERM;
30746 #undef TEST_STRING
30747 #undef RESULT_STRING
30748 }
30749 void test_ixhtml10_span_tag_with_css_018()
30750 {
30751 #define  TEST_STRING "<html><head>" \
30752                      "</head><body><span style=\"display:-wap-marquee;-wap-marquee-style:scroll\">あいう</span></body></html>"
30753 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30754                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30755                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30756                        "<head></head><body><span style=\"display:-wap-marquee;-wap-marquee-style:scroll;\">あいう</span></body></html>"
30757   char  *ret;
30758   char  *tmp;
30759   device_table spec;
30760   chxjconvrule_entry entry;
30761   cookie_t cookie;
30762   apr_size_t destlen;
30763   APR_INIT;
30764   chxj_serf_get = test_chxj_serf_get_span009;
30765   call_check = 0;
30766
30767   COOKIE_INIT(cookie);
30768
30769   SPEC_INIT(spec);
30770   destlen = sizeof(TEST_STRING)-1;
30771   entry.action |= CONVRULE_CSS_ON_BIT;
30772
30773   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30774   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30775   ret = chxj_rencoding(&r, ret, &destlen);
30776   CU_ASSERT(ret != NULL);
30777   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30778   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30779   CU_ASSERT(call_check == 0);
30780
30781   APR_TERM;
30782 #undef TEST_STRING
30783 #undef RESULT_STRING
30784 }
30785 char *test_chxj_serf_get_span010(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
30786 {
30787   static char *css = "a:focus { display: none }\n"
30788                      "a:link  { display: none }\n"
30789                      "a       { display: none }\n"
30790                      "hr      { display: none }\n"
30791                      "a:visited { display:none }\n"
30792                      "span     { display:-wap-marquee;-wap-marquee-style:slide; }\n";
30793   *len = strlen(css);
30794   call_check = 1;
30795   return css;
30796 }
30797 void test_ixhtml10_span_tag_with_css_019()
30798 {
30799 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
30800                      "</head><body><span>あいう</span></body></html>"
30801 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30802                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30803                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30804                        "<head></head><body><span style=\"display:-wap-marquee;-wap-marquee-style:slide;\">あいう</span></body></html>"
30805   char  *ret;
30806   char  *tmp;
30807   device_table spec;
30808   chxjconvrule_entry entry;
30809   cookie_t cookie;
30810   apr_size_t destlen;
30811   APR_INIT;
30812   chxj_serf_get = test_chxj_serf_get_span010;
30813   call_check = 0;
30814
30815   COOKIE_INIT(cookie);
30816
30817   SPEC_INIT(spec);
30818   destlen = sizeof(TEST_STRING)-1;
30819   entry.action |= CONVRULE_CSS_ON_BIT;
30820
30821   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30822   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30823   ret = chxj_rencoding(&r, ret, &destlen);
30824   CU_ASSERT(ret != NULL);
30825   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30826   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30827   CU_ASSERT(call_check == 1);
30828
30829   APR_TERM;
30830 #undef TEST_STRING
30831 #undef RESULT_STRING
30832 }
30833 void test_ixhtml10_span_tag_with_css_020()
30834 {
30835 #define  TEST_STRING "<html><head>" \
30836                      "</head><body><span style=\"display:-wap-marquee;-wap-marquee-style:slide\">あいう</span></body></html>"
30837 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30838                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30839                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30840                        "<head></head><body><span style=\"display:-wap-marquee;-wap-marquee-style:slide;\">あいう</span></body></html>"
30841   char  *ret;
30842   char  *tmp;
30843   device_table spec;
30844   chxjconvrule_entry entry;
30845   cookie_t cookie;
30846   apr_size_t destlen;
30847   APR_INIT;
30848   chxj_serf_get = test_chxj_serf_get_span010;
30849   call_check = 0;
30850
30851   COOKIE_INIT(cookie);
30852
30853   SPEC_INIT(spec);
30854   destlen = sizeof(TEST_STRING)-1;
30855   entry.action |= CONVRULE_CSS_ON_BIT;
30856
30857   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30858   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30859   ret = chxj_rencoding(&r, ret, &destlen);
30860   CU_ASSERT(ret != NULL);
30861   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30862   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30863   CU_ASSERT(call_check == 0);
30864
30865   APR_TERM;
30866 #undef TEST_STRING
30867 #undef RESULT_STRING
30868 }
30869 char *test_chxj_serf_get_span011(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
30870 {
30871   static char *css = "a:focus { display: none }\n"
30872                      "a:link  { display: none }\n"
30873                      "a       { display: none }\n"
30874                      "hr      { display: none }\n"
30875                      "a:visited { display:none }\n"
30876                      "span     { display:-wap-marquee;-wap-marquee-style:alternate; }\n";
30877   *len = strlen(css);
30878   call_check = 1;
30879   return css;
30880 }
30881 void test_ixhtml10_span_tag_with_css_021()
30882 {
30883 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
30884                      "</head><body><span>あいう</span></body></html>"
30885 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30886                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30887                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30888                        "<head></head><body><span style=\"display:-wap-marquee;-wap-marquee-style:alternate;\">あいう</span></body></html>"
30889   char  *ret;
30890   char  *tmp;
30891   device_table spec;
30892   chxjconvrule_entry entry;
30893   cookie_t cookie;
30894   apr_size_t destlen;
30895   APR_INIT;
30896   chxj_serf_get = test_chxj_serf_get_span011;
30897   call_check = 0;
30898
30899   COOKIE_INIT(cookie);
30900
30901   SPEC_INIT(spec);
30902   destlen = sizeof(TEST_STRING)-1;
30903   entry.action |= CONVRULE_CSS_ON_BIT;
30904
30905   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30906   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30907   ret = chxj_rencoding(&r, ret, &destlen);
30908   CU_ASSERT(ret != NULL);
30909   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30910   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30911   CU_ASSERT(call_check == 1);
30912
30913   APR_TERM;
30914 #undef TEST_STRING
30915 #undef RESULT_STRING
30916 }
30917 void test_ixhtml10_span_tag_with_css_022()
30918 {
30919 #define  TEST_STRING "<html><head>" \
30920                      "</head><body><span style=\"display:-wap-marquee;-wap-marquee-style:alternate\">あいう</span></body></html>"
30921 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30922                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30923                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30924                        "<head></head><body><span style=\"display:-wap-marquee;-wap-marquee-style:alternate;\">あいう</span></body></html>"
30925   char  *ret;
30926   char  *tmp;
30927   device_table spec;
30928   chxjconvrule_entry entry;
30929   cookie_t cookie;
30930   apr_size_t destlen;
30931   APR_INIT;
30932   chxj_serf_get = test_chxj_serf_get_span011;
30933   call_check = 0;
30934
30935   COOKIE_INIT(cookie);
30936
30937   SPEC_INIT(spec);
30938   destlen = sizeof(TEST_STRING)-1;
30939   entry.action |= CONVRULE_CSS_ON_BIT;
30940
30941   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30942   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30943   ret = chxj_rencoding(&r, ret, &destlen);
30944   CU_ASSERT(ret != NULL);
30945   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30946   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30947   CU_ASSERT(call_check == 0);
30948
30949   APR_TERM;
30950 #undef TEST_STRING
30951 #undef RESULT_STRING
30952 }
30953 char *test_chxj_serf_get_span012(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
30954 {
30955   static char *css = "a:focus { display: none }\n"
30956                      "a:link  { display: none }\n"
30957                      "a       { display: none }\n"
30958                      "hr      { display: none }\n"
30959                      "a:visited { display:none }\n"
30960                      "span     { display:-wap-marquee;-wap-marquee-loop:1; }\n";
30961   *len = strlen(css);
30962   call_check = 1;
30963   return css;
30964 }
30965 void test_ixhtml10_span_tag_with_css_023()
30966 {
30967 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
30968                      "</head><body><span>あいう</span></body></html>"
30969 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
30970                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
30971                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
30972                        "<head></head><body><span style=\"display:-wap-marquee;-wap-marquee-loop:1;\">あいう</span></body></html>"
30973   char  *ret;
30974   char  *tmp;
30975   device_table spec;
30976   chxjconvrule_entry entry;
30977   cookie_t cookie;
30978   apr_size_t destlen;
30979   APR_INIT;
30980   chxj_serf_get = test_chxj_serf_get_span012;
30981   call_check = 0;
30982
30983   COOKIE_INIT(cookie);
30984
30985   SPEC_INIT(spec);
30986   destlen = sizeof(TEST_STRING)-1;
30987   entry.action |= CONVRULE_CSS_ON_BIT;
30988
30989   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
30990   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
30991   ret = chxj_rencoding(&r, ret, &destlen);
30992   CU_ASSERT(ret != NULL);
30993   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
30994   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
30995   CU_ASSERT(call_check == 1);
30996
30997   APR_TERM;
30998 #undef TEST_STRING
30999 #undef RESULT_STRING
31000 }
31001 void test_ixhtml10_span_tag_with_css_024()
31002 {
31003 #define  TEST_STRING "<html><head>" \
31004                      "</head><body><span style=\"display:-wap-marquee;-wap-marquee-loop:1\">あいう</span></body></html>"
31005 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31006                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31007                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31008                        "<head></head><body><span style=\"display:-wap-marquee;-wap-marquee-loop:1;\">あいう</span></body></html>"
31009   char  *ret;
31010   char  *tmp;
31011   device_table spec;
31012   chxjconvrule_entry entry;
31013   cookie_t cookie;
31014   apr_size_t destlen;
31015   APR_INIT;
31016   chxj_serf_get = test_chxj_serf_get_span012;
31017   call_check = 0;
31018
31019   COOKIE_INIT(cookie);
31020
31021   SPEC_INIT(spec);
31022   destlen = sizeof(TEST_STRING)-1;
31023   entry.action |= CONVRULE_CSS_ON_BIT;
31024
31025   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31026   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31027   ret = chxj_rencoding(&r, ret, &destlen);
31028   CU_ASSERT(ret != NULL);
31029   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31030   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31031   CU_ASSERT(call_check == 0);
31032
31033   APR_TERM;
31034 #undef TEST_STRING
31035 #undef RESULT_STRING
31036 }
31037 char *test_chxj_serf_get_span013(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
31038 {
31039   static char *css = "a:focus { display: none }\n"
31040                      "a:link  { display: none }\n"
31041                      "a       { display: none }\n"
31042                      "hr      { display: none }\n"
31043                      "a:visited { display:none }\n"
31044                      "span     { display:-wap-marquee;-wap-marquee-loop:infinite; }\n";
31045   *len = strlen(css);
31046   call_check = 1;
31047   return css;
31048 }
31049 void test_ixhtml10_span_tag_with_css_025()
31050 {
31051 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
31052                      "</head><body><span>あいう</span></body></html>"
31053 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31054                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31055                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31056                        "<head></head><body><span style=\"display:-wap-marquee;-wap-marquee-loop:infinite;\">あいう</span></body></html>"
31057   char  *ret;
31058   char  *tmp;
31059   device_table spec;
31060   chxjconvrule_entry entry;
31061   cookie_t cookie;
31062   apr_size_t destlen;
31063   APR_INIT;
31064   chxj_serf_get = test_chxj_serf_get_span013;
31065   call_check = 0;
31066
31067   COOKIE_INIT(cookie);
31068
31069   SPEC_INIT(spec);
31070   destlen = sizeof(TEST_STRING)-1;
31071   entry.action |= CONVRULE_CSS_ON_BIT;
31072
31073   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31074   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31075   ret = chxj_rencoding(&r, ret, &destlen);
31076   CU_ASSERT(ret != NULL);
31077   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31078   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31079   CU_ASSERT(call_check == 1);
31080
31081   APR_TERM;
31082 #undef TEST_STRING
31083 #undef RESULT_STRING
31084 }
31085 void test_ixhtml10_span_tag_with_css_026()
31086 {
31087 #define  TEST_STRING "<html><head>" \
31088                      "</head><body><span style=\"display:-wap-marquee;-wap-marquee-loop:infinite\">あいう</span></body></html>"
31089 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31090                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31091                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31092                        "<head></head><body><span style=\"display:-wap-marquee;-wap-marquee-loop:infinite;\">あいう</span></body></html>"
31093   char  *ret;
31094   char  *tmp;
31095   device_table spec;
31096   chxjconvrule_entry entry;
31097   cookie_t cookie;
31098   apr_size_t destlen;
31099   APR_INIT;
31100   chxj_serf_get = test_chxj_serf_get_span013;
31101   call_check = 0;
31102
31103   COOKIE_INIT(cookie);
31104
31105   SPEC_INIT(spec);
31106   destlen = sizeof(TEST_STRING)-1;
31107   entry.action |= CONVRULE_CSS_ON_BIT;
31108
31109   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31110   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31111   ret = chxj_rencoding(&r, ret, &destlen);
31112   CU_ASSERT(ret != NULL);
31113   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31114   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31115   CU_ASSERT(call_check == 0);
31116
31117   APR_TERM;
31118 #undef TEST_STRING
31119 #undef RESULT_STRING
31120 }
31121
31122 char *test_chxj_serf_get_span014(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
31123 {
31124   static char *css = "a:focus { display: none }\n"
31125                      "a:link  { display: none }\n"
31126                      "a       { display: none }\n"
31127                      "hr      { display: none }\n"
31128                      "a:visited { display:none }\n"
31129                      "span     { font-size:xx-small; }\n";
31130   *len = strlen(css);
31131   call_check = 1;
31132   return css;
31133 }
31134 void test_ixhtml10_span_tag_with_css_027()
31135 {
31136 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
31137                      "</head><body><span>あいう</span></body></html>"
31138 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31139                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31140                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31141                        "<head></head><body><span style=\"font-size:xx-small;\">あいう</span></body></html>"
31142   char  *ret;
31143   char  *tmp;
31144   device_table spec;
31145   chxjconvrule_entry entry;
31146   cookie_t cookie;
31147   apr_size_t destlen;
31148   APR_INIT;
31149   chxj_serf_get = test_chxj_serf_get_span014;
31150   call_check = 0;
31151
31152   COOKIE_INIT(cookie);
31153
31154   SPEC_INIT(spec);
31155   destlen = sizeof(TEST_STRING)-1;
31156   entry.action |= CONVRULE_CSS_ON_BIT;
31157
31158   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31159   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31160   ret = chxj_rencoding(&r, ret, &destlen);
31161   CU_ASSERT(ret != NULL);
31162   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31163   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31164   CU_ASSERT(call_check == 1);
31165
31166   APR_TERM;
31167 #undef TEST_STRING
31168 #undef RESULT_STRING
31169 }
31170 void test_ixhtml10_span_tag_with_css_028()
31171 {
31172 #define  TEST_STRING "<html><head>" \
31173                      "</head><body><span style=\"font-size:xx-small;\">あいう</span></body></html>"
31174 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31175                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31176                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31177                        "<head></head><body><span style=\"font-size:xx-small;\">あいう</span></body></html>"
31178   char  *ret;
31179   char  *tmp;
31180   device_table spec;
31181   chxjconvrule_entry entry;
31182   cookie_t cookie;
31183   apr_size_t destlen;
31184   APR_INIT;
31185   chxj_serf_get = test_chxj_serf_get_span014;
31186   call_check = 0;
31187
31188   COOKIE_INIT(cookie);
31189
31190   SPEC_INIT(spec);
31191   destlen = sizeof(TEST_STRING)-1;
31192   entry.action |= CONVRULE_CSS_ON_BIT;
31193
31194   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31195   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31196   ret = chxj_rencoding(&r, ret, &destlen);
31197   CU_ASSERT(ret != NULL);
31198   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31199   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31200   CU_ASSERT(call_check == 0);
31201
31202   APR_TERM;
31203 #undef TEST_STRING
31204 #undef RESULT_STRING
31205 }
31206 char *test_chxj_serf_get_span015(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
31207 {
31208   static char *css = "a:focus { display: none }\n"
31209                      "a:link  { display: none }\n"
31210                      "a       { display: none }\n"
31211                      "hr      { display: none }\n"
31212                      "a:visited { display:none }\n"
31213                      "span     { font-size:x-small; }\n";
31214   *len = strlen(css);
31215   call_check = 1;
31216   return css;
31217 }
31218 void test_ixhtml10_span_tag_with_css_029()
31219 {
31220 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
31221                      "</head><body><span>あいう</span></body></html>"
31222 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31223                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31224                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31225                        "<head></head><body><span style=\"font-size:x-small;\">あいう</span></body></html>"
31226   char  *ret;
31227   char  *tmp;
31228   device_table spec;
31229   chxjconvrule_entry entry;
31230   cookie_t cookie;
31231   apr_size_t destlen;
31232   APR_INIT;
31233   chxj_serf_get = test_chxj_serf_get_span015;
31234   call_check = 0;
31235
31236   COOKIE_INIT(cookie);
31237
31238   SPEC_INIT(spec);
31239   destlen = sizeof(TEST_STRING)-1;
31240   entry.action |= CONVRULE_CSS_ON_BIT;
31241
31242   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31243   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31244   ret = chxj_rencoding(&r, ret, &destlen);
31245   CU_ASSERT(ret != NULL);
31246   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31247   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31248   CU_ASSERT(call_check == 1);
31249
31250   APR_TERM;
31251 #undef TEST_STRING
31252 #undef RESULT_STRING
31253 }
31254 void test_ixhtml10_span_tag_with_css_030()
31255 {
31256 #define  TEST_STRING "<html><head>" \
31257                      "</head><body><span style=\"font-size:x-small;\">あいう</span></body></html>"
31258 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31259                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31260                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31261                        "<head></head><body><span style=\"font-size:x-small;\">あいう</span></body></html>"
31262   char  *ret;
31263   char  *tmp;
31264   device_table spec;
31265   chxjconvrule_entry entry;
31266   cookie_t cookie;
31267   apr_size_t destlen;
31268   APR_INIT;
31269   chxj_serf_get = test_chxj_serf_get_span015;
31270   call_check = 0;
31271
31272   COOKIE_INIT(cookie);
31273
31274   SPEC_INIT(spec);
31275   destlen = sizeof(TEST_STRING)-1;
31276   entry.action |= CONVRULE_CSS_ON_BIT;
31277
31278   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31279   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31280   ret = chxj_rencoding(&r, ret, &destlen);
31281   CU_ASSERT(ret != NULL);
31282   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31283   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31284   CU_ASSERT(call_check == 0);
31285
31286   APR_TERM;
31287 #undef TEST_STRING
31288 #undef RESULT_STRING
31289 }
31290 char *test_chxj_serf_get_span016(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
31291 {
31292   static char *css = "a:focus { display: none }\n"
31293                      "a:link  { display: none }\n"
31294                      "a       { display: none }\n"
31295                      "hr      { display: none }\n"
31296                      "a:visited { display:none }\n"
31297                      "span     { font-size:small; }\n";
31298   *len = strlen(css);
31299   call_check = 1;
31300   return css;
31301 }
31302 void test_ixhtml10_span_tag_with_css_031()
31303 {
31304 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
31305                      "</head><body><span>あいう</span></body></html>"
31306 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31307                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31308                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31309                        "<head></head><body><span style=\"font-size:small;\">あいう</span></body></html>"
31310   char  *ret;
31311   char  *tmp;
31312   device_table spec;
31313   chxjconvrule_entry entry;
31314   cookie_t cookie;
31315   apr_size_t destlen;
31316   APR_INIT;
31317   chxj_serf_get = test_chxj_serf_get_span016;
31318   call_check = 0;
31319
31320   COOKIE_INIT(cookie);
31321
31322   SPEC_INIT(spec);
31323   destlen = sizeof(TEST_STRING)-1;
31324   entry.action |= CONVRULE_CSS_ON_BIT;
31325
31326   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31327   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31328   ret = chxj_rencoding(&r, ret, &destlen);
31329   CU_ASSERT(ret != NULL);
31330   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31331   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31332   CU_ASSERT(call_check == 1);
31333
31334   APR_TERM;
31335 #undef TEST_STRING
31336 #undef RESULT_STRING
31337 }
31338 void test_ixhtml10_span_tag_with_css_032()
31339 {
31340 #define  TEST_STRING "<html><head>" \
31341                      "</head><body><span style=\"font-size:small;\">あいう</span></body></html>"
31342 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31343                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31344                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31345                        "<head></head><body><span style=\"font-size:small;\">あいう</span></body></html>"
31346   char  *ret;
31347   char  *tmp;
31348   device_table spec;
31349   chxjconvrule_entry entry;
31350   cookie_t cookie;
31351   apr_size_t destlen;
31352   APR_INIT;
31353   chxj_serf_get = test_chxj_serf_get_span016;
31354   call_check = 0;
31355
31356   COOKIE_INIT(cookie);
31357
31358   SPEC_INIT(spec);
31359   destlen = sizeof(TEST_STRING)-1;
31360   entry.action |= CONVRULE_CSS_ON_BIT;
31361
31362   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31363   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31364   ret = chxj_rencoding(&r, ret, &destlen);
31365   CU_ASSERT(ret != NULL);
31366   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31367   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31368   CU_ASSERT(call_check == 0);
31369
31370   APR_TERM;
31371 #undef TEST_STRING
31372 #undef RESULT_STRING
31373 }
31374 char *test_chxj_serf_get_span017(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
31375 {
31376   static char *css = "a:focus { display: none }\n"
31377                      "a:link  { display: none }\n"
31378                      "a       { display: none }\n"
31379                      "hr      { display: none }\n"
31380                      "a:visited { display:none }\n"
31381                      "span     { font-size:medium; }\n";
31382   *len = strlen(css);
31383   call_check = 1;
31384   return css;
31385 }
31386 void test_ixhtml10_span_tag_with_css_033()
31387 {
31388 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
31389                      "</head><body><span>あいう</span></body></html>"
31390 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31391                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31392                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31393                        "<head></head><body><span style=\"font-size:medium;\">あいう</span></body></html>"
31394   char  *ret;
31395   char  *tmp;
31396   device_table spec;
31397   chxjconvrule_entry entry;
31398   cookie_t cookie;
31399   apr_size_t destlen;
31400   APR_INIT;
31401   chxj_serf_get = test_chxj_serf_get_span017;
31402   call_check = 0;
31403
31404   COOKIE_INIT(cookie);
31405
31406   SPEC_INIT(spec);
31407   destlen = sizeof(TEST_STRING)-1;
31408   entry.action |= CONVRULE_CSS_ON_BIT;
31409
31410   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31411   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31412   ret = chxj_rencoding(&r, ret, &destlen);
31413   CU_ASSERT(ret != NULL);
31414   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31415   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31416   CU_ASSERT(call_check == 1);
31417
31418   APR_TERM;
31419 #undef TEST_STRING
31420 #undef RESULT_STRING
31421 }
31422 void test_ixhtml10_span_tag_with_css_034()
31423 {
31424 #define  TEST_STRING "<html><head>" \
31425                      "</head><body><span style=\"font-size:medium;\">あいう</span></body></html>"
31426 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31427                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31428                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31429                        "<head></head><body><span style=\"font-size:medium;\">あいう</span></body></html>"
31430   char  *ret;
31431   char  *tmp;
31432   device_table spec;
31433   chxjconvrule_entry entry;
31434   cookie_t cookie;
31435   apr_size_t destlen;
31436   APR_INIT;
31437   chxj_serf_get = test_chxj_serf_get_span017;
31438   call_check = 0;
31439
31440   COOKIE_INIT(cookie);
31441
31442   SPEC_INIT(spec);
31443   destlen = sizeof(TEST_STRING)-1;
31444   entry.action |= CONVRULE_CSS_ON_BIT;
31445
31446   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31447   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31448   ret = chxj_rencoding(&r, ret, &destlen);
31449   CU_ASSERT(ret != NULL);
31450   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31451   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31452   CU_ASSERT(call_check == 0);
31453
31454   APR_TERM;
31455 #undef TEST_STRING
31456 #undef RESULT_STRING
31457 }
31458 char *test_chxj_serf_get_span018(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
31459 {
31460   static char *css = "a:focus { display: none }\n"
31461                      "a:link  { display: none }\n"
31462                      "a       { display: none }\n"
31463                      "hr      { display: none }\n"
31464                      "a:visited { display:none }\n"
31465                      "span     { font-size:large; }\n";
31466   *len = strlen(css);
31467   call_check = 1;
31468   return css;
31469 }
31470 void test_ixhtml10_span_tag_with_css_035()
31471 {
31472 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
31473                      "</head><body><span>あいう</span></body></html>"
31474 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31475                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31476                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31477                        "<head></head><body><span style=\"font-size:large;\">あいう</span></body></html>"
31478   char  *ret;
31479   char  *tmp;
31480   device_table spec;
31481   chxjconvrule_entry entry;
31482   cookie_t cookie;
31483   apr_size_t destlen;
31484   APR_INIT;
31485   chxj_serf_get = test_chxj_serf_get_span018;
31486   call_check = 0;
31487
31488   COOKIE_INIT(cookie);
31489
31490   SPEC_INIT(spec);
31491   destlen = sizeof(TEST_STRING)-1;
31492   entry.action |= CONVRULE_CSS_ON_BIT;
31493
31494   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31495   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31496   ret = chxj_rencoding(&r, ret, &destlen);
31497   CU_ASSERT(ret != NULL);
31498   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31499   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31500   CU_ASSERT(call_check == 1);
31501
31502   APR_TERM;
31503 #undef TEST_STRING
31504 #undef RESULT_STRING
31505 }
31506 void test_ixhtml10_span_tag_with_css_036()
31507 {
31508 #define  TEST_STRING "<html><head>" \
31509                      "</head><body><span style=\"font-size:large;\">あいう</span></body></html>"
31510 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31511                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31512                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31513                        "<head></head><body><span style=\"font-size:large;\">あいう</span></body></html>"
31514   char  *ret;
31515   char  *tmp;
31516   device_table spec;
31517   chxjconvrule_entry entry;
31518   cookie_t cookie;
31519   apr_size_t destlen;
31520   APR_INIT;
31521   chxj_serf_get = test_chxj_serf_get_span018;
31522   call_check = 0;
31523
31524   COOKIE_INIT(cookie);
31525
31526   SPEC_INIT(spec);
31527   destlen = sizeof(TEST_STRING)-1;
31528   entry.action |= CONVRULE_CSS_ON_BIT;
31529
31530   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31531   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31532   ret = chxj_rencoding(&r, ret, &destlen);
31533   CU_ASSERT(ret != NULL);
31534   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31535   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31536   CU_ASSERT(call_check == 0);
31537
31538   APR_TERM;
31539 #undef TEST_STRING
31540 #undef RESULT_STRING
31541 }
31542 char *test_chxj_serf_get_span019(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
31543 {
31544   static char *css = "a:focus { display: none }\n"
31545                      "a:link  { display: none }\n"
31546                      "a       { display: none }\n"
31547                      "hr      { display: none }\n"
31548                      "a:visited { display:none }\n"
31549                      "span     { font-size:x-large; }\n";
31550   *len = strlen(css);
31551   call_check = 1;
31552   return css;
31553 }
31554 void test_ixhtml10_span_tag_with_css_037()
31555 {
31556 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
31557                      "</head><body><span>あいう</span></body></html>"
31558 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31559                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31560                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31561                        "<head></head><body><span style=\"font-size:x-large;\">あいう</span></body></html>"
31562   char  *ret;
31563   char  *tmp;
31564   device_table spec;
31565   chxjconvrule_entry entry;
31566   cookie_t cookie;
31567   apr_size_t destlen;
31568   APR_INIT;
31569   chxj_serf_get = test_chxj_serf_get_span019;
31570   call_check = 0;
31571
31572   COOKIE_INIT(cookie);
31573
31574   SPEC_INIT(spec);
31575   destlen = sizeof(TEST_STRING)-1;
31576   entry.action |= CONVRULE_CSS_ON_BIT;
31577
31578   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31579   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31580   ret = chxj_rencoding(&r, ret, &destlen);
31581   CU_ASSERT(ret != NULL);
31582   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31583   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31584   CU_ASSERT(call_check == 1);
31585
31586   APR_TERM;
31587 #undef TEST_STRING
31588 #undef RESULT_STRING
31589 }
31590 void test_ixhtml10_span_tag_with_css_038()
31591 {
31592 #define  TEST_STRING "<html><head>" \
31593                      "</head><body><span style=\"font-size:x-large;\">あいう</span></body></html>"
31594 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31595                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31596                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31597                        "<head></head><body><span style=\"font-size:x-large;\">あいう</span></body></html>"
31598   char  *ret;
31599   char  *tmp;
31600   device_table spec;
31601   chxjconvrule_entry entry;
31602   cookie_t cookie;
31603   apr_size_t destlen;
31604   APR_INIT;
31605   chxj_serf_get = test_chxj_serf_get_span019;
31606   call_check = 0;
31607
31608   COOKIE_INIT(cookie);
31609
31610   SPEC_INIT(spec);
31611   destlen = sizeof(TEST_STRING)-1;
31612   entry.action |= CONVRULE_CSS_ON_BIT;
31613
31614   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31615   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31616   ret = chxj_rencoding(&r, ret, &destlen);
31617   CU_ASSERT(ret != NULL);
31618   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31619   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31620   CU_ASSERT(call_check == 0);
31621
31622   APR_TERM;
31623 #undef TEST_STRING
31624 #undef RESULT_STRING
31625 }
31626 char *test_chxj_serf_get_span020(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
31627 {
31628   static char *css = "a:focus { display: none }\n"
31629                      "a:link  { display: none }\n"
31630                      "a       { display: none }\n"
31631                      "hr      { display: none }\n"
31632                      "a:visited { display:none }\n"
31633                      "span     { font-size:xx-large; }\n";
31634   *len = strlen(css);
31635   call_check = 1;
31636   return css;
31637 }
31638 void test_ixhtml10_span_tag_with_css_039()
31639 {
31640 #define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
31641                      "</head><body><span>あいう</span></body></html>"
31642 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31643                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31644                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31645                        "<head></head><body><span style=\"font-size:xx-large;\">あいう</span></body></html>"
31646   char  *ret;
31647   char  *tmp;
31648   device_table spec;
31649   chxjconvrule_entry entry;
31650   cookie_t cookie;
31651   apr_size_t destlen;
31652   APR_INIT;
31653   chxj_serf_get = test_chxj_serf_get_span020;
31654   call_check = 0;
31655
31656   COOKIE_INIT(cookie);
31657
31658   SPEC_INIT(spec);
31659   destlen = sizeof(TEST_STRING)-1;
31660   entry.action |= CONVRULE_CSS_ON_BIT;
31661
31662   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31663   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31664   ret = chxj_rencoding(&r, ret, &destlen);
31665   CU_ASSERT(ret != NULL);
31666   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31667   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31668   CU_ASSERT(call_check == 1);
31669
31670   APR_TERM;
31671 #undef TEST_STRING
31672 #undef RESULT_STRING
31673 }
31674 void test_ixhtml10_span_tag_with_css_040()
31675 {
31676 #define  TEST_STRING "<html><head>" \
31677                      "</head><body><span style=\"font-size:xx-large;\">あいう</span></body></html>"
31678 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Shift_JIS\" ?>" \
31679                        "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">" \
31680                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
31681                        "<head></head><body><span style=\"font-size:xx-large;\">あいう</span></body></html>"
31682   char  *ret;
31683   char  *tmp;
31684   device_table spec;
31685   chxjconvrule_entry entry;
31686   cookie_t cookie;
31687   apr_size_t destlen;
31688   APR_INIT;
31689   chxj_serf_get = test_chxj_serf_get_span020;
31690   call_check = 0;
31691
31692   COOKIE_INIT(cookie);
31693
31694   SPEC_INIT(spec);
31695   destlen = sizeof(TEST_STRING)-1;
31696   entry.action |= CONVRULE_CSS_ON_BIT;
31697
31698   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31699   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31700   ret = chxj_rencoding(&r, ret, &destlen);
31701   fprintf(stderr, "actual:[%s]\n", ret);
31702   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
31703   CU_ASSERT(ret != NULL);
31704   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31705   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31706   CU_ASSERT(call_check == 0);
31707
31708   APR_TERM;
31709 #undef TEST_STRING
31710 #undef RESULT_STRING
31711 }
31712
31713
31714 void test_ixhtml10_chxjif_tag_001()
31715 {
31716 #define  TEST_STRING   "<chxj:if>" \
31717                        "</chxj:if>"
31718 #define  RESULT_STRING "\n" \
31719                        ""
31720   char  *ret;
31721   char  *tmp;
31722   device_table spec;
31723   chxjconvrule_entry entry;
31724   cookie_t cookie;
31725   apr_size_t destlen;
31726   APR_INIT;
31727   chxj_serf_get = test_chxj_serf_get_span020;
31728   call_check = 0;
31729
31730   COOKIE_INIT(cookie);
31731
31732   SPEC_INIT(spec);
31733   destlen = sizeof(TEST_STRING)-1;
31734   entry.action |= CONVRULE_CSS_ON_BIT;
31735
31736   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31737   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31738   ret = chxj_rencoding(&r, ret, &destlen);
31739   fprintf(stderr, "actual:[%s]\n", ret);
31740   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
31741   CU_ASSERT(ret != NULL);
31742   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31743   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31744   CU_ASSERT(call_check == 0);
31745
31746   APR_TERM;
31747 #undef TEST_STRING
31748 #undef RESULT_STRING
31749 }
31750 void test_ixhtml10_chxjif_tag_002()
31751 {
31752 #define  TEST_STRING   "<chxj:if lang>" \
31753                        "abc" \
31754                        "</chxj:if>"
31755 #define  RESULT_STRING "\n" \
31756                        ""
31757   char  *ret;
31758   char  *tmp;
31759   device_table spec;
31760   chxjconvrule_entry entry;
31761   cookie_t cookie;
31762   apr_size_t destlen;
31763   APR_INIT;
31764   chxj_serf_get = test_chxj_serf_get_span020;
31765   call_check = 0;
31766
31767   COOKIE_INIT(cookie);
31768
31769   SPEC_INIT(spec);
31770   destlen = sizeof(TEST_STRING)-1;
31771   entry.action |= CONVRULE_CSS_ON_BIT;
31772
31773   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31774   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31775   ret = chxj_rencoding(&r, ret, &destlen);
31776   fprintf(stderr, "actual:[%s]\n", ret);
31777   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
31778   CU_ASSERT(ret != NULL);
31779   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31780   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31781   CU_ASSERT(call_check == 0);
31782
31783   APR_TERM;
31784 #undef TEST_STRING
31785 #undef RESULT_STRING
31786 }
31787 void test_ixhtml10_chxjif_tag_003()
31788 {
31789 #define  TEST_STRING   "<chxj:if lang=\"chtml\">" \
31790                        "abc" \
31791                        "</chxj:if>"
31792 #define  RESULT_STRING "\n" \
31793                        ""
31794   char  *ret;
31795   char  *tmp;
31796   device_table spec;
31797   chxjconvrule_entry entry;
31798   cookie_t cookie;
31799   apr_size_t destlen;
31800   APR_INIT;
31801   chxj_serf_get = test_chxj_serf_get_span020;
31802   call_check = 0;
31803
31804   COOKIE_INIT(cookie);
31805
31806   SPEC_INIT(spec);
31807   destlen = sizeof(TEST_STRING)-1;
31808   entry.action |= CONVRULE_CSS_ON_BIT;
31809
31810   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31811   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31812   ret = chxj_rencoding(&r, ret, &destlen);
31813   fprintf(stderr, "actual:[%s]\n", ret);
31814   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
31815   CU_ASSERT(ret != NULL);
31816   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31817   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31818   CU_ASSERT(call_check == 0);
31819
31820   APR_TERM;
31821 #undef TEST_STRING
31822 #undef RESULT_STRING
31823 }
31824 void test_ixhtml10_chxjif_tag_004()
31825 {
31826 #define  TEST_STRING   "<chxj:if lang=\"hdml\">" \
31827                        "abc" \
31828                        "</chxj:if>"
31829 #define  RESULT_STRING "\n" \
31830                        ""
31831   char  *ret;
31832   char  *tmp;
31833   device_table spec;
31834   chxjconvrule_entry entry;
31835   cookie_t cookie;
31836   apr_size_t destlen;
31837   APR_INIT;
31838   chxj_serf_get = test_chxj_serf_get_span020;
31839   call_check = 0;
31840
31841   COOKIE_INIT(cookie);
31842
31843   SPEC_INIT(spec);
31844   destlen = sizeof(TEST_STRING)-1;
31845   entry.action |= CONVRULE_CSS_ON_BIT;
31846
31847   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31848   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31849   ret = chxj_rencoding(&r, ret, &destlen);
31850   fprintf(stderr, "actual:[%s]\n", ret);
31851   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
31852   CU_ASSERT(ret != NULL);
31853   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31854   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31855   CU_ASSERT(call_check == 0);
31856
31857   APR_TERM;
31858 #undef TEST_STRING
31859 #undef RESULT_STRING
31860 }
31861 void test_ixhtml10_chxjif_tag_005()
31862 {
31863 #define  TEST_STRING   "<chxj:if lang=\"xhtml\">" \
31864                        "abc" \
31865                        "</chxj:if>"
31866 #define  RESULT_STRING "\n" \
31867                        ""
31868   char  *ret;
31869   char  *tmp;
31870   device_table spec;
31871   chxjconvrule_entry entry;
31872   cookie_t cookie;
31873   apr_size_t destlen;
31874   APR_INIT;
31875   chxj_serf_get = test_chxj_serf_get_span020;
31876   call_check = 0;
31877
31878   COOKIE_INIT(cookie);
31879
31880   SPEC_INIT(spec);
31881   destlen = sizeof(TEST_STRING)-1;
31882   entry.action |= CONVRULE_CSS_ON_BIT;
31883
31884   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31885   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31886   ret = chxj_rencoding(&r, ret, &destlen);
31887   fprintf(stderr, "actual:[%s]\n", ret);
31888   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
31889   CU_ASSERT(ret != NULL);
31890   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31891   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31892   CU_ASSERT(call_check == 0);
31893
31894   APR_TERM;
31895 #undef TEST_STRING
31896 #undef RESULT_STRING
31897 }
31898 void test_ixhtml10_chxjif_tag_006()
31899 {
31900 #define  TEST_STRING   "<chxj:if lang=\"jhtml\">" \
31901                        "abc" \
31902                        "</chxj:if>"
31903 #define  RESULT_STRING "\n" \
31904                        ""
31905   char  *ret;
31906   char  *tmp;
31907   device_table spec;
31908   chxjconvrule_entry entry;
31909   cookie_t cookie;
31910   apr_size_t destlen;
31911   APR_INIT;
31912   chxj_serf_get = test_chxj_serf_get_span020;
31913   call_check = 0;
31914
31915   COOKIE_INIT(cookie);
31916
31917   SPEC_INIT(spec);
31918   destlen = sizeof(TEST_STRING)-1;
31919   entry.action |= CONVRULE_CSS_ON_BIT;
31920
31921   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31922   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31923   ret = chxj_rencoding(&r, ret, &destlen);
31924   fprintf(stderr, "actual:[%s]\n", ret);
31925   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
31926   CU_ASSERT(ret != NULL);
31927   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31928   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31929   CU_ASSERT(call_check == 0);
31930
31931   APR_TERM;
31932 #undef TEST_STRING
31933 #undef RESULT_STRING
31934 }
31935 void test_ixhtml10_chxjif_tag_007()
31936 {
31937 #define  TEST_STRING   "<chxj:if lang=\"jxhtml\">" \
31938                        "abc" \
31939                        "</chxj:if>"
31940 #define  RESULT_STRING "\n" \
31941                        ""
31942   char  *ret;
31943   char  *tmp;
31944   device_table spec;
31945   chxjconvrule_entry entry;
31946   cookie_t cookie;
31947   apr_size_t destlen;
31948   APR_INIT;
31949   chxj_serf_get = test_chxj_serf_get_span020;
31950   call_check = 0;
31951
31952   COOKIE_INIT(cookie);
31953
31954   SPEC_INIT(spec);
31955   destlen = sizeof(TEST_STRING)-1;
31956   entry.action |= CONVRULE_CSS_ON_BIT;
31957
31958   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31959   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31960   ret = chxj_rencoding(&r, ret, &destlen);
31961   fprintf(stderr, "actual:[%s]\n", ret);
31962   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
31963   CU_ASSERT(ret != NULL);
31964   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
31965   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
31966   CU_ASSERT(call_check == 0);
31967
31968   APR_TERM;
31969 #undef TEST_STRING
31970 #undef RESULT_STRING
31971 }
31972 void test_ixhtml10_chxjif_tag_008()
31973 {
31974 #define  TEST_STRING   "<chxj:if lang=\"ixhtml\">" \
31975                        "abc" \
31976                        "</chxj:if>"
31977 #define  RESULT_STRING "abc" \
31978                        ""
31979   char  *ret;
31980   char  *tmp;
31981   device_table spec;
31982   chxjconvrule_entry entry;
31983   cookie_t cookie;
31984   apr_size_t destlen;
31985   APR_INIT;
31986   chxj_serf_get = test_chxj_serf_get_span020;
31987   call_check = 0;
31988
31989   COOKIE_INIT(cookie);
31990
31991   SPEC_INIT(spec);
31992   destlen = sizeof(TEST_STRING)-1;
31993   entry.action |= CONVRULE_CSS_ON_BIT;
31994
31995   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
31996   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
31997   ret = chxj_rencoding(&r, ret, &destlen);
31998   fprintf(stderr, "actual:[%s]\n", ret);
31999   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32000   CU_ASSERT(ret != NULL);
32001   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32002   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32003   CU_ASSERT(call_check == 0);
32004
32005   APR_TERM;
32006 #undef TEST_STRING
32007 #undef RESULT_STRING
32008 }
32009
32010 /* nobr */
32011 void test_ixhtml10_nobr_tag_001()
32012 {
32013 #define  TEST_STRING   "<nobr></nobr>"
32014 #define  RESULT_STRING "<nobr></nobr>"
32015   char  *ret;
32016   char  *tmp;
32017   device_table spec;
32018   chxjconvrule_entry entry;
32019   cookie_t cookie;
32020   apr_size_t destlen;
32021   APR_INIT;
32022   chxj_serf_get = test_chxj_serf_get_span020;
32023   call_check = 0;
32024
32025   COOKIE_INIT(cookie);
32026
32027   SPEC_INIT(spec);
32028   destlen = sizeof(TEST_STRING)-1;
32029   entry.action |= CONVRULE_CSS_ON_BIT;
32030
32031   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32032   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32033   ret = chxj_rencoding(&r, ret, &destlen);
32034   fprintf(stderr, "actual:[%s]\n", ret);
32035   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32036   CU_ASSERT(ret != NULL);
32037   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32038   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32039   CU_ASSERT(call_check == 0);
32040
32041   APR_TERM;
32042 #undef TEST_STRING
32043 #undef RESULT_STRING
32044 }
32045 void test_ixhtml10_nobr_tag_002()
32046 {
32047 #define  TEST_STRING   "<nobr>abc</nobr>"
32048 #define  RESULT_STRING "<nobr>abc</nobr>"
32049   char  *ret;
32050   char  *tmp;
32051   device_table spec;
32052   chxjconvrule_entry entry;
32053   cookie_t cookie;
32054   apr_size_t destlen;
32055   APR_INIT;
32056   chxj_serf_get = test_chxj_serf_get_span020;
32057   call_check = 0;
32058
32059   COOKIE_INIT(cookie);
32060
32061   SPEC_INIT(spec);
32062   destlen = sizeof(TEST_STRING)-1;
32063   entry.action |= CONVRULE_CSS_ON_BIT;
32064
32065   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32066   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32067   ret = chxj_rencoding(&r, ret, &destlen);
32068   fprintf(stderr, "actual:[%s]\n", ret);
32069   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32070   CU_ASSERT(ret != NULL);
32071   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32072   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32073   CU_ASSERT(call_check == 0);
32074
32075   APR_TERM;
32076 #undef TEST_STRING
32077 #undef RESULT_STRING
32078 }
32079
32080
32081 /* small */
32082 void test_ixhtml10_small_tag_001()
32083 {
32084 #define  TEST_STRING   "<small></small>"
32085 #define  RESULT_STRING "<small></small>"
32086   char  *ret;
32087   char  *tmp;
32088   device_table spec;
32089   chxjconvrule_entry entry;
32090   cookie_t cookie;
32091   apr_size_t destlen;
32092   APR_INIT;
32093   chxj_serf_get = test_chxj_serf_get_span020;
32094   call_check = 0;
32095
32096   COOKIE_INIT(cookie);
32097
32098   SPEC_INIT(spec);
32099   destlen = sizeof(TEST_STRING)-1;
32100   entry.action |= CONVRULE_CSS_ON_BIT;
32101
32102   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32103   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32104   ret = chxj_rencoding(&r, ret, &destlen);
32105   fprintf(stderr, "actual:[%s]\n", ret);
32106   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32107   CU_ASSERT(ret != NULL);
32108   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32109   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32110   CU_ASSERT(call_check == 0);
32111
32112   APR_TERM;
32113 #undef TEST_STRING
32114 #undef RESULT_STRING
32115 }
32116 void test_ixhtml10_small_tag_002()
32117 {
32118 #define  TEST_STRING   "<small>abc</small>"
32119 #define  RESULT_STRING "<small>abc</small>"
32120   char  *ret;
32121   char  *tmp;
32122   device_table spec;
32123   chxjconvrule_entry entry;
32124   cookie_t cookie;
32125   apr_size_t destlen;
32126   APR_INIT;
32127   chxj_serf_get = test_chxj_serf_get_span020;
32128   call_check = 0;
32129
32130   COOKIE_INIT(cookie);
32131
32132   SPEC_INIT(spec);
32133   destlen = sizeof(TEST_STRING)-1;
32134   entry.action |= CONVRULE_CSS_ON_BIT;
32135
32136   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32137   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32138   ret = chxj_rencoding(&r, ret, &destlen);
32139   fprintf(stderr, "actual:[%s]\n", ret);
32140   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32141   CU_ASSERT(ret != NULL);
32142   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32143   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32144   CU_ASSERT(call_check == 0);
32145
32146   APR_TERM;
32147 #undef TEST_STRING
32148 #undef RESULT_STRING
32149 }
32150
32151 /* span */
32152 void test_ixhtml10_span_tag_001()
32153 {
32154 #define  TEST_STRING   "<span></span>"
32155 #define  RESULT_STRING "<span></span>"
32156   char  *ret;
32157   char  *tmp;
32158   device_table spec;
32159   chxjconvrule_entry entry;
32160   cookie_t cookie;
32161   apr_size_t destlen;
32162   APR_INIT;
32163   chxj_serf_get = test_chxj_serf_get_span020;
32164   call_check = 0;
32165
32166   COOKIE_INIT(cookie);
32167
32168   SPEC_INIT(spec);
32169   destlen = sizeof(TEST_STRING)-1;
32170   entry.action |= CONVRULE_CSS_ON_BIT;
32171
32172   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32173   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32174   ret = chxj_rencoding(&r, ret, &destlen);
32175   fprintf(stderr, "actual:[%s]\n", ret);
32176   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32177   CU_ASSERT(ret != NULL);
32178   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32179   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32180   CU_ASSERT(call_check == 0);
32181
32182   APR_TERM;
32183 #undef TEST_STRING
32184 #undef RESULT_STRING
32185 }
32186 void test_ixhtml10_span_tag_002()
32187 {
32188 #define  TEST_STRING   "<span>abc</span>"
32189 #define  RESULT_STRING "<span>abc</span>"
32190   char  *ret;
32191   char  *tmp;
32192   device_table spec;
32193   chxjconvrule_entry entry;
32194   cookie_t cookie;
32195   apr_size_t destlen;
32196   APR_INIT;
32197   chxj_serf_get = test_chxj_serf_get_span020;
32198   call_check = 0;
32199
32200   COOKIE_INIT(cookie);
32201
32202   SPEC_INIT(spec);
32203   destlen = sizeof(TEST_STRING)-1;
32204   entry.action |= CONVRULE_CSS_ON_BIT;
32205
32206   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32207   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32208   ret = chxj_rencoding(&r, ret, &destlen);
32209   fprintf(stderr, "actual:[%s]\n", ret);
32210   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32211   CU_ASSERT(ret != NULL);
32212   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32213   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32214   CU_ASSERT(call_check == 0);
32215
32216   APR_TERM;
32217 #undef TEST_STRING
32218 #undef RESULT_STRING
32219 }
32220 void test_ixhtml10_th_tag_001()
32221 {
32222 #define  TEST_STRING   "<th>abc</th>"
32223 #define  RESULT_STRING "abc"
32224   char  *ret;
32225   char  *tmp;
32226   device_table spec;
32227   chxjconvrule_entry entry;
32228   cookie_t cookie;
32229   apr_size_t destlen;
32230   APR_INIT;
32231   chxj_serf_get = test_chxj_serf_get_span020;
32232   call_check = 0;
32233
32234   COOKIE_INIT(cookie);
32235
32236   SPEC_INIT(spec);
32237   destlen = sizeof(TEST_STRING)-1;
32238   entry.action |= CONVRULE_CSS_ON_BIT;
32239
32240   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32241   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32242   ret = chxj_rencoding(&r, ret, &destlen);
32243   fprintf(stderr, "actual:[%s]\n", ret);
32244   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32245   CU_ASSERT(ret != NULL);
32246   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32247   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32248   CU_ASSERT(call_check == 0);
32249
32250   APR_TERM;
32251 #undef TEST_STRING
32252 #undef RESULT_STRING
32253 }
32254 void test_ixhtml10_th_tag_002()
32255 {
32256 #define  TEST_STRING   "<th></th>"
32257 #define  RESULT_STRING "\n"
32258   char  *ret;
32259   char  *tmp;
32260   device_table spec;
32261   chxjconvrule_entry entry;
32262   cookie_t cookie;
32263   apr_size_t destlen;
32264   APR_INIT;
32265   chxj_serf_get = test_chxj_serf_get_span020;
32266   call_check = 0;
32267
32268   COOKIE_INIT(cookie);
32269
32270   SPEC_INIT(spec);
32271   destlen = sizeof(TEST_STRING)-1;
32272   entry.action |= CONVRULE_CSS_ON_BIT;
32273
32274   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32275   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32276   ret = chxj_rencoding(&r, ret, &destlen);
32277   fprintf(stderr, "actual:[%s]\n", ret);
32278   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32279   CU_ASSERT(ret != NULL);
32280   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32281   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32282   CU_ASSERT(call_check == 0);
32283
32284   APR_TERM;
32285 #undef TEST_STRING
32286 #undef RESULT_STRING
32287 }
32288
32289 void test_ixhtml10_b_tag_001()
32290 {
32291 #define  TEST_STRING   "<b>abc</b>"
32292 #define  RESULT_STRING "abc"
32293   char  *ret;
32294   char  *tmp;
32295   device_table spec;
32296   chxjconvrule_entry entry;
32297   cookie_t cookie;
32298   apr_size_t destlen;
32299   APR_INIT;
32300   chxj_serf_get = test_chxj_serf_get_span020;
32301   call_check = 0;
32302
32303   COOKIE_INIT(cookie);
32304
32305   SPEC_INIT(spec);
32306   destlen = sizeof(TEST_STRING)-1;
32307   entry.action |= CONVRULE_CSS_ON_BIT;
32308
32309   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32310   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32311   ret = chxj_rencoding(&r, ret, &destlen);
32312   fprintf(stderr, "actual:[%s]\n", ret);
32313   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32314   CU_ASSERT(ret != NULL);
32315   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32316   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32317   CU_ASSERT(call_check == 0);
32318
32319   APR_TERM;
32320 #undef TEST_STRING
32321 #undef RESULT_STRING
32322 }
32323 void test_ixhtml10_b_tag_002()
32324 {
32325 #define  TEST_STRING   "<b></b>"
32326 #define  RESULT_STRING "\n"
32327   char  *ret;
32328   char  *tmp;
32329   device_table spec;
32330   chxjconvrule_entry entry;
32331   cookie_t cookie;
32332   apr_size_t destlen;
32333   APR_INIT;
32334   chxj_serf_get = test_chxj_serf_get_span020;
32335   call_check = 0;
32336
32337   COOKIE_INIT(cookie);
32338
32339   SPEC_INIT(spec);
32340   destlen = sizeof(TEST_STRING)-1;
32341   entry.action |= CONVRULE_CSS_ON_BIT;
32342
32343   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32344   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32345   ret = chxj_rencoding(&r, ret, &destlen);
32346   fprintf(stderr, "actual:[%s]\n", ret);
32347   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32348   CU_ASSERT(ret != NULL);
32349   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32350   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32351   CU_ASSERT(call_check == 0);
32352
32353   APR_TERM;
32354 #undef TEST_STRING
32355 #undef RESULT_STRING
32356 }
32357
32358 void test_ixhtml10_fieldset_tag_001()
32359 {
32360 #define  TEST_STRING   "<fieldset></fieldset>"
32361 #define  RESULT_STRING "\n"
32362   char  *ret;
32363   char  *tmp;
32364   device_table spec;
32365   chxjconvrule_entry entry;
32366   cookie_t cookie;
32367   apr_size_t destlen;
32368   APR_INIT;
32369   chxj_serf_get = test_chxj_serf_get_span020;
32370   call_check = 0;
32371
32372   COOKIE_INIT(cookie);
32373
32374   SPEC_INIT(spec);
32375   destlen = sizeof(TEST_STRING)-1;
32376   entry.action |= CONVRULE_CSS_ON_BIT;
32377
32378   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32379   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32380   ret = chxj_rencoding(&r, ret, &destlen);
32381   fprintf(stderr, "actual:[%s]\n", ret);
32382   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32383   CU_ASSERT(ret != NULL);
32384   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32385   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32386   CU_ASSERT(call_check == 0);
32387
32388   APR_TERM;
32389 #undef TEST_STRING
32390 #undef RESULT_STRING
32391 }
32392 void test_ixhtml10_fieldset_tag_002()
32393 {
32394 #define  TEST_STRING   "<fieldset>abc</fieldset>"
32395 #define  RESULT_STRING "abc"
32396   char  *ret;
32397   char  *tmp;
32398   device_table spec;
32399   chxjconvrule_entry entry;
32400   cookie_t cookie;
32401   apr_size_t destlen;
32402   APR_INIT;
32403   chxj_serf_get = test_chxj_serf_get_span020;
32404   call_check = 0;
32405
32406   COOKIE_INIT(cookie);
32407
32408   SPEC_INIT(spec);
32409   destlen = sizeof(TEST_STRING)-1;
32410   entry.action |= CONVRULE_CSS_ON_BIT;
32411
32412   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32413   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32414   ret = chxj_rencoding(&r, ret, &destlen);
32415   fprintf(stderr, "actual:[%s]\n", ret);
32416   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32417   CU_ASSERT(ret != NULL);
32418   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32419   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32420   CU_ASSERT(call_check == 0);
32421
32422   APR_TERM;
32423 #undef TEST_STRING
32424 #undef RESULT_STRING
32425 }
32426
32427 void test_ixhtml10_legend_tag_001()
32428 {
32429 #define  TEST_STRING   "<legend></legend>"
32430 #define  RESULT_STRING "\n"
32431   char  *ret;
32432   char  *tmp;
32433   device_table spec;
32434   chxjconvrule_entry entry;
32435   cookie_t cookie;
32436   apr_size_t destlen;
32437   APR_INIT;
32438   chxj_serf_get = test_chxj_serf_get_span020;
32439   call_check = 0;
32440
32441   COOKIE_INIT(cookie);
32442
32443   SPEC_INIT(spec);
32444   destlen = sizeof(TEST_STRING)-1;
32445   entry.action |= CONVRULE_CSS_ON_BIT;
32446
32447   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32448   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32449   ret = chxj_rencoding(&r, ret, &destlen);
32450   fprintf(stderr, "actual:[%s]\n", ret);
32451   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32452   CU_ASSERT(ret != NULL);
32453   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32454   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32455   CU_ASSERT(call_check == 0);
32456
32457   APR_TERM;
32458 #undef TEST_STRING
32459 #undef RESULT_STRING
32460 }
32461 void test_ixhtml10_legend_tag_002()
32462 {
32463 #define  TEST_STRING   "<legend>abc</legend>"
32464 #define  RESULT_STRING "abc"
32465   char  *ret;
32466   char  *tmp;
32467   device_table spec;
32468   chxjconvrule_entry entry;
32469   cookie_t cookie;
32470   apr_size_t destlen;
32471   APR_INIT;
32472   chxj_serf_get = test_chxj_serf_get_span020;
32473   call_check = 0;
32474
32475   COOKIE_INIT(cookie);
32476
32477   SPEC_INIT(spec);
32478   destlen = sizeof(TEST_STRING)-1;
32479   entry.action |= CONVRULE_CSS_ON_BIT;
32480
32481   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32482   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32483   ret = chxj_rencoding(&r, ret, &destlen);
32484   fprintf(stderr, "actual:[%s]\n", ret);
32485   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32486   CU_ASSERT(ret != NULL);
32487   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32488   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32489   CU_ASSERT(call_check == 0);
32490
32491   APR_TERM;
32492 #undef TEST_STRING
32493 #undef RESULT_STRING
32494 }
32495
32496
32497 void test_ixhtml10_label_tag_001()
32498 {
32499 #define  TEST_STRING   "<label></label>"
32500 #define  RESULT_STRING "\n"
32501   char  *ret;
32502   char  *tmp;
32503   device_table spec;
32504   chxjconvrule_entry entry;
32505   cookie_t cookie;
32506   apr_size_t destlen;
32507   APR_INIT;
32508   chxj_serf_get = test_chxj_serf_get_span020;
32509   call_check = 0;
32510
32511   COOKIE_INIT(cookie);
32512
32513   SPEC_INIT(spec);
32514   destlen = sizeof(TEST_STRING)-1;
32515   entry.action |= CONVRULE_CSS_ON_BIT;
32516
32517   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32518   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32519   ret = chxj_rencoding(&r, ret, &destlen);
32520   fprintf(stderr, "actual:[%s]\n", ret);
32521   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32522   CU_ASSERT(ret != NULL);
32523   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32524   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32525   CU_ASSERT(call_check == 0);
32526
32527   APR_TERM;
32528 #undef TEST_STRING
32529 #undef RESULT_STRING
32530 }
32531 void test_ixhtml10_label_tag_002()
32532 {
32533 #define  TEST_STRING   "<label>abc</label>"
32534 #define  RESULT_STRING "abc"
32535   char  *ret;
32536   char  *tmp;
32537   device_table spec;
32538   chxjconvrule_entry entry;
32539   cookie_t cookie;
32540   apr_size_t destlen;
32541   APR_INIT;
32542   chxj_serf_get = test_chxj_serf_get_span020;
32543   call_check = 0;
32544
32545   COOKIE_INIT(cookie);
32546
32547   SPEC_INIT(spec);
32548   destlen = sizeof(TEST_STRING)-1;
32549   entry.action |= CONVRULE_CSS_ON_BIT;
32550
32551   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32552   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32553   ret = chxj_rencoding(&r, ret, &destlen);
32554   fprintf(stderr, "actual:[%s]\n", ret);
32555   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32556   CU_ASSERT(ret != NULL);
32557   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32558   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32559   CU_ASSERT(call_check == 0);
32560
32561   APR_TERM;
32562 #undef TEST_STRING
32563 #undef RESULT_STRING
32564 }
32565
32566 void test_ixhtml10_nlmark_001()
32567 {
32568 #define  TEST_STRING   "<div>\n</div>"
32569 #define  RESULT_STRING "<div></div>"
32570   char  *ret;
32571   char  *tmp;
32572   device_table spec;
32573   chxjconvrule_entry entry;
32574   cookie_t cookie;
32575   apr_size_t destlen;
32576   APR_INIT;
32577   chxj_serf_get = test_chxj_serf_get_span020;
32578   call_check = 0;
32579
32580   COOKIE_INIT(cookie);
32581
32582   SPEC_INIT(spec);
32583   destlen = sizeof(TEST_STRING)-1;
32584   entry.action |= CONVRULE_CSS_ON_BIT;
32585
32586   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32587   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32588   ret = chxj_rencoding(&r, ret, &destlen);
32589   fprintf(stderr, "actual:[%s]\n", ret);
32590   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32591   CU_ASSERT(ret != NULL);
32592   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32593   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32594   CU_ASSERT(call_check == 0);
32595
32596   APR_TERM;
32597 #undef TEST_STRING
32598 #undef RESULT_STRING
32599 }
32600
32601 void test_ixhtml10_nlmark_002()
32602 {
32603 #define  TEST_STRING   "<div>\n</div>"
32604 #define  RESULT_STRING "<div>\r\n</div>"
32605   char  *ret;
32606   char  *tmp;
32607   device_table spec;
32608   chxjconvrule_entry entry;
32609   cookie_t cookie;
32610   apr_size_t destlen;
32611   APR_INIT;
32612   chxj_serf_get = test_chxj_serf_get_span020;
32613   call_check = 0;
32614
32615   COOKIE_INIT(cookie);
32616
32617   SPEC_INIT(spec);
32618   destlen = sizeof(TEST_STRING)-1;
32619   entry.action |= CONVRULE_CSS_ON_BIT;
32620
32621   v_new_line_type = NLTYPE_CRLF;
32622
32623   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32624   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32625   ret = chxj_rencoding(&r, ret, &destlen);
32626   fprintf(stderr, "actual:[%s]\n", ret);
32627   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32628   fprintf(stderr, "nltype:[%d]\n", v_new_line_type);
32629   CU_ASSERT(ret != NULL);
32630   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32631   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32632   CU_ASSERT(call_check == 0);
32633
32634   APR_TERM;
32635 #undef TEST_STRING
32636 #undef RESULT_STRING
32637 }
32638 void test_ixhtml10_nlmark_003()
32639 {
32640 #define  TEST_STRING   "<div>\n</div>"
32641 #define  RESULT_STRING "<div>\r</div>"
32642   char  *ret;
32643   char  *tmp;
32644   device_table spec;
32645   chxjconvrule_entry entry;
32646   cookie_t cookie;
32647   apr_size_t destlen;
32648   APR_INIT;
32649   chxj_serf_get = test_chxj_serf_get_span020;
32650   call_check = 0;
32651
32652   COOKIE_INIT(cookie);
32653
32654   SPEC_INIT(spec);
32655   destlen = sizeof(TEST_STRING)-1;
32656   entry.action |= CONVRULE_CSS_ON_BIT;
32657
32658   v_new_line_type = NLTYPE_CR;
32659
32660   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32661   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32662   ret = chxj_rencoding(&r, ret, &destlen);
32663   fprintf(stderr, "actual:[%s]\n", ret);
32664   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32665   fprintf(stderr, "nltype:[%d]\n", v_new_line_type);
32666   CU_ASSERT(ret != NULL);
32667   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32668   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32669   CU_ASSERT(call_check == 0);
32670
32671   APR_TERM;
32672 #undef TEST_STRING
32673 #undef RESULT_STRING
32674 }
32675
32676 void test_ixhtml10_nlmark_004()
32677 {
32678 #define  TEST_STRING   "<div>\n</div>"
32679 #define  RESULT_STRING "<div>\n</div>"
32680   char  *ret;
32681   char  *tmp;
32682   device_table spec;
32683   chxjconvrule_entry entry;
32684   cookie_t cookie;
32685   apr_size_t destlen;
32686   APR_INIT;
32687   chxj_serf_get = test_chxj_serf_get_span020;
32688   call_check = 0;
32689
32690   COOKIE_INIT(cookie);
32691
32692   SPEC_INIT(spec);
32693   destlen = sizeof(TEST_STRING)-1;
32694   entry.action |= CONVRULE_CSS_ON_BIT;
32695
32696   v_new_line_type = NLTYPE_LF;
32697
32698   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
32699   ret = chxj_convert_ixhtml10(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
32700   ret = chxj_rencoding(&r, ret, &destlen);
32701
32702   v_new_line_type = NLTYPE_NONE;
32703
32704   fprintf(stderr, "actual:[%s]\n", ret);
32705   fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
32706   fprintf(stderr, "nltype:[%d]\n", v_new_line_type);
32707   CU_ASSERT(ret != NULL);
32708   CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
32709   CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
32710   CU_ASSERT(call_check == 0);
32711
32712   APR_TERM;
32713 #undef TEST_STRING
32714 #undef RESULT_STRING
32715 }
32716 /*
32717  * vim:ts=2 et
32718  */