From 564170f41bb82c57620541dc7f40bac32d63b4a6 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Thu, 29 Oct 2015 17:49:49 -0700 Subject: [PATCH] State restyle hint tests. This handles the state part of #6942. --- tests/wpt/mozilla/meta/MANIFEST.json | 24 ++++++++++ .../mozilla/tests/css/restyle_hints_state.css | 36 +++++++++++++++ .../tests/css/restyle_hints_state.html | 44 +++++++++++++++++++ .../tests/css/restyle_hints_state_ref.html | 19 ++++++++ 4 files changed, 123 insertions(+) create mode 100644 tests/wpt/mozilla/tests/css/restyle_hints_state.css create mode 100644 tests/wpt/mozilla/tests/css/restyle_hints_state.html create mode 100644 tests/wpt/mozilla/tests/css/restyle_hints_state_ref.html diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 2c07bd173f4..bc04fb431a2 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -2927,6 +2927,18 @@ "url": "/_mozilla/css/quotes_simple_a.html" } ], + "css/restyle_hints_state.html": [ + { + "path": "css/restyle_hints_state.html", + "references": [ + [ + "/_mozilla/css/restyle_hints_state_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/restyle_hints_state.html" + } + ], "css/root_height_a.html": [ { "path": "css/root_height_a.html", @@ -7560,6 +7572,18 @@ "url": "/_mozilla/css/quotes_simple_a.html" } ], + "css/restyle_hints_state.html": [ + { + "path": "css/restyle_hints_state.html", + "references": [ + [ + "/_mozilla/css/restyle_hints_state_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/restyle_hints_state.html" + } + ], "css/root_height_a.html": [ { "path": "css/root_height_a.html", diff --git a/tests/wpt/mozilla/tests/css/restyle_hints_state.css b/tests/wpt/mozilla/tests/css/restyle_hints_state.css new file mode 100644 index 00000000000..673ac25d572 --- /dev/null +++ b/tests/wpt/mozilla/tests/css/restyle_hints_state.css @@ -0,0 +1,36 @@ +fieldset { + width: 200px; +} + +div { + background-color: black; + padding: 10px; + width: 50px; + height: 50px; +} + +fieldset div { + background-color: red; +} +fieldset:enabled div { + color: aqua; + background-color: green; +} +fieldset:enabled > div { + background-color: yellow; +} +fieldset:enabled ~ div { + color: pink; + background-color: purple; +} +fieldset:enabled + div { + color: brown; + background-color: orange; +} + +input:checked:enabled + span { + color: khaki; +} +input:checked:disabled + span { + color: lawngreen; +} diff --git a/tests/wpt/mozilla/tests/css/restyle_hints_state.html b/tests/wpt/mozilla/tests/css/restyle_hints_state.html new file mode 100644 index 00000000000..52f82bc905d --- /dev/null +++ b/tests/wpt/mozilla/tests/css/restyle_hints_state.html @@ -0,0 +1,44 @@ + + + + + + + +
+
+
sometext
+
+
+
othertext
+
+
+ + I should be lawngreen +
+ + + diff --git a/tests/wpt/mozilla/tests/css/restyle_hints_state_ref.html b/tests/wpt/mozilla/tests/css/restyle_hints_state_ref.html new file mode 100644 index 00000000000..d8d0ad1dd09 --- /dev/null +++ b/tests/wpt/mozilla/tests/css/restyle_hints_state_ref.html @@ -0,0 +1,19 @@ + + + + + + + +
+
+
sometext
+
+
+
othertext
+
+
+ + I should be lawngreen +
+