test_submit_euckr.html 795 B

1234567891011121314151617181920212223242526272829303132333435
  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. runTest();
  17. function runTest() {
  18. var t = async_test("Test for euc-kr encoded form submission");
  19. var f = document.forms[0];
  20. var ifr = frames.ifr;
  21. ifr.onload = function() {
  22. t.step(function() {
  23. assert_equals("".split.call(ifr.location, "?")[1], "a=%81A");
  24. });
  25. t.done();
  26. };
  27. f.submit();
  28. }
  29. </script>
  30. </body>
  31. </html>