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