| <!DOCTYPE html> |
| Tests color of caret changes with the 'color' style. Passes if caret is always in the came color as the text. |
| <input id="target" type="text" value="SAMPLE" style="color: red; font-size: 30px; width: 200px"> |
| <script src="../../resources/run-after-layout-and-paint.js"></script> |
| <script> |
| target.focus(); |
| if (window.testRunner) { |
| testRunner.waitUntilDone(); |
| runAfterLayoutAndPaint(function() { |
| target.style.color = 'green'; |
| testRunner.notifyDone(); |
| }); |
| } else { |
| // For manual testing. |
| setInterval(function() { |
| target.style.color = target.style.color == 'green' ? 'red' : 'green'; |
| }, 1300); |
| } |
| </script> |