Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: LayoutTests/fast/selectors/placeholder-shown-style-update-expected.txt

Issue 1280423002: CSS4: Implement :placeholder-shown pseudo class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per review comments Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/selectors/placeholder-shown-style-update-expected.txt
diff --git a/LayoutTests/fast/selectors/placeholder-shown-style-update-expected.txt b/LayoutTests/fast/selectors/placeholder-shown-style-update-expected.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f6032d48f81951df04343c22b311217f51cf3bd5
--- /dev/null
+++ b/LayoutTests/fast/selectors/placeholder-shown-style-update-expected.txt
@@ -0,0 +1,64 @@
+Test style update of the :placeholder-shown pseudo class.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Initial state is without placehoder.
+PASS getComputedStyle(document.getElementById("input-with-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("textarea-with-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("input-without-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("textarea-without-renderer")).backgroundColor is "rgb(255, 255, 255)"
+Adding a placeholder matches.
+PASS getComputedStyle(document.getElementById("input-with-renderer")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("textarea-with-renderer")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("input-without-renderer")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("textarea-without-renderer")).backgroundColor is "rgb(1, 2, 3)"
+Adding a placehoder and an empty value. An empty value does not prevent matching.
+PASS getComputedStyle(document.getElementById("input-with-renderer")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("textarea-with-renderer")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("input-without-renderer")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("textarea-without-renderer")).backgroundColor is "rgb(1, 2, 3)"
+Changing the type of the input to something that does not support placeholder. The input element should not match.
+PASS getComputedStyle(document.getElementById("input-with-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("textarea-with-renderer")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("input-without-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("textarea-without-renderer")).backgroundColor is "rgb(1, 2, 3)"
+Changing the type of the input to text should add the style back.
+PASS getComputedStyle(document.getElementById("input-with-renderer")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("textarea-with-renderer")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("input-without-renderer")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("textarea-without-renderer")).backgroundColor is "rgb(1, 2, 3)"
+Adding a non empty value should remove the style.
+PASS getComputedStyle(document.getElementById("input-with-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("textarea-with-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("input-without-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("textarea-without-renderer")).backgroundColor is "rgb(255, 255, 255)"
+Removing the placeholder, we should not match.
+PASS getComputedStyle(document.getElementById("input-with-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("textarea-with-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("input-without-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("textarea-without-renderer")).backgroundColor is "rgb(255, 255, 255)"
+Removing the value. We should still not match since the placeholder attribute was removed.
+PASS getComputedStyle(document.getElementById("input-with-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("textarea-with-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("input-without-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("textarea-without-renderer")).backgroundColor is "rgb(255, 255, 255)"
+Putting back a value, no reason to match.
+PASS getComputedStyle(document.getElementById("input-with-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("textarea-with-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("input-without-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("textarea-without-renderer")).backgroundColor is "rgb(255, 255, 255)"
+Adding back the placeholder, the value is still there so we cannot match yet.
+PASS getComputedStyle(document.getElementById("input-with-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("textarea-with-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("input-without-renderer")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("textarea-without-renderer")).backgroundColor is "rgb(255, 255, 255)"
+Removing the value. A placeholder was added while the value was up, we should get the style now.
+PASS getComputedStyle(document.getElementById("input-with-renderer")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("textarea-with-renderer")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("input-without-renderer")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("textarea-without-renderer")).backgroundColor is "rgb(1, 2, 3)"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Powered by Google App Engine
This is Rietveld 408576698