From f879140ad26696d72feff31e305e18ad173eb10e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 1 May 2017 11:42:06 +0200 Subject: [PATCH] style: Reftest for bogus style sharing across cousins. --- tests/unit/style/stylist.rs | 2 +- tests/wpt/mozilla/meta/MANIFEST.json | 25 +++++++++++++++++++ .../css/bug-1361013-cousin-sharing-ref.html | 8 ++++++ .../tests/css/bug-1361013-cousin-sharing.html | 13 ++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 tests/wpt/mozilla/tests/css/bug-1361013-cousin-sharing-ref.html create mode 100644 tests/wpt/mozilla/tests/css/bug-1361013-cousin-sharing.html diff --git a/tests/unit/style/stylist.rs b/tests/unit/style/stylist.rs index 3bdcd2ff590..ea89dfde06b 100644 --- a/tests/unit/style/stylist.rs +++ b/tests/unit/style/stylist.rs @@ -113,7 +113,7 @@ fn test_revalidation_selectors() { "p:first-child span", ]).into_iter() .filter(|s| needs_revalidation(&s)) - .map(|s| s.inner.slice_to_first_ancestor_combinator().complex) + .map(|s| s.inner.complex) .collect::>(); let reference = parse_selectors(&[ diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 5f70f04ee64..5b451022e62 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -1211,6 +1211,18 @@ {} ] ], + "css/bug-1361013-cousin-sharing.html": [ + [ + "/_mozilla/css/bug-1361013-cousin-sharing.html", + [ + [ + "/_mozilla/css/bug-1361013-cousin-sharing-ref.html", + "==" + ] + ], + {} + ] + ], "css/button_css_width.html": [ [ "/_mozilla/css/button_css_width.html", @@ -7262,6 +7274,11 @@ {} ] ], + "css/bug-1361013-cousin-sharing-ref.html": [ + [ + {} + ] + ], "css/button_css_width_ref.html": [ [ {} @@ -20835,6 +20852,14 @@ "2ebf9c8f963a2f3971a3c1b64b6b01825eacdedc", "support" ], + "css/bug-1361013-cousin-sharing-ref.html": [ + "3451cb4533d650f6f624b89548ce7117bcc8bef3", + "support" + ], + "css/bug-1361013-cousin-sharing.html": [ + "95c8c8d33cca3d6e969338a98c60ec9804256ef5", + "reftest" + ], "css/bug_1345483.html": [ "41b55af9d5c95910b1af74c0fbffb24e20bbe869", "testharness" diff --git a/tests/wpt/mozilla/tests/css/bug-1361013-cousin-sharing-ref.html b/tests/wpt/mozilla/tests/css/bug-1361013-cousin-sharing-ref.html new file mode 100644 index 00000000000..9c06cce2a1a --- /dev/null +++ b/tests/wpt/mozilla/tests/css/bug-1361013-cousin-sharing-ref.html @@ -0,0 +1,8 @@ + + +
+

+

This should be green.

+
diff --git a/tests/wpt/mozilla/tests/css/bug-1361013-cousin-sharing.html b/tests/wpt/mozilla/tests/css/bug-1361013-cousin-sharing.html new file mode 100644 index 00000000000..44f78042bca --- /dev/null +++ b/tests/wpt/mozilla/tests/css/bug-1361013-cousin-sharing.html @@ -0,0 +1,13 @@ + + +Bug 1361013: selectors for revalidation account for cousins sharing style + + + +
+

+

This should be green.

+