tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_submit_euckr.html (860B)


      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>
     16 
     17 async_test((t) => {
     18  const form = document.forms[0];
     19  const iframe = document.querySelector('iframe');
     20 
     21  // note: listener must be on the iframe, not the window that will be replaced
     22  iframe.onload = t.step_func_done(() =>
     23    assert_equals("".split.call(iframe.contentWindow.location, "?")[1], "a=%81A")
     24  );
     25 
     26  form.submit();
     27 }, "Test for euc-kr encoded form submission");
     28 
     29 </script>
     30 </body>
     31 </html>