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

Unified Diff: third_party/WebKit/LayoutTests/fast/input/placeholder-wrongly-placed-if-too-tall.html

Issue 1499063002: input's placeholder is inconsistently laid out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Upgraded the test to js-test.js for real! Created 5 years 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: third_party/WebKit/LayoutTests/fast/input/placeholder-wrongly-placed-if-too-tall.html
diff --git a/third_party/WebKit/LayoutTests/fast/input/placeholder-wrongly-placed-if-too-tall.html b/third_party/WebKit/LayoutTests/fast/input/placeholder-wrongly-placed-if-too-tall.html
new file mode 100644
index 0000000000000000000000000000000000000000..523f5691f4c198a8b70249605ac9b375ef976d13
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/input/placeholder-wrongly-placed-if-too-tall.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<style>
+input {
+ height: 26px;
+ line-height: 29px;
+ padding: 0 5px;
+ border: none;
+ border-bottom: 1px solid #888;
+ outline: none;
+}
+</style>
+<div>Both inputs should be of the same size and the placeholder should be at the same place.</div>
+<div id="console"></div>
+<input type="text" placeholder="placeholder">
+<input type="text" placeholder="placeholder">
+<script>
+window.jsTestIsAsync = true;
+
+var inputs = document.getElementsByTagName("input");
+
+function checkInputs()
+{
+ rect0 = inputs[0].getBoundingClientRect();
+ rect1 = inputs[1].getBoundingClientRect();
+ shouldBe("rect0.top", "rect1.top");
+ shouldBe("rect0.height", "rect1.height");
+
+ finishJSTest();
+}
+
+inputs[1].focus();
+// Forcing a layout in this frame makes the issue disappear.
+window.requestAnimationFrame(checkInputs);
+</script>
+<script src="../../resources/js-test.js"></script>

Powered by Google App Engine
This is Rietveld 408576698