reftests: add a reftest for the CSS :only-child selector

https://bugzilla.gnome.org/show_bug.cgi?id=660833
This commit is contained in:
Cosimo Cecchi 2011-10-04 11:46:25 -04:00
parent 1f2cfb5619
commit b928664471
4 changed files with 76 additions and 0 deletions

View File

@ -152,6 +152,9 @@ EXTRA_DIST += \
style-properties-nth-child.css \
style-properties-nth-child.ref.ui \
style-properties-nth-child.ui \
style-properties-only-child.css \
style-properties-only-child.ref.ui \
style-properties-only-child.ui \
toplevel-vs-popup.ref.ui \
toplevel-vs-popup.ui \
unresolvable.css \

View File

@ -0,0 +1,9 @@
.only-child-ref:nth-child(first):nth-child(last) {
color: blue;
background-color: red;
}
.only-child-notref:only-child {
color: blue;
background-color: red;
}

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<property name="type">popup</property>
<property name="width_request">300</property>
<property name="height_request">300</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="GtkButton" id="button1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label">Foo</property>
<style>
<class name="only-child-ref"/>
</style>
</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,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<property name="type">popup</property>
<property name="width_request">300</property>
<property name="height_request">300</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="GtkButton" id="button1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label">Foo</property>
<style>
<class name="only-child-notref"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
</interface>