Bug 1365162 - Part 7: Test for :lang() with a sibling combinator. r=emilio draft
authorCameron McCormack <cam@mcc.id.au>
Wed, 07 Jun 2017 11:08:12 +0800
changeset 590159 fb6559ff687c5043316972ef73eb55ddfba1c131
parent 590158 58c3cc2843849b93561c067190c9c6ed0a3b0791
child 632105 d1542905a04523992ef299310e10212cde157cde
push id62612
push userbmo:cam@mcc.id.au
push dateWed, 07 Jun 2017 07:54:44 +0000
reviewersemilio
bugs1365162
milestone55.0a1
Bug 1365162 - Part 7: Test for :lang() with a sibling combinator. r=emilio MozReview-Commit-ID: J9PYC3RkEMm
layout/reftests/bugs/1365162-1-ref.html
layout/reftests/bugs/1365162-1.html
layout/reftests/bugs/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1365162-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<style>
+p { color: green; }
+</style>
+<div lang="zh">
+  <div>
+    <p>This text should be green.</p>
+  </div>
+</div>
+<p>This text should be green.</p>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1365162-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<style>
+p { color: red; }
+p:lang(zh) { color: green; }
+div:lang(zh) + p { color: green; }
+</style>
+<body onload="document.querySelector('div').lang = 'zh'">
+<div lang="en">
+  <div>
+    <p>This text should be green.</p>
+  </div>
+</div>
+<p>This text should be green.</p>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1999,13 +1999,14 @@ fails-if(styloVsGecko) == 1322512-1.html
 == 1358375-2.html 1358375-ref.html
 == 1358375-3.html 1358375-ref.html
 == 1364280-1.html 1364280-1-ref.html
 == 1364280-2a.html 1364280-2-ref.html
 == 1364280-2b.html 1364280-2-ref.html
 == 1364280-2c.html 1364280-2-ref.html
 == 1364335.html 1364335-ref.html
 == 1364360-1.html 1364360-1-ref.html
+== 1365159-1.html 1365159-1-ref.html
+fails-if(!stylo||!styloVsGecko) == 1365162-1.html 1365162-1-ref.html
 == 1366144.html 1366144-ref.html
+== 1367592-1.html 1367592-1-ref.html
 == 1369584-1a.html 1369584-1-ref.html
 == 1369584-1b.html 1369584-1-ref.html
-== 1367592-1.html 1367592-1-ref.html
-== 1365159-1.html 1365159-1-ref.html