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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <style>
3 input {
4 height: 26px;
5 line-height: 29px;
6 padding: 0 5px;
7 border: none;
8 border-bottom: 1px solid #888;
9 outline: none;
10 }
11 </style>
12 <div>Both inputs should be of the same size and the placeholder should be at the same place.</div>
13 <div id="console"></div>
14 <input type="text" placeholder="placeholder">
15 <input type="text" placeholder="placeholder">
16 <script>
17 window.jsTestIsAsync = true;
18
19 var inputs = document.getElementsByTagName("input");
20
21 function checkInputs()
22 {
23 rect0 = inputs[0].getBoundingClientRect();
24 rect1 = inputs[1].getBoundingClientRect();
25 shouldBe("rect0.top", "rect1.top");
26 shouldBe("rect0.height", "rect1.height");
27
28 finishJSTest();
29 }
30
31 inputs[1].focus();
32 // Forcing a layout in this frame makes the issue disappear.
33 window.requestAnimationFrame(checkInputs);
34 </script>
35 <script src="../../resources/js-test.js"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698