content/base/test/test_bug585978.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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>
    14 <script type="application/javascript;version=1.7">
    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';
    24   }
    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');
    33   }
    34 }
    36 </script>
    37 </body>
    38 </html>

mercurial