Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 src="../../resources/js-test.js"></script> | |
| 17 <script> | |
| 18 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
| |
| 19 | |
| 20 if (window.testRunner) { | |
| 21 testRunner.dumpAsText(); | |
| 22 testRunner.waitUntilDone(); | |
| 23 } | |
| 24 | |
| 25 var inputs = document.getElementsByTagName("input"); | |
| 26 | |
| 27 function checkInputs() | |
| 28 { | |
| 29 rect0 = inputs[0].getBoundingClientRect(); | |
| 30 rect1 = inputs[1].getBoundingClientRect(); | |
| 31 shouldBe("rect0.top", "rect1.top"); | |
| 32 shouldBe("rect0.height", "rect1.height"); | |
| 33 | |
| 34 if (window.testRunner) | |
| 35 testRunner.notifyDone(); | |
| 36 | |
| 37 finishJSTest(); | |
| 38 } | |
| 39 | |
| 40 inputs[1].focus(); | |
| 41 // Forcing a layout in this frame makes the issue disappear. | |
| 42 window.requestAnimationFrame(checkInputs); | |
| 43 </script> | |
| OLD | NEW |