From a3f393f69363ea663bee9ff9ad8c950b8bbdc8c9 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Mon, 25 Nov 2013 01:22:19 +0200 Subject: sniffing: test that it allows leading whitespace in doctype headers https://bugzilla.gnome.org/show_bug.cgi?id=715126 --- tests/resources/leading_space.html | 12 ++++++++++++ tests/sniffing-test.c | 3 +++ tests/soup-tests.gresource.xml | 1 + 3 files changed, 16 insertions(+) create mode 100644 tests/resources/leading_space.html diff --git a/tests/resources/leading_space.html b/tests/resources/leading_space.html new file mode 100644 index 00000000..a640d653 --- /dev/null +++ b/tests/resources/leading_space.html @@ -0,0 +1,12 @@ + + + + + + + + + +

GNOME!

+ + diff --git a/tests/sniffing-test.c b/tests/sniffing-test.c index a8bc3ffc..2dc9fb2c 100644 --- a/tests/sniffing-test.c +++ b/tests/sniffing-test.c @@ -524,6 +524,9 @@ main (int argc, char **argv) g_test_add_data_func ("/sniffing/type/unknown-binary", "unknown/text_binary.txt => application/octet-stream", do_sniffing_test); + g_test_add_data_func ("/sniffing/type/unknown-leading-space", + "unknown/leading_space.html => text/html", + do_sniffing_test); /* Test the XML sniffing path */ g_test_add_data_func ("/sniffing/type/xml", diff --git a/tests/soup-tests.gresource.xml b/tests/soup-tests.gresource.xml index 2fe21ddc..d24a04b0 100644 --- a/tests/soup-tests.gresource.xml +++ b/tests/soup-tests.gresource.xml @@ -5,6 +5,7 @@ resources/atom.xml resources/home.gif resources/html_binary.html + resources/leading_space.html resources/mbox resources/mbox.gz resources/mbox.raw -- cgit v1.2.1