Bug 827007: Implement Stop for UserMediaStreams; add NotifyRemoved for MediaStream...
[gecko.git] / editor / libeditor / text / tests / test_bug681229.html
blobb7594671b3097a8bcd1c8c0ba04ed7e0dbf0a9f2
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=681229
5 -->
6 <head>
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"/>
12 </head>
13 <body>
14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=681229">Mozilla Bug 681229</a>
15 <p id="display"></p>
16 <div id="content">
17 <textarea spellcheck="false"></textarea>
18 </div>
19 <pre id="test">
20 <script type="application/javascript">
22 /** Test for Bug 681229 **/
24 SimpleTest.waitForExplicitFinish();
25 SimpleTest.waitForFocus(function() {
26 var t = document.querySelector("textarea");
27 t.focus();
29 const kValue = "a\r\nb";
30 const kExpectedValue = (navigator.platform.indexOf("Win") == 0) ?
31 "a\nb" : kValue;
33 SimpleTest.waitForClipboard(kExpectedValue,
34 function() {
35 SpecialPowers.copyString(kValue, document);
37 function() {
38 synthesizeKey("V", {accelKey: true});
39 is(t.value, "a\nb", "The carriage return has been correctly sanitized");
40 SimpleTest.finish();
42 function() {
43 SimpleTest.finish();
46 });
48 </script>
49 </pre>
50 </body>
51 </html>