Bug 1368113 - Part 1: Test for restyling ::placeholder. r?bz draft
authorCameron McCormack <cam@mcc.id.au>
Sat, 10 Jun 2017 11:25:50 +0800
changeset 592064 9cb38e415716a2e2ed27f0a6d3647fe77fea3e1c
parent 591677 1742b1bdadd13a02df95ca690bea9cc42ff40c91
child 592065 7629929eaa8879a7cce8da999ad7832f83428fc4
push id63273
push userbmo:cam@mcc.id.au
push dateSat, 10 Jun 2017 05:33:02 +0000
reviewersbz
bugs1368113
milestone55.0a1
Bug 1368113 - Part 1: Test for restyling ::placeholder. r?bz MozReview-Commit-ID: JDj1SZCrKmM
layout/reftests/bugs/1368113-1-ref.html
layout/reftests/bugs/1368113-1.html
layout/reftests/bugs/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1368113-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<style>
+  input::placeholder { color: green; }
+</style>
+<input type="number" placeholder="This should be green">
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1368113-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<style>
+  input::placeholder { color: red; }
+  input.green::placeholder { color: green; }
+</style>
+<input type="number" placeholder="This should be green">
+<script>
+  var i = document.querySelector("input");
+  var s = getComputedStyle(i, "::placeholder");
+  // Make sure we've computed the old color.
+  var oldColor = s.color;
+  i.className = "green";
+</script>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -2003,10 +2003,11 @@ fails-if(styloVsGecko) == 1322512-1.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
+fails-if(!stylo) == 1368113-1.html 1368113-1-ref.html
 == 1369584-1a.html 1369584-1-ref.html
 == 1369584-1b.html 1369584-1-ref.html