dom/encoding/test/test_submit_euckr.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4   <meta charset=utf-8>
     5   <title>Test for euc-kr encoded form submission</title>
     6   <script type="text/javascript" src="/resources/testharness.js"></script>
     7   <script type="text/javascript" src="/resources/testharnessreport.js"></script>
     8 </head>
     9 <body>
    10 <div id="log"></div>
    11 <iframe name="ifr"></iframe>
    12 <form accept-charset="euc-kr" action="abc" target="ifr">
    13 <input type="hidden" name="a" value="&#xAC02;">
    14 </form>
    15 <script>
    17 runTest();
    19 function runTest() {
    20   var t = async_test("Test for euc-kr encoded form submission");
    21   var f = document.forms[0];
    22   var ifr = frames.ifr;
    23   ifr.onload = function() {
    24     t.step(function() {
    25       assert_equals("".split.call(ifr.location, "?")[1], "a=%81A");
    26     });
    27     t.done();
    28   };
    29   f.submit();
    30 }
    32 </script>
    33 </body>
    34 </html>

mercurial