void test_jhtml_img_tag_with_css_008();
void test_jhtml_img_tag_with_css_009();
void test_jhtml_img_tag_with_css_010();
+
+
+void test_jhtml_div_tag_with_css_001();
+void test_jhtml_div_tag_with_css_002();
+void test_jhtml_div_tag_with_css_003();
+void test_jhtml_div_tag_with_css_004();
+void test_jhtml_div_tag_with_css_005();
+void test_jhtml_div_tag_with_css_006();
+void test_jhtml_div_tag_with_css_007();
+void test_jhtml_div_tag_with_css_008();
+void test_jhtml_div_tag_with_css_009();
+void test_jhtml_div_tag_with_css_010();
+void test_jhtml_div_tag_with_css_011();
+void test_jhtml_div_tag_with_css_012();
+void test_jhtml_div_tag_with_css_013();
+void test_jhtml_div_tag_with_css_014();
+void test_jhtml_div_tag_with_css_015();
+void test_jhtml_div_tag_with_css_016();
+void test_jhtml_div_tag_with_css_017();
+void test_jhtml_div_tag_with_css_018();
+void test_jhtml_div_tag_with_css_019();
+void test_jhtml_div_tag_with_css_020();
+void test_jhtml_div_tag_with_css_021();
+void test_jhtml_div_tag_with_css_022();
+void test_jhtml_div_tag_with_css_023();
+void test_jhtml_div_tag_with_css_024();
+void test_jhtml_div_tag_with_css_025();
+void test_jhtml_div_tag_with_css_026();
+void test_jhtml_div_tag_with_css_027();
+void test_jhtml_div_tag_with_css_028();
+void test_jhtml_div_tag_with_css_029();
+void test_jhtml_div_tag_with_css_030();
+void test_jhtml_div_tag_with_css_031();
+void test_jhtml_div_tag_with_css_032();
+void test_jhtml_div_tag_with_css_033();
+void test_jhtml_div_tag_with_css_034();
+void test_jhtml_div_tag_with_css_035();
+void test_jhtml_div_tag_with_css_036();
+void test_jhtml_div_tag_with_css_037();
+void test_jhtml_div_tag_with_css_038();
+void test_jhtml_div_tag_with_css_039();
+void test_jhtml_div_tag_with_css_040();
+void test_jhtml_div_tag_with_css_041();
+void test_jhtml_div_tag_with_css_042();
/* pend */
int
CU_add_test(jhtml_suite, "test img with css 008", test_jhtml_img_tag_with_css_008);
CU_add_test(jhtml_suite, "test img with css 009", test_jhtml_img_tag_with_css_009);
CU_add_test(jhtml_suite, "test img with css 010", test_jhtml_img_tag_with_css_010);
+
+ CU_add_test(jhtml_suite, "test div with css 001", test_jhtml_div_tag_with_css_001);
+ CU_add_test(jhtml_suite, "test div with css 002", test_jhtml_div_tag_with_css_002);
+ CU_add_test(jhtml_suite, "test div with css 003", test_jhtml_div_tag_with_css_003);
+ CU_add_test(jhtml_suite, "test div with css 004", test_jhtml_div_tag_with_css_004);
+ CU_add_test(jhtml_suite, "test div with css 005", test_jhtml_div_tag_with_css_005);
+ CU_add_test(jhtml_suite, "test div with css 006", test_jhtml_div_tag_with_css_006);
+ CU_add_test(jhtml_suite, "test div with css 007", test_jhtml_div_tag_with_css_007);
+ CU_add_test(jhtml_suite, "test div with css 008", test_jhtml_div_tag_with_css_008);
+ CU_add_test(jhtml_suite, "test div with css 009", test_jhtml_div_tag_with_css_009);
+ CU_add_test(jhtml_suite, "test div with css 010", test_jhtml_div_tag_with_css_010);
+ CU_add_test(jhtml_suite, "test div with css 011", test_jhtml_div_tag_with_css_011);
+ CU_add_test(jhtml_suite, "test div with css 012", test_jhtml_div_tag_with_css_012);
+ CU_add_test(jhtml_suite, "test div with css 013", test_jhtml_div_tag_with_css_013);
+ CU_add_test(jhtml_suite, "test div with css 014", test_jhtml_div_tag_with_css_014);
+ CU_add_test(jhtml_suite, "test div with css 015", test_jhtml_div_tag_with_css_015);
+ CU_add_test(jhtml_suite, "test div with css 016", test_jhtml_div_tag_with_css_016);
+ CU_add_test(jhtml_suite, "test div with css 017", test_jhtml_div_tag_with_css_017);
+ CU_add_test(jhtml_suite, "test div with css 018", test_jhtml_div_tag_with_css_018);
+ CU_add_test(jhtml_suite, "test div with css 019", test_jhtml_div_tag_with_css_019);
+ CU_add_test(jhtml_suite, "test div with css 020", test_jhtml_div_tag_with_css_020);
+ CU_add_test(jhtml_suite, "test div with css 021", test_jhtml_div_tag_with_css_021);
+ CU_add_test(jhtml_suite, "test div with css 022", test_jhtml_div_tag_with_css_022);
+ CU_add_test(jhtml_suite, "test div with css 023", test_jhtml_div_tag_with_css_023);
+ CU_add_test(jhtml_suite, "test div with css 024", test_jhtml_div_tag_with_css_024);
+ CU_add_test(jhtml_suite, "test div with css 025", test_jhtml_div_tag_with_css_025);
+ CU_add_test(jhtml_suite, "test div with css 026", test_jhtml_div_tag_with_css_026);
+ CU_add_test(jhtml_suite, "test div with css 027", test_jhtml_div_tag_with_css_027);
+ CU_add_test(jhtml_suite, "test div with css 028", test_jhtml_div_tag_with_css_028);
+ CU_add_test(jhtml_suite, "test div with css 029", test_jhtml_div_tag_with_css_029);
+ CU_add_test(jhtml_suite, "test div with css 030", test_jhtml_div_tag_with_css_030);
+ CU_add_test(jhtml_suite, "test div with css 031", test_jhtml_div_tag_with_css_031);
+ CU_add_test(jhtml_suite, "test div with css 032", test_jhtml_div_tag_with_css_032);
+ CU_add_test(jhtml_suite, "test div with css 033", test_jhtml_div_tag_with_css_033);
+ CU_add_test(jhtml_suite, "test div with css 034", test_jhtml_div_tag_with_css_034);
+ CU_add_test(jhtml_suite, "test div with css 035", test_jhtml_div_tag_with_css_035);
+ CU_add_test(jhtml_suite, "test div with css 036", test_jhtml_div_tag_with_css_036);
+ CU_add_test(jhtml_suite, "test div with css 037", test_jhtml_div_tag_with_css_037);
+ CU_add_test(jhtml_suite, "test div with css 038", test_jhtml_div_tag_with_css_038);
+ CU_add_test(jhtml_suite, "test div with css 039", test_jhtml_div_tag_with_css_039);
+ CU_add_test(jhtml_suite, "test div with css 040", test_jhtml_div_tag_with_css_040);
+ CU_add_test(jhtml_suite, "test div with css 041", test_jhtml_div_tag_with_css_041);
+ CU_add_test(jhtml_suite, "test div with css 042", test_jhtml_div_tag_with_css_042);
/* aend */
CU_basic_run_tests();
void test_jhtml_div_tag_001()
{
#define TEST_STRING "<html><head></head><body><div></div></body></html>"
-#define RESULT_STRING "<html><head></head><body><div></div></body></html>"
+#define RESULT_STRING "<html><head></head><body></body></html>"
char *ret;
char *tmp;
device_table spec;
void test_jhtml_div_tag_005()
{
#define TEST_STRING "<html><head></head><body><div align=\"\"></div></body></html>"
-#define RESULT_STRING "<html><head></head><body><div></div></body></html>"
+#define RESULT_STRING "<html><head></head><body></body></html>"
char *ret;
char *tmp;
device_table spec;
void test_jhtml_div_tag_006()
{
#define TEST_STRING "<html><head></head><body><div align=\"abc\"></div></body></html>"
-#define RESULT_STRING "<html><head></head><body><div></div></body></html>"
+#define RESULT_STRING "<html><head></head><body></body></html>"
char *ret;
char *tmp;
device_table spec;
void test_jhtml_div_tag_007()
{
#define TEST_STRING "<html><head></head><body><div style=\"aaa\"></div></body></html>"
-#define RESULT_STRING "<html><head></head><body><div></div></body></html>"
+#define RESULT_STRING "<html><head></head><body></body></html>"
char *ret;
char *tmp;
device_table spec;
#undef TEST_STRING
#undef RESULT_STRING
}
+
+
+/*===========================================================================*/
+/* div tag with CSS */
+/*===========================================================================*/
+char *test_chxj_serf_get120(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"
+ "div { text-align:left }\n";
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_001()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><div align=\"left\">あいう</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_get120;
+ 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_jhtml(&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_jhtml_div_tag_with_css_002()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"text-align:left\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><div align=\"left\">あいう</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_get120;
+ 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_jhtml(&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_get121(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"
+ "div { text-align:center }\n";
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_003()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><div align=\"center\">あいう</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_get121;
+ 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_jhtml(&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_jhtml_div_tag_with_css_004()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"text-align:center\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><div align=\"center\">あいう</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_get121;
+ 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_jhtml(&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_get122(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"
+ "div { text-align:right }\n";
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_005()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><div align=\"right\">あいう</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_get122;
+ 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_jhtml(&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_jhtml_div_tag_with_css_006()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"text-align:right\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><div align=\"right\">あいう</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_get122;
+ 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_jhtml(&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_get123(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"
+ "div { color:#ff0000 }\n";
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_007()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font color=\"#ff0000\">あいう</font></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_get123;
+ 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_jhtml(&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_jhtml_div_tag_with_css_008()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"color:#ff0000\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font color=\"#ff0000\">あいう</font></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_get123;
+ 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_jhtml(&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_get124(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"
+ "div { text-decoration:blink }\n";
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_009()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><blink>あいう</blink></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_get124;
+ 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_jhtml(&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_jhtml_div_tag_with_css_010()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"text-decoration:blink\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><blink>あいう</blink></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_get124;
+ 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_jhtml(&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_get125(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"
+ "div { display:-wap-marquee }\n";
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_011()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee>あいう</marquee></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_get125;
+ 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_jhtml(&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_jhtml_div_tag_with_css_012()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"display:-wap-marquee\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee>あいう</marquee></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_get125;
+ 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_jhtml(&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_get126(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"
+ "div { display:-wap-marquee;\n"
+ " -wap-marquee-style: scroll; }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_013()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"scroll\">あいう</marquee></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_get126;
+ 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_jhtml(&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_jhtml_div_tag_with_css_014()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:scroll;\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"scroll\">あいう</marquee></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_get126;
+ 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_jhtml(&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_get127(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"
+ "div { display:-wap-marquee;\n"
+ " -wap-marquee-style: slide; }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_015()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"slide\">あいう</marquee></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_get127;
+ 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_jhtml(&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_jhtml_div_tag_with_css_016()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:slide;\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"slide\">あいう</marquee></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_get127;
+ 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_jhtml(&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_get128(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"
+ "div { display:-wap-marquee;\n"
+ " -wap-marquee-style: alternate }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_017()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"alternate\">あいう</marquee></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_get128;
+ 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_jhtml(&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_jhtml_div_tag_with_css_018()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"alternate\">あいう</marquee></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_get128;
+ 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_jhtml(&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_get129(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"
+ "div { display:-wap-marquee;\n"
+ " -wap-marquee-style: alternate;-wap-marquee-dir:ltr }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_019()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"alternate\" direction=\"right\">あいう</marquee></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_get129;
+ 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_jhtml(&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_jhtml_div_tag_with_css_020()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:ltr\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"alternate\" direction=\"right\">あいう</marquee></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_get129;
+ 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_jhtml(&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_get130(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"
+ "div { display:-wap-marquee;\n"
+ " -wap-marquee-style: alternate;-wap-marquee-dir:rtl }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_021()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"alternate\" direction=\"left\">あいう</marquee></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_get130;
+ 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_jhtml(&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_jhtml_div_tag_with_css_022()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"alternate\" direction=\"left\">あいう</marquee></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_get130;
+ 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_jhtml(&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_get131(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"
+ "div { display:-wap-marquee;\n"
+ " -wap-marquee-style: alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:1 }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_023()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"alternate\" direction=\"left\" loop=\"1\">あいう</marquee></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_get131;
+ 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_jhtml(&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_jhtml_div_tag_with_css_024()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:1\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"alternate\" direction=\"left\" loop=\"1\">あいう</marquee></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_get131;
+ 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_jhtml(&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_get132(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"
+ "div { display:-wap-marquee;\n"
+ " -wap-marquee-style: alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:16 }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_025()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"alternate\" direction=\"left\" loop=\"16\">あいう</marquee></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_get132;
+ 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_jhtml(&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_jhtml_div_tag_with_css_026()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:16\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"alternate\" direction=\"left\" loop=\"16\">あいう</marquee></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_get132;
+ 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_jhtml(&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_get133(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"
+ "div { display:-wap-marquee;\n"
+ " -wap-marquee-style: alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:infinite }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_027()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"alternate\" direction=\"left\" loop=\"16\">あいう</marquee></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_get133;
+ 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_jhtml(&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_jhtml_div_tag_with_css_028()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"display:-wap-marquee;-wap-marquee-style:alternate;-wap-marquee-dir:rtl;-wap-marquee-loop:infinite;\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><marquee behavior=\"alternate\" direction=\"left\" loop=\"16\">あいう</marquee></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_get133;
+ 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_jhtml(&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_get134(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"
+ "div { font-size:xx-small; }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_029()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font size=\"1\">あいう</font></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_get134;
+ 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_jhtml(&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_jhtml_div_tag_with_css_030()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"font-size:xx-small;\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font size=\"1\">あいう</font></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_get134;
+ 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_jhtml(&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_get135(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"
+ "div { font-size:x-small; }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_031()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font size=\"2\">あいう</font></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_get135;
+ 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_jhtml(&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_jhtml_div_tag_with_css_032()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"font-size:x-small;\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font size=\"2\">あいう</font></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_get135;
+ 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_jhtml(&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_get136(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"
+ "div { font-size:small; }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_033()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font size=\"3\">あいう</font></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_get136;
+ 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_jhtml(&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_jhtml_div_tag_with_css_034()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"font-size:small;\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font size=\"3\">あいう</font></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_get136;
+ 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_jhtml(&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_get137(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"
+ "div { font-size:medium; }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_035()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font size=\"4\">あいう</font></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_get137;
+ 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_jhtml(&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_jhtml_div_tag_with_css_036()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"font-size:medium;\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font size=\"4\">あいう</font></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_get137;
+ 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_jhtml(&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_get138(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"
+ "div { font-size:large; }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_037()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font size=\"5\">あいう</font></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_get138;
+ 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_jhtml(&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_jhtml_div_tag_with_css_038()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"font-size:large;\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font size=\"5\">あいう</font></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_get138;
+ 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_jhtml(&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_get139(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"
+ "div { font-size:x-large; }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_039()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font size=\"6\">あいう</font></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_get139;
+ 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_jhtml(&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_jhtml_div_tag_with_css_040()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"font-size:x-large;\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font size=\"6\">あいう</font></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_get139;
+ 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_jhtml(&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_get140(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"
+ "div { font-size:xx-large; }\n";
+
+ *len = strlen(css);
+ call_check = 1;
+ return css;
+}
+void test_jhtml_div_tag_with_css_041()
+{
+#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
+ "</head><body><div>あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font size=\"7\">あいう</font></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_get140;
+ 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_jhtml(&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_jhtml_div_tag_with_css_042()
+{
+#define TEST_STRING "<html><head>" \
+ "</head><body><div style=\"font-size:xx-large;\">あいう</div></body></html>"
+#define RESULT_STRING "<html><head></head><body><font size=\"7\">あいう</font></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_get140;
+ 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_jhtml(&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
*/