[libsoup: 5/10] sniffing: test that it allows leading whitespace in doctype headers
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup: 5/10] sniffing: test that it allows leading whitespace in doctype headers
- Date: Mon, 17 Feb 2014 17:29:56 +0000 (UTC)
commit a3f393f69363ea663bee9ff9ad8c950b8bbdc8c9
Author: Alberto Garcia <berto igalia com>
Date: Mon Nov 25 01:22:19 2013 +0200
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(+), 0 deletions(-)
---
diff --git a/tests/resources/leading_space.html b/tests/resources/leading_space.html
new file mode 100644
index 0000000..a640d65
--- /dev/null
+++ b/tests/resources/leading_space.html
@@ -0,0 +1,12 @@
+
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title></title>
+</head>
+<body>
+<h1>GNOME!</h1>
+</body>
+</html>
diff --git a/tests/sniffing-test.c b/tests/sniffing-test.c
index a8bc3ff..2dc9fb2 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 2fe21dd..d24a04b 100644
--- a/tests/soup-tests.gresource.xml
+++ b/tests/soup-tests.gresource.xml
@@ -5,6 +5,7 @@
<file>resources/atom.xml</file>
<file>resources/home.gif</file>
<file>resources/html_binary.html</file>
+ <file>resources/leading_space.html</file>
<file>resources/mbox</file>
<file>resources/mbox.gz</file>
<file>resources/mbox.raw</file>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]