reftests: Add a reftest for recent widget path fix

The widget path code copies elements only in gtk_widget_path_copy() -
which is essentially unused - and in
gtk_widget_path_append_with_siblings() - which is used by GtkBox.

So stuff the widget we are testing in a GtkBox to reroduce the problem.
This commit is contained in:
Benjamin Otte 2014-07-22 03:04:01 +02:00
parent 5a3ebb4860
commit d66db441e3
4 changed files with 85 additions and 0 deletions

View File

@ -305,6 +305,9 @@ testdata = \
paned-undersized.css \
paned-undersized.ref.ui \
paned-undersized.ui \
pseudoclass-on-box.css \
pseudoclass-on-box.ref.ui \
pseudoclass-on-box.ui \
pseudoclass-on-parent.css \
pseudoclass-on-parent.ref.ui \
pseudoclass-on-parent.ui \

View File

@ -0,0 +1,7 @@
:active {
color: blue;
}
:active * {
color: red;
}

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.1 -->
<interface>
<requires lib="gtk+" version="3.12"/>
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<property name="type">popup</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkToggleButton" id="togglebutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="active">True</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">I should be red.</property>
<attributes>
<attribute name="foreground" value="#ffff00000000"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.1 -->
<interface>
<requires lib="gtk+" version="3.12"/>
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<property name="type">popup</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkToggleButton" id="togglebutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="active">True</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">I should be red.</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
</interface>