[libsoup/content-sniffing-update: 5/9] soup-content-sniffer: test it allows leading whitespaces in doctype headers



commit 235116e6522fcd21c73e43bcfbaddaa6cf96f102
Author: Alberto Garcia <berto igalia com>
Date:   Mon Nov 25 01:22:19 2013 +0200

    soup-content-sniffer: test it allows leading whitespaces in doctype headers
    
    https://bugzilla.gnome.org/show_bug.cgi?id=715126

 tests/resources/leading_space.html |   12 ++++++++++++
 tests/sniffing-test.c              |    1 +
 2 files changed, 13 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 ab8dbf3..774dfdf 100644
--- a/tests/sniffing-test.c
+++ b/tests/sniffing-test.c
@@ -579,6 +579,7 @@ main (int argc, char **argv)
        test_sniffing ("/unknown/home.gif", "image/gif");
        test_sniffing ("/unknown/mbox", "text/plain");
        test_sniffing ("/unknown/text_binary.txt", "application/octet-stream");
+       test_sniffing ("/unknown/leading_space.html", "text/html");
 
        /* Test the XML sniffing path */
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]