blob: e01e521e44d7345bd865a2072bef0c19f58122bd [file] [log] [blame]
<html>
<head>
<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
<script src="../../fast/js/resources/js-test-pre.js"></script>
<script>
function test() {
if (window.layoutTestController)
layoutTestController.dumpEditingCallbacks();
// Overwrite the old pasteboard with default results
document.getElementById("text").focus();
document.execCommand("Copy");
// Try to copy a password
document.getElementById("password").focus();
document.execCommand("Copy");
// Paste
document.getElementById("text").focus();
document.execCommand("Paste");
shouldBe('document.getElementById("text").value', '"[not modified]"');
}
</script>
</head>
<body onload="test()">
<p>This test verifies that copying is disabled for password fields by attempting to
copy from a password field and paste into a textfield. If the test
passes, you'll see a of 'PASS' message below, and the textfield will remain unmodified.</p>
<p>(The test is only meaningful in debug builds, since paste is disabled in release builds.)</p>
<input type="password" id="password" value="Password Input">
<input type="text" id="text" value="[not modified]">
<hr>
<p id="console"></p>
</body>
</html>