3 <script src="../../resources/js-test.js"></script>
7 testRunner.dumpEditingCallbacks();
9 // Overwrite the old pasteboard with default results
10 document.getElementById("text").focus();
11 document.getElementById("text").select();
12 document.execCommand("Copy");
14 // Try to copy a password
15 document.getElementById("password").focus();
16 document.getElementById("password").select();
17 document.execCommand("Copy");
20 document.getElementById("text").focus();
21 document.getElementById("text").select();
22 document.execCommand("Paste");
24 shouldBe('document.getElementById("text").value', '"[not modified]"');
28 <body onload="test()">
29 <p>This test verifies that copying is disabled for password fields by attempting to
30 copy from a password field and paste into a textfield. If the test
31 passes, you'll see a of 'PASS' message below, and the textfield will remain unmodified.</p>
32 <p>(The test is only meaningful in debug builds, since paste is disabled in release builds.)</p>
33 <input type="password" id="password" value="Password Input">
34 <input type="text" id="text" value="[not modified]">