4 https://bugzilla.mozilla.org/show_bug.cgi?id=681229
7 <title>Test for Bug
681229</title>
8 <script type=
"application/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <script type=
"text/javascript" src=
"/tests/SimpleTest/EventUtils.js"></script>
10 <script type=
"text/javascript" src=
"/tests/SimpleTest/WindowSnapshot.js"></script>
11 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
14 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=681229">Mozilla Bug
681229</a>
17 <textarea spellcheck=
"false"></textarea>
20 <script type=
"application/javascript">
22 /** Test for Bug
681229 **/
24 SimpleTest.waitForExplicitFinish();
25 SimpleTest.waitForFocus(function() {
26 var t = document.querySelector(
"textarea");
29 const kValue =
"a\r\nb";
30 const kExpectedValue = (navigator.platform.indexOf(
"Win") ==
0) ?
33 SimpleTest.waitForClipboard(kExpectedValue,
35 SpecialPowers.copyString(kValue, document);
38 synthesizeKey(
"V", {accelKey: true});
39 is(t.value,
"a\nb",
"The carriage return has been correctly sanitized");