iframeio_test.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <!DOCTYPE html>
  2. <html>
  3. <!--
  4. Copyright 2006 The Closure Library Authors. All Rights Reserved.
  5. Use of this source code is governed by the Apache License, Version 2.0.
  6. See the COPYING file for details.
  7. -->
  8. <head>
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  10. <meta charset="UTF-8" />
  11. <title>
  12. Closure Unit Tests - goog.net.IframeIo
  13. </title>
  14. <script src="../base.js">
  15. </script>
  16. <script>
  17. goog.require('goog.net.IframeIoTest');
  18. </script>
  19. <style>
  20. html, body {
  21. width: 100%;
  22. height: 100%;
  23. overflow:hidden;
  24. }
  25. #log {
  26. position: absolute;
  27. top: 0px;
  28. width: 50%;
  29. right: 0%;
  30. height: 100%;
  31. overflow: auto;
  32. }
  33. p, input {
  34. font-family: verdana, helvetica, arial, sans-serif;
  35. font-size: small;
  36. margin: 0px;
  37. }
  38. input {
  39. font-family: verdana, helvetica, arial, sans-serif;
  40. font-size: x-small;
  41. }
  42. i {
  43. font-size: 85%;
  44. }
  45. </style>
  46. </head>
  47. <body>
  48. <p>
  49. <b>IframeIo manual tests:</b><br><br>
  50. <i>All operations should have no effect on history.</i><br>
  51. <br>
  52. <i>These tests require the ClosureTestServer<br>
  53. to be running with the IframeIoTestServlet.</i><br>
  54. <br></p>
  55. <p>
  56. <a href="javascript:simpleGet()">Simple GET</a><br>
  57. <a href="javascript:simplePost()">Simple POST</a><br>
  58. <a href="javascript:jsonEcho('GET')">JSON echo (get)</a><br>
  59. <a href="javascript:jsonEcho('POST')">JSON echo (post)</a><br>
  60. <a href="javascript:abort()">Test abort</a>
  61. </p>
  62. <form id="uploadform" action="/iframeio/upload" enctype="multipart/form-data" method="POST">
  63. <p><a href="javascript:sendFromForm()">Upload</a> <input name="userfile" type="file"> (big files should fail)</p>
  64. </form>
  65. <p>
  66. <a href="javascript:incremental()">Incremental results</a><br>
  67. <a href="javascript:redirect1()">Redirect (google.com)</a><br>
  68. <a href="javascript:redirect2()">Redirect (/iframeio/ping)</a><br>
  69. <a href="javascript:localUrl1()">Local request (Win path)</a><br>
  70. <a href="javascript:localUrl2()">Local request (Linux path)</a><br>
  71. <a href="javascript:badUrl()">Out of domain request</a><br>
  72. <a href="javascript:getServerTime(false)">Test cache</a> (Date should stay the same for subsequent tests)<br>
  73. <a href="javascript:getServerTime(true)">Test no-cache</a><br>
  74. <a href="javascript:errorGse404()">GSE 404 Error</a><br>
  75. <a href="javascript:errorGfe()">Simulated GFE Error</a><br>
  76. <a href="javascript:errorGmail()">Simulated Gmail Server Error</a><br><br>
  77. </p>
  78. <form id="testfrm" action="/iframeio/jsonecho" method="POST">
  79. <p><b>Comprehensive Form Post Test:</b><br>
  80. <input name="textinput" type="text" value="Default"> Text Input<br>
  81. Text Area<br>
  82. <textarea name="textarea">Default</textarea><br>
  83. <input name="checkbox1" type="checkbox" checked="checked"> Checkbox, default on<br>
  84. <input name="checkbox2" type="checkbox"> Checkbox, default off<br>
  85. Radio: <input name="radio" type="radio" value="Default" checked="checked"> Default,
  86. <input name="radio" type="radio" value="Foo"> Foo,
  87. <input name="radio" type="radio" value="Bar"> Bar<br>
  88. <select name="select">
  89. <option>One</option>
  90. <option>Two</option>
  91. <option selected="selected">Three (Default)</option>
  92. <option>Four</option>
  93. <option>Five</option>
  94. </select><br>
  95. <select name="selectmultiple">
  96. <option>One</option>
  97. <option selected="selected">Two (Default checked)</option>
  98. <option selected="selected">Three (Default checked)</option>
  99. <option>Four</option>
  100. </select>
  101. <a href="javascript:postForm()">Submit this form</a>
  102. </p>
  103. </form>
  104. <p><br><br>
  105. TODO(pupius):<br>
  106. - Local timeout
  107. </p>
  108. <div id="log"></div>
  109. </body>
  110. </html>