~ubuntu-branches/ubuntu/trusty/librsvg/trusty-proposed

« back to all changes in this revision

Viewing changes to tests/styles.c

  • Committer: Package Import Robot
  • Author(s): Michael Biebl, Michael Biebl, Laurent Bigonville
  • Date: 2013-10-21 13:58:34 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20131021135834-rrvvy5hm5amr838j
Tags: 2.40.0-1
[ Michael Biebl ]
* New upstream release.
  - Fixes local resource access vulnerability. Closes: #724741
    CVE-2013-1881
* Refresh patches.
* GTK2 support has been removed upstream. Drop Build-Depends on
  libgtk2.0-dev, libgtk2.0-doc and the now obsolete --disable-gtk-theme
  configure switch.
* Bump Build-Depends on libgtk-3-dev to (>= 3.2.0).
* Bump Build-Depends on libpango1.0-dev to (>= 1.36.0) to get the
  thread-safe version.

[ Laurent Bigonville ]
* debian/control.in:
  - Use canonical URL for VCS-* fields
  - Update Homepage URL
  - Move source package to the "libs" Section
  - Remove duplicate Section, thanks to lintian

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
assert_equal_value (FixtureData *fixture, RsvgNode *node)
41
41
{
42
42
    if (g_str_equal (fixture->target_name, "stroke"))
43
 
        assert_equal_color (fixture->expected.color, node->state->stroke->core.colour->rgb);
 
43
        assert_equal_color (fixture->expected.color, node->state->stroke->core.colour->argb);
44
44
    else if (g_str_equal (fixture->target_name, "fill"))
45
 
        assert_equal_color (fixture->expected.color, node->state->fill->core.colour->rgb);
 
45
        assert_equal_color (fixture->expected.color, node->state->fill->core.colour->argb);
46
46
    else if (g_str_equal (fixture->target_name, "stroke-width"))
47
47
        assert_equal_length (&fixture->expected.length, &node->state->stroke_width);
48
48
    else
79
79
 
80
80
static const FixtureData fixtures[] =
81
81
{
82
 
    {"/styles/selectors/type", NULL, "styles/order.svg", "#black", "fill", .expected.color = 0x000000},
83
 
    {"/styles/selectors/class", NULL, "styles/order.svg", "#blue", "fill", .expected.color = 0x0000ff},
84
 
    {"/styles/selectors/#id", NULL, "styles/order.svg", "#brown", "fill", .expected.color = 0xa52a2a},
85
 
    {"/styles/selectors/style", NULL, "styles/order.svg", "#gray", "fill", .expected.color = 0x808080},
86
 
    {"/styles/selectors/style property prior than class", NULL, "styles/order.svg", "#red", "fill", .expected.color = 0xff0000},
87
 
    {"/styles/selectors/#id prior than class", NULL, "styles/order.svg", "#green", "fill", .expected.color = 0x008000},
88
 
    {"/styles/selectors/type#id prior than class", NULL, "styles/order.svg", "#pink", "fill", .expected.color = 0xffc0cb},
89
 
    {"/styles/selectors/class#id prior than class", NULL, "styles/order.svg", "#yellow", "fill", .expected.color = 0xffff00},
90
 
    {"/styles/selectors/type.class#id prior than class", NULL, "styles/order.svg", "#white", "fill", .expected.color = 0xffffff},
91
 
    {"/styles/selectors/#id prior than type", "418823", "styles/bug418823.svg", "#bla", "fill", .expected.color = 0x00ff00},
92
 
    {"/styles/selectors/comma-separate (fill)", "614643", "styles/bug614643.svg", "#red-rect", "fill", .expected.color = 0xff0000},
93
 
    {"/styles/selectors/comma-separete (stroke)", "614643", "styles/bug614643.svg", "#red-path", "stroke", .expected.color = 0xff0000},
94
 
    {"/styles/override presentation attribute", "614704", "styles/bug614704.svg", "#blue-rect", "fill", .expected.color = 0x0000ff},
95
 
    {"/styles/selectors/2 or more selectors (fill)", "592207", "styles/bug592207.svg", "#target", "fill", .expected.color = 0xff0000},
96
 
    {"/styles/selectors/2 or more selectors (stroke)", "592207", "styles/bug592207.svg", "#target", "stroke", .expected.color = 0x0000ff},
97
 
    {"/styles/svg-element-style", "615701", "styles/svg-class.svg", "#svg", "fill", .expected.color = 0x0000ff},
98
 
    {"/styles/presentation attribute in svg element", "620693", "styles/bug620693.svg", "#svg", "stroke", .expected.color = 0xff0000},
99
 
    {"/styles/!important", "379629", "styles/bug379629.svg", "#base_shadow", "stroke", .expected.color = 0xffc0cb /* pink */},
 
82
    {"/styles/selectors/type", NULL, "styles/order.svg", "#black", "fill", .expected.color = 0xff000000},
 
83
    {"/styles/selectors/class", NULL, "styles/order.svg", "#blue", "fill", .expected.color = 0xff0000ff},
 
84
    {"/styles/selectors/#id", NULL, "styles/order.svg", "#brown", "fill", .expected.color = 0xffa52a2a},
 
85
    {"/styles/selectors/style", NULL, "styles/order.svg", "#gray", "fill", .expected.color = 0xff808080},
 
86
    {"/styles/selectors/style property prior than class", NULL, "styles/order.svg", "#red", "fill", .expected.color = 0xffff0000},
 
87
    {"/styles/selectors/#id prior than class", NULL, "styles/order.svg", "#green", "fill", .expected.color = 0xff008000},
 
88
    {"/styles/selectors/type#id prior than class", NULL, "styles/order.svg", "#pink", "fill", .expected.color = 0xffffc0cb},
 
89
    {"/styles/selectors/class#id prior than class", NULL, "styles/order.svg", "#yellow", "fill", .expected.color = 0xffffff00},
 
90
    {"/styles/selectors/type.class#id prior than class", NULL, "styles/order.svg", "#white", "fill", .expected.color = 0xffffffff},
 
91
    {"/styles/selectors/#id prior than type", "418823", "styles/bug418823.svg", "#bla", "fill", .expected.color = 0xff00ff00},
 
92
    {"/styles/selectors/comma-separate (fill)", "614643", "styles/bug614643.svg", "#red-rect", "fill", .expected.color = 0xffff0000},
 
93
    {"/styles/selectors/comma-separete (stroke)", "614643", "styles/bug614643.svg", "#red-path", "stroke", .expected.color = 0xffff0000},
 
94
    {"/styles/override presentation attribute", "614704", "styles/bug614704.svg", "#blue-rect", "fill", .expected.color = 0xff0000ff},
 
95
    {"/styles/selectors/2 or more selectors (fill)", "592207", "styles/bug592207.svg", "#target", "fill", .expected.color = 0xffff0000},
 
96
    {"/styles/selectors/2 or more selectors (stroke)", "592207", "styles/bug592207.svg", "#target", "stroke", .expected.color = 0xff0000ff},
 
97
    {"/styles/svg-element-style", "615701", "styles/svg-class.svg", "#svg", "fill", .expected.color = 0xff0000ff},
 
98
    {"/styles/presentation attribute in svg element", "620693", "styles/bug620693.svg", "#svg", "stroke", .expected.color = 0xffff0000},
 
99
    {"/styles/!important", "379629", "styles/bug379629.svg", "#base_shadow", "stroke", .expected.color = 0xffffc0cb /* pink */},
100
100
    {"/styles/!important", "379629", "styles/bug379629.svg", "#base_shadow", "stroke-width", .expected.length = {POINTS_LENGTH(5.), 'i'}},
101
 
    {"/styles/!important/class", "614606", "styles/bug614606.svg", "#path6306", "fill", .expected.color = 0xff0000 /* red */ },
102
 
    {"/styles/!important/element", "614606", "styles/bug614606.svg", "#path6308", "fill", .expected.color = 0x000000},
103
 
    {"/styles/!important/#id prior than class", NULL, "styles/important.svg", "#red", "fill", .expected.color = 0xff0000 },
104
 
    {"/styles/!important/class prior than type", NULL, "styles/important.svg", "#blue", "fill", .expected.color = 0x0000ff },
105
 
    {"/styles/!important/presentation attribute is invalid", NULL, "styles/important.svg", "#white", "fill", .expected.color = 0xffffff },
106
 
    {"/styles/!important/style prior than class", NULL, "styles/important.svg", "#pink", "fill", .expected.color = 0xffc0cb },
 
101
    {"/styles/!important/class", "614606", "styles/bug614606.svg", "#path6306", "fill", .expected.color = 0xffff0000 /* red */ },
 
102
    {"/styles/!important/element", "614606", "styles/bug614606.svg", "#path6308", "fill", .expected.color = 0xff000000},
 
103
    {"/styles/!important/#id prior than class", NULL, "styles/important.svg", "#red", "fill", .expected.color = 0xffff0000 },
 
104
    {"/styles/!important/class prior than type", NULL, "styles/important.svg", "#blue", "fill", .expected.color = 0xff0000ff },
 
105
    {"/styles/!important/presentation attribute is invalid", NULL, "styles/important.svg", "#white", "fill", .expected.color = 0xffffffff },
 
106
    {"/styles/!important/style prior than class", NULL, "styles/important.svg", "#pink", "fill", .expected.color = 0xffffc0cb },
107
107
    /* {"/styles/selectors/descendant", "338160", "styles/bug338160.svg", "#base_shadow", "stroke-width", .expected.length = {2., '\0'}}, */
108
108
};
109
109
static const gint n_fixtures = G_N_ELEMENTS (fixtures);