Bug 1892041 - Part 1: Update test262 features. r=spidermonkey-reviewers,dminor
[gecko.git] / dom / base / test / test_bug585978.html
blobe00cb8d84c7d279e637ed928efbfd91cdee0c6b8
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 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>
14 <script type="application/javascript">
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. */
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';
25 str += '\uA0A9'
26 node.data = str;
28 for (let j = 0; j < 32; j++) {
29 is(node.data, str);
31 str += 'b';
32 node.appendData('b');
36 </script>
37 </body>
38 </html>