test_urlSearchParams_utf8.html (1126B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=1032511 5 --> 6 <head> 7 <meta charset="utf-8"> 8 <title>Test for Bug 1032511</title> 9 <script src="/tests/SimpleTest/SimpleTest.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 11 </head> 12 <body> 13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1032511">Mozilla Bug 1032511</a> 14 <p id="display"></p> 15 <div id="content" style="display: none"> 16 <iframe name="x" id="x"></iframe> 17 <iframe name="y" id="y"></iframe> 18 </div> 19 <pre id="test"> 20 </pre> 21 <a href="http://www.example.net?a=b&c=d" id="anchor">foobar</a> 22 <area href="http://www.example.net?a=b&c=d" id="area">foobar</area> 23 <script type="application/javascript"> 24 25 /** Test for Bug 1032511 */ 26 var a = new URLSearchParams("%e2"); 27 ok(a, "a exists"); 28 is(a.toString(), "%EF%BF%BD=", "The value should be here."); 29 30 a = new URLSearchParams("a%e2"); 31 is(a.toString(), "a%EF%BF%BD=", "The value should be here."); 32 33 a = new URLSearchParams("a%e2b"); 34 is(a.toString(), "a%EF%BF%BDb=", "The value should be here."); 35 36 </script> 37 </body> 38 </html>