static char *
s_jxhtml_start_img_tag(void *pdoc, Node *node)
{
- jxhtml_t *jxhtml = GET_JXHTML(pdoc);
- Doc *doc = jxhtml->doc;
- request_rec *r = doc->r;
- Attr *attr;
+ jxhtml_t *jxhtml = GET_JXHTML(pdoc);
+ Doc *doc = jxhtml->doc;
+ request_rec *r = doc->r;
+ Attr *attr;
+ char *attr_src = NULL;
+ char *attr_height = NULL;
+ char *attr_width = NULL;
+ char *attr_align = NULL;
+ char *attr_alt = NULL;
+ char *attr_style = NULL;
#ifndef IMG_NOT_CONVERT_FILENAME
device_table *spec = jxhtml->spec;
#endif
- int has_alt = 0;
- W_L("<img");
/*--------------------------------------------------------------------------*/
/* Get Attributes */
/*--------------------------------------------------------------------------*/
"%s",
value);
}
- W_L(" src=\"");
- W_V(value);
- W_L("\"");
+ attr_src = value;
#else
value = chxj_img_conv(r, spec, value);
value = chxj_encoding_parameter(r, value);
"%s",
value);
}
- W_L(" src=\"");
- W_V(value);
- W_L("\"");
+ attr_src = value;
#endif
}
else if (STRCASEEQ('a','A',"align",name)) {
STRCASEEQ('b','B',"bottom",value) ||
STRCASEEQ('l','L',"left", value) ||
STRCASEEQ('r','R',"right", value)) {
- W_L(" align=\"");
- W_V(value);
- W_L("\"");
+ attr_align = value;
}
else if (STRCASEEQ('c','C',"center",value)) {
- W_L(" align=\"");
- W_L("middle");
- W_L("\"");
+ attr_align = apr_pstrdup(doc->pool, "middle");
}
}
}
/*----------------------------------------------------------------------*/
/* CHTML 1.0 */
/*----------------------------------------------------------------------*/
- W_L(" width=\"");
- W_V(value);
- W_L("\"");
+ attr_width = value;
}
else if (STRCASEEQ('h','H',"height",name) && value && *value) {
/*----------------------------------------------------------------------*/
/* CHTML 1.0 */
/*----------------------------------------------------------------------*/
- W_L(" height=\"");
- W_V(value);
- W_L("\"");
+ attr_height = value;
}
else if (STRCASEEQ('h','H',"hspace",name)) {
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
/* CHTML 1.0 */
/*----------------------------------------------------------------------*/
- W_L(" alt=\"");
- W_V(value);
- W_L("\"");
- has_alt = 1;
+ attr_alt = value;
+ }
+ else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+ /*----------------------------------------------------------------------*/
+ /* CHTML 1.0 */
+ /*----------------------------------------------------------------------*/
+ attr_style = value;
}
}
- if (! has_alt) {
+
+ if (IS_CSS_ON(jxhtml->entryp)) {
+ css_prop_list_t *style = s_jxhtml_nopush_and_get_now_style(pdoc, node, attr_style);
+ if (style) {
+ css_property_t *height_prop = chxj_css_get_property_value(doc, style, "height");
+ css_property_t *width_prop = chxj_css_get_property_value(doc, style, "width");
+ css_property_t *valign_prop = chxj_css_get_property_value(doc, style, "vertical-align");
+ css_property_t *cur;
+ for (cur = height_prop->next; cur != height_prop; cur = cur->next) {
+ attr_height = apr_pstrdup(doc->pool, cur->value);
+ }
+ for (cur = width_prop->next; cur != width_prop; cur = cur->next) {
+ attr_width = apr_pstrdup(doc->pool, cur->value);
+ }
+ for (cur = valign_prop->next; cur != valign_prop; cur = cur->next) {
+ attr_align = apr_pstrdup(doc->pool, cur->value);
+ }
+ }
+ }
+
+ W_L("<img");
+ if (attr_src) {
+ W_L(" src=\"");
+ W_V(attr_src);
+ W_L("\"");
+ }
+ if (attr_align) {
+ W_L(" align=\"");
+ W_V(attr_align);
+ W_L("\"");
+ }
+ if (attr_width) {
+ W_L(" width=\"");
+ W_V(attr_width);
+ W_L("\"");
+ }
+ if (attr_height) {
+ W_L(" height=\"");
+ W_V(attr_height);
+ W_L("\"");
+ }
+ if (attr_alt) {
+ W_L(" alt=\"");
+ W_V(attr_alt);
+ W_L("\"");
+ }
+ else {
W_L(" alt=\"\"");
}
W_L(" />");
void test_jxhtml_hr_tag_with_css_006();
void test_jxhtml_hr_tag_with_css_007();
void test_jxhtml_hr_tag_with_css_008();
+
+void test_jxhtml_img_tag_with_css_001();
+void test_jxhtml_img_tag_with_css_002();
+void test_jxhtml_img_tag_with_css_003();
+void test_jxhtml_img_tag_with_css_004();
+void test_jxhtml_img_tag_with_css_005();
+void test_jxhtml_img_tag_with_css_006();
+void test_jxhtml_img_tag_with_css_007();
+void test_jxhtml_img_tag_with_css_008();
+void test_jxhtml_img_tag_with_css_009();
+void test_jxhtml_img_tag_with_css_010();
/* pend */
int
CU_add_test(jxhtml_suite, "test hr with css 006", test_jxhtml_hr_tag_with_css_006);
CU_add_test(jxhtml_suite, "test hr with css 007", test_jxhtml_hr_tag_with_css_007);
CU_add_test(jxhtml_suite, "test hr with css 008", test_jxhtml_hr_tag_with_css_008);
+
+ CU_add_test(jxhtml_suite, "test img with css 001", test_jxhtml_img_tag_with_css_001);
+ CU_add_test(jxhtml_suite, "test img with css 002", test_jxhtml_img_tag_with_css_002);
+ CU_add_test(jxhtml_suite, "test img with css 003", test_jxhtml_img_tag_with_css_003);
+ CU_add_test(jxhtml_suite, "test img with css 004", test_jxhtml_img_tag_with_css_004);
+ CU_add_test(jxhtml_suite, "test img with css 005", test_jxhtml_img_tag_with_css_005);
+ CU_add_test(jxhtml_suite, "test img with css 006", test_jxhtml_img_tag_with_css_006);
+ CU_add_test(jxhtml_suite, "test img with css 007", test_jxhtml_img_tag_with_css_007);
+ CU_add_test(jxhtml_suite, "test img with css 008", test_jxhtml_img_tag_with_css_008);
+ CU_add_test(jxhtml_suite, "test img with css 009", test_jxhtml_img_tag_with_css_009);
+ CU_add_test(jxhtml_suite, "test img with css 010", test_jxhtml_img_tag_with_css_010);
/* aend */
CU_basic_run_tests();
#undef TEST_STRING
#undef RESULT_STRING
}
+
+
+
+/*---------------------------------------------------------------------------*/
+/* img tag with CSS */
+/*---------------------------------------------------------------------------*/
+char *test_chxj_serf_get110(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
+{
+ static char *css = "a:focus { display: none }\n"
+ "a:link { display: none }\n"
+ "a { display: none }\n"
+ "hr { display: none }\n"
+ "a:visited { display:none }\n"
+ "img { height:80% }\n";
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jxhtml_img_tag_with_css_001()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><img>あいう</body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
+ "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
+ "<html><head></head><body><div><img height=\"80%\" alt=\"\" />あいう</div></body></html>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+ chxj_serf_get = test_chxj_serf_get110;
+ call_check = 0;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+ entry.action |= CONVRULE_CSS_ON_BIT;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_convert_jxhtml(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+ CU_ASSERT(call_check == 1);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_jxhtml_img_tag_with_css_002()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><img style=\"height:10%\">あいう</body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
+ "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
+ "<html><head></head><body><div><img height=\"10%\" alt=\"\" />あいう</div></body></html>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+ chxj_serf_get = test_chxj_serf_get110;
+ call_check = 0;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+ entry.action |= CONVRULE_CSS_ON_BIT;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_convert_jxhtml(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+ CU_ASSERT(call_check == 0);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+char *test_chxj_serf_get111(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
+{
+ static char *css = "a:focus { display: none }\n"
+ "a:link { display: none }\n"
+ "a { display: none }\n"
+ "hr { display: none }\n"
+ "a:visited { display:none }\n"
+ "img { width:80% }\n";
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jxhtml_img_tag_with_css_003()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><img>あいう</body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
+ "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
+ "<html><head></head><body><div><img width=\"80%\" alt=\"\" />あいう</div></body></html>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+ chxj_serf_get = test_chxj_serf_get111;
+ call_check = 0;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+ entry.action |= CONVRULE_CSS_ON_BIT;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_convert_jxhtml(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+ CU_ASSERT(call_check == 1);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_jxhtml_img_tag_with_css_004()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><img style=\"width:10%\">あいう</body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
+ "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
+ "<html><head></head><body><div><img width=\"10%\" alt=\"\" />あいう</div></body></html>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+ chxj_serf_get = test_chxj_serf_get111;
+ call_check = 0;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+ entry.action |= CONVRULE_CSS_ON_BIT;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_convert_jxhtml(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+ CU_ASSERT(call_check == 0);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+char *test_chxj_serf_get112(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
+{
+ static char *css = "a:focus { display: none }\n"
+ "a:link { display: none }\n"
+ "a { display: none }\n"
+ "hr { display: none }\n"
+ "a:visited { display:none }\n"
+ "img { vertical-align:top }\n";
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jxhtml_img_tag_with_css_005()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><img>あいう</body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
+ "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
+ "<html><head></head><body><div><img align=\"top\" alt=\"\" />あいう</div></body></html>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+ chxj_serf_get = test_chxj_serf_get112;
+ call_check = 0;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+ entry.action |= CONVRULE_CSS_ON_BIT;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_convert_jxhtml(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+ CU_ASSERT(call_check == 1);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_jxhtml_img_tag_with_css_006()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><img style=\"vertical-align:top\">あいう</body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
+ "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
+ "<html><head></head><body><div><img align=\"top\" alt=\"\" />あいう</div></body></html>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+ chxj_serf_get = test_chxj_serf_get112;
+ call_check = 0;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+ entry.action |= CONVRULE_CSS_ON_BIT;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_convert_jxhtml(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+ CU_ASSERT(call_check == 0);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+char *test_chxj_serf_get113(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
+{
+ static char *css = "a:focus { display: none }\n"
+ "a:link { display: none }\n"
+ "a { display: none }\n"
+ "hr { display: none }\n"
+ "a:visited { display:none }\n"
+ "img { vertical-align:middle }\n";
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jxhtml_img_tag_with_css_007()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><img>あいう</body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
+ "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
+ "<html><head></head><body><div><img align=\"middle\" alt=\"\" />あいう</div></body></html>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+ chxj_serf_get = test_chxj_serf_get113;
+ call_check = 0;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+ entry.action |= CONVRULE_CSS_ON_BIT;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_convert_jxhtml(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+ CU_ASSERT(call_check == 1);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_jxhtml_img_tag_with_css_008()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><img style=\"vertical-align:middle\">あいう</body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
+ "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
+ "<html><head></head><body><div><img align=\"middle\" alt=\"\" />あいう</div></body></html>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+ chxj_serf_get = test_chxj_serf_get113;
+ call_check = 0;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+ entry.action |= CONVRULE_CSS_ON_BIT;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_convert_jxhtml(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+ CU_ASSERT(call_check == 0);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+char *test_chxj_serf_get114(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
+{
+ static char *css = "a:focus { display: none }\n"
+ "a:link { display: none }\n"
+ "a { display: none }\n"
+ "hr { display: none }\n"
+ "a:visited { display:none }\n"
+ "img { vertical-align:bottom }\n";
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jxhtml_img_tag_with_css_009()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><img>あいう</body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
+ "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
+ "<html><head></head><body><div><img align=\"bottom\" alt=\"\" />あいう</div></body></html>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+ chxj_serf_get = test_chxj_serf_get114;
+ call_check = 0;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+ entry.action |= CONVRULE_CSS_ON_BIT;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_convert_jxhtml(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+ CU_ASSERT(call_check == 1);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_jxhtml_img_tag_with_css_010()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><img style=\"vertical-align:bottom\">あいう</body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
+ "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
+ "<html><head></head><body><div><img align=\"bottom\" alt=\"\" />あいう</div></body></html>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+ chxj_serf_get = test_chxj_serf_get114;
+ call_check = 0;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+ entry.action |= CONVRULE_CSS_ON_BIT;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_convert_jxhtml(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+ CU_ASSERT(call_check == 0);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
/*
* vim:ts=2 et
*/