diff options
author | Gustavo Noronha Silva <gns@gnome.org> | 2013-12-10 17:17:40 +0100 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-02-17 12:22:22 -0500 |
commit | 26a65181db0b1fc3eb97748a5e3d9ceeecdc62e3 (patch) | |
tree | be860eeb83a20700f6290ea3866264871aaed61f /tests | |
parent | cd4f6a94f9275670091326a5aec8a07bce7f8d79 (diff) | |
download | libsoup-26a65181db0b1fc3eb97748a5e3d9ceeecdc62e3.tar.gz |
sniffing: Bring image sniffing up-to-date with the MIMESNIFF spec
Diffstat (limited to 'tests')
-rw-r--r-- | tests/resources/home.jpg | bin | 0 -> 1074 bytes | |||
-rw-r--r-- | tests/resources/home.png | bin | 0 -> 313 bytes | |||
-rw-r--r-- | tests/resources/tux.webp | bin | 0 -> 17128 bytes | |||
-rw-r--r-- | tests/sniffing-test.c | 11 | ||||
-rw-r--r-- | tests/soup-tests.gresource.xml | 3 |
5 files changed, 13 insertions, 1 deletions
diff --git a/tests/resources/home.jpg b/tests/resources/home.jpg Binary files differnew file mode 100644 index 00000000..ac1f3bbc --- /dev/null +++ b/tests/resources/home.jpg diff --git a/tests/resources/home.png b/tests/resources/home.png Binary files differnew file mode 100644 index 00000000..0bb82bac --- /dev/null +++ b/tests/resources/home.png diff --git a/tests/resources/tux.webp b/tests/resources/tux.webp Binary files differnew file mode 100644 index 00000000..8764f066 --- /dev/null +++ b/tests/resources/tux.webp diff --git a/tests/sniffing-test.c b/tests/sniffing-test.c index 498df976..868b7c5f 100644 --- a/tests/sniffing-test.c +++ b/tests/sniffing-test.c @@ -554,9 +554,18 @@ main (int argc, char **argv) do_sniffing_test); /* Test the image sniffing path */ - g_test_add_data_func ("/sniffing/type/image", + g_test_add_data_func ("/sniffing/type/image/gif", "type/image_png/home.gif => image/gif", do_sniffing_test); + g_test_add_data_func ("/sniffing/type/image/png", + "type/image_gif/home.png => image/png", + do_sniffing_test); + g_test_add_data_func ("/sniffing/type/image/jpeg", + "type/image_png/home.jpg => image/jpeg", + do_sniffing_test); + g_test_add_data_func ("/sniffing/type/image/webp", + "type/image_png/tux.webp => image/webp", + do_sniffing_test); /* The spec tells us to only use the last Content-Type header */ g_test_add_data_func ("/sniffing/multiple-headers", diff --git a/tests/soup-tests.gresource.xml b/tests/soup-tests.gresource.xml index 320cd63d..444ed588 100644 --- a/tests/soup-tests.gresource.xml +++ b/tests/soup-tests.gresource.xml @@ -5,6 +5,8 @@ <file>resources/atom.xml</file> <file>resources/feed.rdf</file> <file>resources/home.gif</file> + <file>resources/home.jpg</file> + <file>resources/home.png</file> <file>resources/html_binary.html</file> <file>resources/leading_space.html</file> <file>resources/mbox</file> @@ -16,5 +18,6 @@ <file>resources/test.html</file> <file>resources/text.txt</file> <file>resources/text_binary.txt</file> + <file>resources/tux.webp</file> </gresource> </gresources> |