content/base/test/test_bug585978.html

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:c0e3e2dd2434
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=585978
5 -->
6 <head>
7 <title>Test for Bug 585978</title>
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=585978">Mozilla Bug 585978</a>
13
14 <script type="application/javascript;version=1.7">
15
16 /* Test that if we have a unicode character in the middle of an ascii string,
17 the unicode character survives translation into and out of a text node. */
18
19 for (let i = 0; i < 128; i++) {
20 let node = document.createTextNode('');
21 let str = '';
22 for (let j = 0; j < i; j++) {
23 str += 'a';
24 }
25 str += '\uA0A9'
26 node.data = str;
27
28 for (let j = 0; j < 32; j++) {
29 is(node.data, str);
30
31 str += 'b';
32 node.appendData('b');
33 }
34 }
35
36 </script>
37 </body>
38 </html>

mercurial