Chromium Code Reviews| 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..89eb4bd75f72571228a881e248d788920530096f |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/input/placeholder-wrongly-placed-if-too-tall.html |
| @@ -0,0 +1,43 @@ |
| +<!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 src="../../resources/js-test.js"></script> |
| +<script> |
| +window.jsTestIsAsync = true; |
|
mstensho (USE GERRIT)
2015/12/04 14:57:36
What's jsTestIsAsync, Gramps?
Julien - ping for review
2015/12/04 15:16:33
It's the new hotness in js-test land!!!
It is int
|
| + |
| +if (window.testRunner) { |
| + testRunner.dumpAsText(); |
| + testRunner.waitUntilDone(); |
| +} |
| + |
| +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"); |
| + |
| + if (window.testRunner) |
| + testRunner.notifyDone(); |
| + |
| + finishJSTest(); |
| +} |
| + |
| +inputs[1].focus(); |
| +// Forcing a layout in this frame makes the issue disappear. |
| +window.requestAnimationFrame(checkInputs); |
| +</script> |