Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / dom / url / tests / test_urlSearchParams_utf8.html
blob2a37b3b9a11e43c847f0c25014c0f20453b819f0
2 <!DOCTYPE HTML>
3 <html>
4 <!--
5 https://bugzilla.mozilla.org/show_bug.cgi?id=1032511
6 -->
7 <head>
8 <meta charset="utf-8">
9 <title>Test for Bug 1032511</title>
10 <script src="/tests/SimpleTest/SimpleTest.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=1032511">Mozilla Bug 1032511</a>
15 <p id="display"></p>
16 <div id="content" style="display: none">
17 <iframe name="x" id="x"></iframe>
18 <iframe name="y" id="y"></iframe>
19 </div>
20 <pre id="test">
21 </pre>
22 <a href="http://www.example.net?a=b&c=d" id="anchor">foobar</a>
23 <area href="http://www.example.net?a=b&c=d" id="area">foobar</area>
24 <script type="application/javascript">
26 /** Test for Bug 1032511 **/
27 var a = new URLSearchParams("%e2");
28 ok(a, "a exists");
29 is(a.toString(), "%EF%BF%BD=", "The value should be here.");
31 a = new URLSearchParams("a%e2");
32 is(a.toString(), "a%EF%BF%BD=", "The value should be here.");
34 a = new URLSearchParams("a%e2b");
35 is(a.toString(), "a%EF%BF%BDb=", "The value should be here.");
37 </script>
38 </body>
39 </html>