From 6d239cfba714fd11bd5e78d374aa182520c5819e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 10 Jan 2016 14:50:24 -0500 Subject: [PATCH] Add a css style test for adjacent states This test checks that the selector E:state + F works as expected. https://bugzilla.gnome.org/show_bug.cgi?id=722727 --- testsuite/css/style/Makefile.am | 11 ++--- testsuite/css/style/adjacent-states.css | 7 ++++ testsuite/css/style/adjacent-states.nodes | 13 ++++++ testsuite/css/style/adjacent-states.ui | 49 +++++++++++++++++++++++ 4 files changed, 75 insertions(+), 5 deletions(-) create mode 100644 testsuite/css/style/adjacent-states.css create mode 100644 testsuite/css/style/adjacent-states.nodes create mode 100644 testsuite/css/style/adjacent-states.ui diff --git a/testsuite/css/style/Makefile.am b/testsuite/css/style/Makefile.am index 04972af2e3..a89eb375aa 100644 --- a/testsuite/css/style/Makefile.am +++ b/testsuite/css/style/Makefile.am @@ -29,11 +29,12 @@ test_css_style_SOURCES = \ $(NULL) test_data = \ - currentcolor.ui currentcolor.css currentcolor.nodes \ - gradient.ui gradient.css gradient.nodes \ - inherit.ui inherit.css inherit.nodes \ - label.ui label.css label.nodes \ - nth-child.ui nth-child.css nth-child.nodes \ + adjacent-states.ui adjacent-states.css adjacent-states.nodes \ + currentcolor.ui currentcolor.css currentcolor.nodes \ + gradient.ui gradient.css gradient.nodes \ + inherit.ui inherit.css inherit.nodes \ + label.ui label.css label.nodes \ + nth-child.ui nth-child.css nth-child.nodes \ $(NULL) BUILT_SOURCES = resources.c diff --git a/testsuite/css/style/adjacent-states.css b/testsuite/css/style/adjacent-states.css new file mode 100644 index 0000000000..f29150bed8 --- /dev/null +++ b/testsuite/css/style/adjacent-states.css @@ -0,0 +1,7 @@ +checkbutton:checked + label { + color: red; +} + +checkbutton + label { + color: blue; +} diff --git a/testsuite/css/style/adjacent-states.nodes b/testsuite/css/style/adjacent-states.nodes new file mode 100644 index 0000000000..25c8e172f8 --- /dev/null +++ b/testsuite/css/style/adjacent-states.nodes @@ -0,0 +1,13 @@ +[window.background:dir(ltr)] + decoration:dir(ltr) + box.horizontal:dir(ltr) + box.horizontal:dir(ltr) + checkbutton:dir(ltr):checked + check:dir(ltr):checked + label#label1:dir(ltr) + color: rgb(255,0,0); /* adjacent-states.css:2:12 */ + box.horizontal:dir(ltr) + checkbutton:dir(ltr) + check:dir(ltr) + label#label2:dir(ltr) + color: rgb(0,0,255); /* adjacent-states.css:6:13 */ diff --git a/testsuite/css/style/adjacent-states.ui b/testsuite/css/style/adjacent-states.ui new file mode 100644 index 0000000000..bf2a75520a --- /dev/null +++ b/testsuite/css/style/adjacent-states.ui @@ -0,0 +1,49 @@ + + + + + False + popup + + + True + + + True + + + True + True + + + + + True + label1 + Hello World! + + + + + + + True + + + True + False + + + + + True + label2 + Hello World! + + + + + + + +