| <script src="../../resources/js-test-pre.js"></script> |
| testRunner.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"); |
| document.getElementById("text").focus(); |
| document.execCommand("Paste"); |
| shouldBe('document.getElementById("text").value', '"[not modified]"'); |
| <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]"> |