forked from AuroraMiddleware/gtk
reftests: add a reftest for the CSS :only-child selector
https://bugzilla.gnome.org/show_bug.cgi?id=660833
This commit is contained in:
parent
1f2cfb5619
commit
b928664471
@ -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 \
|
||||
|
9
tests/reftests/style-properties-only-child.css
Normal file
9
tests/reftests/style-properties-only-child.css
Normal 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;
|
||||
}
|
32
tests/reftests/style-properties-only-child.ref.ui
Normal file
32
tests/reftests/style-properties-only-child.ref.ui
Normal 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>
|
32
tests/reftests/style-properties-only-child.ui
Normal file
32
tests/reftests/style-properties-only-child.ui
Normal 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>
|
Loading…
Reference in New Issue
Block a user