blob: 268ba740909654fcbed41f60cbefa8e60154da59 [file] [edit]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/ui-helper.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsText(true);
testRunner.waitUntilDone();
}
async function runTest()
{
if (!window.testRunner)
return;
let input = document.getElementById("input");
await UIHelper.activateElementAndWaitForInputSession(input);
await UIHelper.toggleCapsLock();
await UIHelper.typeCharacters("a", "keyup");
await UIHelper.typeCharacters("\b", "keyup");
await UIHelper.ensureStablePresentationUpdate();
internals.startTrackingRepaints();
await UIHelper.toggleCapsLock();
document.getElementById("result").textContent = internals.repaintRectsAsText();
internals.stopTrackingRepaints();
testRunner.notifyDone();
}
</script>
</head>
<body onload="runTest()">
<p>Tests that the placeholder text is repainted when the caps lock indicator is hidden.</p>
<input id="input" type="password" size="5" placeholder="Cupertino">
<pre id="result"></pre>
</body>
</html>