[librsvg: 7/8] Add test for CSS imports.



commit 3ea575883a273a19f9fd4f98c7d2a25ca236cd18
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Sep 26 18:40:22 2018 -0500

    Add test for CSS imports.
    
    We didn't have one at all!

 tests/Makefile.am                          |   1 +
 tests/fixtures/reftests/css-import-ref.png | Bin 0 -> 938 bytes
 tests/fixtures/reftests/css-import.css     |   1 +
 tests/fixtures/reftests/css-import.svg     |   7 +++++++
 4 files changed, 9 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 17227610..40ac1b51 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -77,6 +77,7 @@ dist_installed_test_data =                                            \
        $(wildcard $(srcdir)/fixtures/errors/*)                         \
        $(wildcard $(srcdir)/fixtures/infinite-loop/*)                  \
        $(wildcard $(srcdir)/fixtures/loading/*)                        \
+       $(wildcard $(srcdir)/fixtures/reftests/*.css)                   \
        $(wildcard $(srcdir)/fixtures/reftests/*.svg)                   \
        $(wildcard $(srcdir)/fixtures/reftests/*.png)                   \
        $(wildcard $(srcdir)/fixtures/reftests/bugs/*.svg)              \
diff --git a/tests/fixtures/reftests/css-import-ref.png b/tests/fixtures/reftests/css-import-ref.png
new file mode 100644
index 00000000..ca9f7883
Binary files /dev/null and b/tests/fixtures/reftests/css-import-ref.png differ
diff --git a/tests/fixtures/reftests/css-import.css b/tests/fixtures/reftests/css-import.css
new file mode 100644
index 00000000..c7037d76
--- /dev/null
+++ b/tests/fixtures/reftests/css-import.css
@@ -0,0 +1 @@
+.myrect{fill:green;}
diff --git a/tests/fixtures/reftests/css-import.svg b/tests/fixtures/reftests/css-import.svg
new file mode 100644
index 00000000..b4bb97db
--- /dev/null
+++ b/tests/fixtures/reftests/css-import.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"; viewBox="0 0 400 400">
+<style type="text/css">
+  @import url("css-import.css");
+</style>
+<rect class="myrect" x="10" y="10" width="100" height="100"/>
+</svg>


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