tenderlove-mechanize 0.9.3.20090617085936

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. data/CHANGELOG.rdoc +496 -0
  2. data/EXAMPLES.rdoc +171 -0
  3. data/FAQ.rdoc +11 -0
  4. data/GUIDE.rdoc +122 -0
  5. data/LICENSE.rdoc +340 -0
  6. data/Manifest.txt +169 -0
  7. data/README.rdoc +60 -0
  8. data/Rakefile +43 -0
  9. data/examples/flickr_upload.rb +23 -0
  10. data/examples/mech-dump.rb +7 -0
  11. data/examples/proxy_req.rb +9 -0
  12. data/examples/rubyforge.rb +21 -0
  13. data/examples/spider.rb +11 -0
  14. data/lib/mechanize.rb +7 -0
  15. data/lib/www/mechanize/chain/auth_headers.rb +80 -0
  16. data/lib/www/mechanize/chain/body_decoding_handler.rb +48 -0
  17. data/lib/www/mechanize/chain/connection_resolver.rb +78 -0
  18. data/lib/www/mechanize/chain/custom_headers.rb +23 -0
  19. data/lib/www/mechanize/chain/handler.rb +9 -0
  20. data/lib/www/mechanize/chain/header_resolver.rb +53 -0
  21. data/lib/www/mechanize/chain/parameter_resolver.rb +24 -0
  22. data/lib/www/mechanize/chain/post_connect_hook.rb +0 -0
  23. data/lib/www/mechanize/chain/pre_connect_hook.rb +22 -0
  24. data/lib/www/mechanize/chain/request_resolver.rb +32 -0
  25. data/lib/www/mechanize/chain/response_body_parser.rb +40 -0
  26. data/lib/www/mechanize/chain/response_header_handler.rb +50 -0
  27. data/lib/www/mechanize/chain/response_reader.rb +41 -0
  28. data/lib/www/mechanize/chain/ssl_resolver.rb +42 -0
  29. data/lib/www/mechanize/chain/uri_resolver.rb +77 -0
  30. data/lib/www/mechanize/chain.rb +34 -0
  31. data/lib/www/mechanize/content_type_error.rb +16 -0
  32. data/lib/www/mechanize/cookie.rb +72 -0
  33. data/lib/www/mechanize/cookie_jar.rb +191 -0
  34. data/lib/www/mechanize/file.rb +73 -0
  35. data/lib/www/mechanize/file_response.rb +62 -0
  36. data/lib/www/mechanize/file_saver.rb +39 -0
  37. data/lib/www/mechanize/form/button.rb +8 -0
  38. data/lib/www/mechanize/form/check_box.rb +13 -0
  39. data/lib/www/mechanize/form/field.rb +28 -0
  40. data/lib/www/mechanize/form/file_upload.rb +24 -0
  41. data/lib/www/mechanize/form/image_button.rb +23 -0
  42. data/lib/www/mechanize/form/multi_select_list.rb +69 -0
  43. data/lib/www/mechanize/form/option.rb +51 -0
  44. data/lib/www/mechanize/form/radio_button.rb +38 -0
  45. data/lib/www/mechanize/form/select_list.rb +45 -0
  46. data/lib/www/mechanize/form.rb +360 -0
  47. data/lib/www/mechanize/headers.rb +12 -0
  48. data/lib/www/mechanize/history.rb +67 -0
  49. data/lib/www/mechanize/inspect.rb +90 -0
  50. data/lib/www/mechanize/monkey_patch.rb +37 -0
  51. data/lib/www/mechanize/page/base.rb +10 -0
  52. data/lib/www/mechanize/page/frame.rb +22 -0
  53. data/lib/www/mechanize/page/link.rb +50 -0
  54. data/lib/www/mechanize/page/meta.rb +51 -0
  55. data/lib/www/mechanize/page.rb +176 -0
  56. data/lib/www/mechanize/pluggable_parsers.rb +103 -0
  57. data/lib/www/mechanize/redirect_limit_reached_error.rb +18 -0
  58. data/lib/www/mechanize/redirect_not_get_or_head_error.rb +20 -0
  59. data/lib/www/mechanize/response_code_error.rb +25 -0
  60. data/lib/www/mechanize/unsupported_scheme_error.rb +10 -0
  61. data/lib/www/mechanize/util.rb +76 -0
  62. data/lib/www/mechanize.rb +619 -0
  63. data/mechanize.gemspec +41 -0
  64. data/test/chain/test_argument_validator.rb +14 -0
  65. data/test/chain/test_auth_headers.rb +25 -0
  66. data/test/chain/test_custom_headers.rb +18 -0
  67. data/test/chain/test_header_resolver.rb +28 -0
  68. data/test/chain/test_parameter_resolver.rb +35 -0
  69. data/test/chain/test_request_resolver.rb +29 -0
  70. data/test/chain/test_response_reader.rb +24 -0
  71. data/test/data/htpasswd +1 -0
  72. data/test/data/server.crt +16 -0
  73. data/test/data/server.csr +12 -0
  74. data/test/data/server.key +15 -0
  75. data/test/data/server.pem +15 -0
  76. data/test/helper.rb +129 -0
  77. data/test/htdocs/alt_text.html +10 -0
  78. data/test/htdocs/bad_form_test.html +9 -0
  79. data/test/htdocs/button.jpg +0 -0
  80. data/test/htdocs/empty_form.html +6 -0
  81. data/test/htdocs/file_upload.html +26 -0
  82. data/test/htdocs/find_link.html +41 -0
  83. data/test/htdocs/form_multi_select.html +16 -0
  84. data/test/htdocs/form_multival.html +37 -0
  85. data/test/htdocs/form_no_action.html +18 -0
  86. data/test/htdocs/form_no_input_name.html +16 -0
  87. data/test/htdocs/form_select.html +16 -0
  88. data/test/htdocs/form_select_all.html +16 -0
  89. data/test/htdocs/form_select_none.html +17 -0
  90. data/test/htdocs/form_select_noopts.html +10 -0
  91. data/test/htdocs/form_set_fields.html +14 -0
  92. data/test/htdocs/form_test.html +188 -0
  93. data/test/htdocs/frame_test.html +30 -0
  94. data/test/htdocs/google.html +13 -0
  95. data/test/htdocs/iframe_test.html +16 -0
  96. data/test/htdocs/index.html +6 -0
  97. data/test/htdocs/link with space.html +5 -0
  98. data/test/htdocs/meta_cookie.html +11 -0
  99. data/test/htdocs/no_title_test.html +6 -0
  100. data/test/htdocs/relative/tc_relative_links.html +21 -0
  101. data/test/htdocs/tc_bad_links.html +5 -0
  102. data/test/htdocs/tc_base_link.html +8 -0
  103. data/test/htdocs/tc_blank_form.html +11 -0
  104. data/test/htdocs/tc_checkboxes.html +19 -0
  105. data/test/htdocs/tc_encoded_links.html +5 -0
  106. data/test/htdocs/tc_follow_meta.html +8 -0
  107. data/test/htdocs/tc_form_action.html +48 -0
  108. data/test/htdocs/tc_links.html +18 -0
  109. data/test/htdocs/tc_no_attributes.html +16 -0
  110. data/test/htdocs/tc_pretty_print.html +17 -0
  111. data/test/htdocs/tc_radiobuttons.html +17 -0
  112. data/test/htdocs/tc_referer.html +10 -0
  113. data/test/htdocs/tc_relative_links.html +19 -0
  114. data/test/htdocs/tc_textarea.html +23 -0
  115. data/test/htdocs/unusual______.html +5 -0
  116. data/test/servlets.rb +365 -0
  117. data/test/ssl_server.rb +48 -0
  118. data/test/test_authenticate.rb +71 -0
  119. data/test/test_bad_links.rb +25 -0
  120. data/test/test_blank_form.rb +16 -0
  121. data/test/test_checkboxes.rb +61 -0
  122. data/test/test_content_type.rb +13 -0
  123. data/test/test_cookie_class.rb +338 -0
  124. data/test/test_cookie_jar.rb +362 -0
  125. data/test/test_cookies.rb +123 -0
  126. data/test/test_encoded_links.rb +20 -0
  127. data/test/test_errors.rb +49 -0
  128. data/test/test_follow_meta.rb +108 -0
  129. data/test/test_form_action.rb +44 -0
  130. data/test/test_form_as_hash.rb +61 -0
  131. data/test/test_form_button.rb +38 -0
  132. data/test/test_form_no_inputname.rb +15 -0
  133. data/test/test_forms.rb +564 -0
  134. data/test/test_frames.rb +25 -0
  135. data/test/test_get_headers.rb +52 -0
  136. data/test/test_gzipping.rb +22 -0
  137. data/test/test_hash_api.rb +45 -0
  138. data/test/test_history.rb +142 -0
  139. data/test/test_history_added.rb +16 -0
  140. data/test/test_html_unscape_forms.rb +39 -0
  141. data/test/test_if_modified_since.rb +20 -0
  142. data/test/test_keep_alive.rb +31 -0
  143. data/test/test_links.rb +120 -0
  144. data/test/test_mech.rb +268 -0
  145. data/test/test_mechanize_file.rb +47 -0
  146. data/test/test_meta.rb +65 -0
  147. data/test/test_multi_select.rb +106 -0
  148. data/test/test_no_attributes.rb +13 -0
  149. data/test/test_option.rb +18 -0
  150. data/test/test_page.rb +119 -0
  151. data/test/test_pluggable_parser.rb +145 -0
  152. data/test/test_post_form.rb +34 -0
  153. data/test/test_pretty_print.rb +22 -0
  154. data/test/test_radiobutton.rb +75 -0
  155. data/test/test_redirect_limit_reached.rb +41 -0
  156. data/test/test_redirect_verb_handling.rb +45 -0
  157. data/test/test_referer.rb +39 -0
  158. data/test/test_relative_links.rb +40 -0
  159. data/test/test_request.rb +13 -0
  160. data/test/test_response_code.rb +52 -0
  161. data/test/test_save_file.rb +48 -0
  162. data/test/test_scheme.rb +48 -0
  163. data/test/test_select.rb +106 -0
  164. data/test/test_select_all.rb +15 -0
  165. data/test/test_select_none.rb +15 -0
  166. data/test/test_select_noopts.rb +16 -0
  167. data/test/test_set_fields.rb +44 -0
  168. data/test/test_ssl_server.rb +20 -0
  169. data/test/test_subclass.rb +14 -0
  170. data/test/test_textarea.rb +45 -0
  171. data/test/test_upload.rb +109 -0
  172. data/test/test_verbs.rb +25 -0
  173. metadata +314 -0
@@ -0,0 +1,16 @@
1
+ <html>
2
+ <body>
3
+ <form name="form1" method="post" action="/form_post">
4
+ <select name="list">
5
+ <option value="1">Option 1</option>
6
+ <option value="2" selected>Option 2</option>
7
+ <option value="3">Option 3</option>
8
+ <option value="4">Option 4</option>
9
+ <option value="5">Option 5</option>
10
+ <option value="6">Option 6</option>
11
+ </select>
12
+ <br />
13
+ <input type="submit" value="Submit" />
14
+ </form>
15
+ </body>
16
+ </html>
@@ -0,0 +1,16 @@
1
+ <html>
2
+ <body>
3
+ <form name="form1" method="post" action="/form_post">
4
+ <select name="list">
5
+ <option value="1" selected>Option 1</option>
6
+ <option value="2" selected>Option 2</option>
7
+ <option value="3" selected>Option 3</option>
8
+ <option value="4" selected>Option 4</option>
9
+ <option value="5" selected>Option 5</option>
10
+ <option value="6" selected>Option 6</option>
11
+ </select>
12
+ <br />
13
+ <input type="submit" value="Submit" />
14
+ </form>
15
+ </body>
16
+ </html>
@@ -0,0 +1,17 @@
1
+ <html>
2
+ <body>
3
+ <form name="form1" method="post" action="/form_post">
4
+ <select name="list">
5
+ <option value="1">Option 1</option>
6
+ <option value="2">Option 2</option>
7
+ <option>Option No Value</option>
8
+ <option value="3">Option 3</option>
9
+ <option value="4">Option 4</option>
10
+ <option value="5">Option 5</option>
11
+ <option value="6">Option 6</option>
12
+ </select>
13
+ <br />
14
+ <input type="submit" value="Submit" />
15
+ </form>
16
+ </body>
17
+ </html>
@@ -0,0 +1,10 @@
1
+ <html>
2
+ <body>
3
+ <form name="form1" method="post" action="/form_post">
4
+ <select name="list">
5
+ </select>
6
+ <br />
7
+ <input type="submit" value="Submit" />
8
+ </form>
9
+ </body>
10
+ </html>
@@ -0,0 +1,14 @@
1
+ <html>
2
+ <head>
3
+ <title>HTML for tc_set_fields</title>
4
+ </head>
5
+ <body>
6
+ <form name="set_fields" method="post" action="/form_post">
7
+ <input type="text" name="first_name" /><br />
8
+ <input type="text" name="first_name" /><br />
9
+ <input type="text" name="gender" /><br />
10
+ <input type="text" name="green[eggs]" /><br />
11
+ <input type="submit" value="Submit" /><br />
12
+ </form>
13
+ </body>
14
+ </html>
@@ -0,0 +1,188 @@
1
+ <html>
2
+ <head><title>Page Title</title></head>
3
+ <body>
4
+ <h1>Post Form 1</h1>
5
+ <form name="post_form1" method="post" action="/form_post">
6
+ <table>
7
+ <tr>
8
+ <td>First Name</td>
9
+ <td><input type="text" name="first_name" /></td>
10
+ </tr>
11
+ <tr>
12
+ <td>Gender</td>
13
+ <td>
14
+ M: <input type="radio" name="gender" value="male" /><br />
15
+ F: <input type="radio" name="gender" value="female" /><br />
16
+ </td>
17
+ </tr>
18
+ <tr>
19
+ <td>Check this if you are cool:</td>
20
+ <td><input type="checkbox" name="cool person" /></td>
21
+ </tr>
22
+ <tr>
23
+ <td>Check this if you like green eggs:</td>
24
+ <td><input type="checkbox" name="green[eggs]" /></td>
25
+ </tr>
26
+ <tr>
27
+ <td>Check this if you like ham:</td>
28
+ <td><input type="checkbox" name="likes ham" /></td>
29
+ </tr>
30
+ </table><br />
31
+ <select name="country">
32
+ <option value="USA">USA</option>
33
+ <option value="CANADA">CANADA</option>
34
+ </select><br />
35
+ <select name="empty">
36
+ </select><br />
37
+ <input type="submit" value="Submit" />
38
+ </form>
39
+ <h1>Get Form 1</h1>
40
+ <form name="get_form1" method="get" action="/form_post">
41
+ <table>
42
+ <tr>
43
+ <td>First Name</td>
44
+ <td><input type="text" name="first_name" /></td>
45
+ </tr>
46
+ <tr>
47
+ <td>Gender</td>
48
+ <td>
49
+ M: <input type="radio" name="gender" value="male" /><br />
50
+ F: <input type="radio" name="gender" value="female" /><br />
51
+ </td>
52
+ </tr>
53
+ <tr>
54
+ <td>Check this if you are cool:</td>
55
+ <td><input type="checkbox" name="cool person" /></td>
56
+ </tr>
57
+ <tr>
58
+ <td>Check this if you like green eggs:</td>
59
+ <td><input type="checkbox" name="green[eggs]" /></td>
60
+ </tr>
61
+ <tr>
62
+ <td>Check this if you like ham:</td>
63
+ <td><input type="checkbox" name="likes ham" /></td>
64
+ </tr>
65
+ </table><br />
66
+ <input type="image" name="button" value="button" src="button.jpg" />
67
+ <input type="submit" value="Submit" />
68
+ </form>
69
+
70
+ <!-- Get ant post to a form with a space in the name -->
71
+ <h1>Post Form 2</h1>
72
+ <form name="post_form2" method="post" action="/form post">
73
+ <table>
74
+ <tr>
75
+ <td>First Name</td>
76
+ <td><input type="text" name="first_name" /></td>
77
+ </tr>
78
+ <tr>
79
+ <td>Gender</td>
80
+ <td>
81
+ M: <input type="radio" name="gender" value="male" /><br />
82
+ F: <input type="radio" name="gender" value="female" /><br />
83
+ </td>
84
+ </tr>
85
+ <tr>
86
+ <td>Check this if you are cool:</td>
87
+ <td><input type="checkbox" name="cool person" /></td>
88
+ </tr>
89
+ <tr>
90
+ <td>Check this if you like ham:</td>
91
+ <td><input type="checkbox" name="likes ham" /></td>
92
+ </tr>
93
+ </table><br />
94
+ <input type="submit" value="Submit" />
95
+ </form>
96
+ <h1>Get Form 2</h1>
97
+ <form name="get_form2" method="get" action="/form post">
98
+ <table>
99
+ <tr>
100
+ <td>First Name</td>
101
+ <td><input type="text" name="first_name" /></td>
102
+ </tr>
103
+ <tr>
104
+ <td>Gender</td>
105
+ <td>
106
+ M: <input type="radio" name="gender" value="male" /><br />
107
+ F: <input type="radio" name="gender" value="female" /><br />
108
+ </td>
109
+ </tr>
110
+ <tr>
111
+ <td>Check this if you are cool:</td>
112
+ <td><input type="checkbox" name="cool person" /></td>
113
+ </tr>
114
+ <tr>
115
+ <td>Check this if you like ham:</td>
116
+ <td><input type="checkbox" name="likes ham" /></td>
117
+ </tr>
118
+ </table><br />
119
+ <input type="submit" value="Submit" />
120
+ </form>
121
+
122
+ <!-- forms with parameters in the action -->
123
+ <h1>Post Form 3</h1>
124
+ <form name="post_form3" method="post" action="/form_post?great day=yes&one=two">
125
+ <table>
126
+ <tr>
127
+ <td>First Name</td>
128
+ <td><input type="text" name="first_name" /></td>
129
+ </tr>
130
+ <tr>
131
+ <td>Gender</td>
132
+ <td>
133
+ M: <input type="radio" name="gender" value="male" /><br />
134
+ F: <input type="radio" name="gender" value="female" /><br />
135
+ </td>
136
+ </tr>
137
+ <tr>
138
+ <td>Check this if you are cool:</td>
139
+ <td><input type="checkbox" name="cool person" /></td>
140
+ </tr>
141
+ <tr>
142
+ <td>Check this if you like ham:</td>
143
+ <td><input type="checkbox" name="likes ham" /></td>
144
+ </tr>
145
+ </table><br />
146
+ <input type="submit" value="Submit" />
147
+ </form>
148
+
149
+ <!-- Post form with multipart/form-data -->
150
+ <h1>Post Form 4 - Multipart</h1>
151
+ <form name="post_form4_multipart" enctype="multipart/form-data" method="post" action="/form_post">
152
+ <table>
153
+ <tr>
154
+ <td>First Name</td>
155
+ <td><input type="text" name="first_name" /></td>
156
+ </tr>
157
+ </table><br />
158
+ <input type="submit" value="Submit" />
159
+ </form>
160
+
161
+ <h1>Get Form 3</h1>
162
+ <form name="get_form3" method="get" action="/form_post?great day=yes&one=two">
163
+ <table>
164
+ <tr>
165
+ <td>First Name</td>
166
+ <td><input type="text" name="first_name" /></td>
167
+ </tr>
168
+ <tr>
169
+ <td>Gender</td>
170
+ <td>
171
+ M: <input type="radio" name="gender" value="male" /><br />
172
+ F: <input type="radio" name="gender" value="female" /><br />
173
+ </td>
174
+ </tr>
175
+ <tr>
176
+ <td>Check this if you are cool:</td>
177
+ <td><input type="checkbox" name="cool person" /></td>
178
+ </tr>
179
+ <tr>
180
+ <td>Check this if you like ham:</td>
181
+ <td><input type="checkbox" name="likes ham" /></td>
182
+ </tr>
183
+ </table><br />
184
+ <input type="submit" value="Submit" />
185
+ </form>
186
+ <a href="/form_test.html">form test</a>
187
+ </body>
188
+ </html>
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
2
+ "http://www.w3.org/TR/html4/frameset.dtd">
3
+ <HTML>
4
+ <HEAD>
5
+ <TITLE>A simple frameset document</TITLE>
6
+ </HEAD>
7
+ <FRAMESET cols="20%, 80%">
8
+ <FRAMESET rows="100, 200">
9
+ <FRAME name="frame1" src="/google.html">
10
+ <FRAME name="frame2" src="/form_test.html">
11
+ </FRAMESET>
12
+ <FRAMESET rows="100, 200">
13
+ <FRAME name="frame3" src="/file_upload.html">
14
+ <IFRAME src="http://google.com/" name="frame4">
15
+ [Your user agent does not support frames or is currently configured
16
+ not to display frames. However, you may visit
17
+ <A href="foo.html">the related document.</A>]
18
+ </IFRAME>
19
+ </FRAMESET>
20
+ <NOFRAMES>
21
+ <P>This frameset document contains:
22
+ <UL>
23
+ <LI><A href="/google.html">Some neat contents</A>
24
+ <LI><A href="/form_test.html" class="bar">Form Test</A>
25
+ <LI><A href="/file_upload.html">Some other neat contents</A>
26
+ </UL>
27
+ </NOFRAMES>
28
+ </FRAMESET>
29
+ </HTML>
30
+
@@ -0,0 +1,13 @@
1
+ <html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>Google</title><style><!--
2
+ body,td,a,p,.h{font-family:arial,sans-serif;}
3
+ .h{font-size: 20px;}
4
+ .q{color:#0000cc;}
5
+ //-->
6
+ </style>
7
+ <script>
8
+ <!--
9
+ function sf(){document.f.q.focus();}
10
+ // -->
11
+ </script>
12
+ </head><body bgcolor=#ffffff text=#000000 link=#0000cc vlink=#551a8b alink=#ff0000 onLoad=sf() topmargin=3 marginheight=3><center><table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td align=right nowrap><font size=-1><a href="/url?sa=p&pref=ig&pval=2&q=http://www.google.com/ig%3Fhl%3Den">Personalized Home</a>&nbsp;|&nbsp;<a href="https://www.google.com/accounts/Login?continue=http://www.google.com/&hl=en">Sign in</a></font></td></tr><tr height=4><td><img alt="" width=1 height=1></td></tr></table><img src="/intl/en/images/logo.gif" width=276 height=110 alt="Google"><br><br>
13
+ <form action=/search name=f><table border=0 cellspacing=0 cellpadding=4><tr><td nowrap><font size=-1><b>Web</b>&nbsp;&nbsp;&nbsp;&nbsp;<a id=1a class=q href="/imghp?hl=en&tab=wi&ie=UTF-8">Images</a>&nbsp;&nbsp;&nbsp;&nbsp;<a id=2a class=q href="http://groups.google.com/grphp?hl=en&tab=wg&ie=UTF-8">Groups</a>&nbsp;&nbsp;&nbsp;&nbsp;<a id=4a class=q href="http://news.google.com/nwshp?hl=en&tab=wn&ie=UTF-8">News</a>&nbsp;&nbsp;&nbsp;&nbsp;<a id=5a class=q href="http://froogle.google.com/frghp?hl=en&tab=wf&ie=UTF-8">Froogle</a>&nbsp;&nbsp;&nbsp;&nbsp;<a id=7a class=q href="/lochp?hl=en&tab=wl&ie=UTF-8">Local</a>&nbsp;&nbsp;&nbsp;&nbsp;<b><a href="/intl/en/options/" class=q>more&nbsp;&raquo;</a></b></font></td></tr></table><table cellspacing=0 cellpadding=0><tr><td width=25%>&nbsp;</td><td align=center><input type=hidden name=hl value=en><input type=hidden name=ie value="ISO-8859-1"><input maxlength=2048 size=55 name=q value="" title="Google Search"><br><input type=submit value="Google Search" name=btnG><input type=submit value="I'm Feeling Lucky" name=btnI></td><td valign=top nowrap width=25%><font size=-2>&nbsp;&nbsp;<a href=/advanced_search?hl=en>Advanced Search</a><br>&nbsp;&nbsp;<a href=/preferences?hl=en>Preferences</a><br>&nbsp;&nbsp;<a href=/language_tools?hl=en>Language Tools</a></font></td></tr></table></form><br><br><font size=-1><a href="/ads/">Advertising&nbsp;Programs</a> - <a href=/services/>Business Solutions</a> - <a href=/intl/en/about.html>About Google</a></font><p><font size=-2>&copy;2006 Google</font></p></center></body></html>
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
2
+ "http://www.w3.org/TR/html4/frameset.dtd">
3
+ <HTML>
4
+ <HEAD>
5
+ <TITLE>A simple frameset document</TITLE>
6
+ </HEAD>
7
+ <BODY>
8
+ <IFRAME src="/file_upload.html" name="frame4">
9
+ [Your user agent does not support frames or is currently configured
10
+ not to display frames. However, you may visit
11
+ <A href="foo.html">the related document.</A>]
12
+ </IFRAME>
13
+ </BODY>
14
+ </HTML>
15
+
16
+
@@ -0,0 +1,6 @@
1
+ <html>
2
+ <head><title>Page Title</title></head>
3
+ <body>
4
+ <h1>Hello World!</h1>
5
+ </body>
6
+ </html>
@@ -0,0 +1,5 @@
1
+ <html>
2
+ <body>
3
+ This is a webpage that has a space in the filename.
4
+ </body>
5
+ </html>
@@ -0,0 +1,11 @@
1
+ <html>
2
+ <meta http-equiv="Set-Cookie" content="tender=live;expires=Sun, 27-Sep-2037 00:00:00 GMT; path=/">
3
+ <body>
4
+ <a href="alt_text.html"><img alt="alt text" src="hello"></a>
5
+ <a href="no_alt_text.html"><img src="hello"></a>
6
+ <a href="nil_alt_text.html"><img alt src="hello"></a>
7
+ <a href="no_image.html">no image</a>
8
+ <a href="no_text.html"></a>
9
+ </body>
10
+ </html>
11
+
@@ -0,0 +1,6 @@
1
+ <html>
2
+ <title></title>
3
+ <body>
4
+ No title in the title tag
5
+ </body>
6
+ </html>
@@ -0,0 +1,21 @@
1
+ <html>
2
+ <body>
3
+ <a href="../tc_relative_links.html">dot dot slash</a>
4
+ <a href="../../../../../tc_relative_links.html">too many dots</a>
5
+ <FRAMESET cols="20%, 80%">
6
+ <FRAMESET rows="100, 200, 200">
7
+ <FRAME name="frame1" src="../tc_relative_links.html">
8
+ <FRAME name="frame2" src="../tc_relative_links.html">
9
+ </FRAMESET>
10
+ <FRAMESET rows="100, 200">
11
+ <FRAME name="frame3" src="/file_upload.html">
12
+ <IFRAME src="http://google.com/" name="frame4">
13
+ [Your user agent does not support frames or is currently configured
14
+ not to display frames. However, you may visit
15
+ <A href="foo.html">the related document.</A>]
16
+ <a href="?a=b">just the query string</A>
17
+ </IFRAME>
18
+ </FRAMESET>
19
+ </FRAMESET>
20
+ </body>
21
+ </html>
@@ -0,0 +1,5 @@
1
+ <html>
2
+ <body>
3
+ <a href="/alt_text.html ">Alt Text</a>
4
+ </body>
5
+ </html>
@@ -0,0 +1,8 @@
1
+ <html>
2
+ <head>
3
+ <base href="http://localhost/">
4
+ </head>
5
+ <body>
6
+ <a href="index.html">test</a>
7
+ </body>
8
+ </html>
@@ -0,0 +1,11 @@
1
+ <html>
2
+ <body>
3
+ <form name="test" method="post">
4
+ <input type="hidden" name="hidden_blank" value=''/>
5
+ <input type="hidden" name="hidden_noval"/>
6
+ <input type="text" name="visible_blank" value=''/>
7
+ <input type="text" name="visible_noval"/>
8
+ <input type="submit"/>
9
+ </form>
10
+ </body>
11
+ </html>
@@ -0,0 +1,19 @@
1
+ <html>
2
+ <head><title>tc_checkboxbuttons.html</title></head>
3
+ <body>
4
+ <form name="form1" method="post" action="/form_post">
5
+ Gender:<br />
6
+ M: <input type="checkbox" name="male" /><br />
7
+ F: <input type="checkbox" name="female" /><br />
8
+ Your one favorite color:<br />
9
+ Green: <input type="checkbox" name="green" /><br />
10
+ Green: <input type="checkbox" name="green" /><br />
11
+ Red: <input type="checkbox" name="red" /><br />
12
+ Blue: <input type="checkbox" name="blue" /><br />
13
+ Yellow: <input type="checkbox" name="yellow" /><br />
14
+ Brown: <input type="checkbox" name="brown" /><br />
15
+ Purple: <input type="checkbox" name="purple" /><br />
16
+ <input type="submit" value="Submit" />
17
+ </form>
18
+ </body>
19
+ </html>
@@ -0,0 +1,5 @@
1
+ <html>
2
+ <body>
3
+ <a href="/form_post?a=b&amp;b=c">test link</a>
4
+ </body>
5
+ </html>
@@ -0,0 +1,8 @@
1
+ <html>
2
+ <head>
3
+ <meta http-equiv="refresh" content="0; url=http://localhost/index.html">
4
+ </head>
5
+ <body>
6
+ This page has a meta refresh.
7
+ </body>
8
+ </html>
@@ -0,0 +1,48 @@
1
+ <html>
2
+ <head><title>Page Title</title></head>
3
+ <body>
4
+ <h1>Post Form 1</h1>
5
+ <form name="post_form1" method="post" action="/form_post?a=b&amp;b=c">
6
+ <table>
7
+ <tr>
8
+ <td>First Name</td>
9
+ <td><input type="text" name="first_name" /></td>
10
+ </tr>
11
+ </table><br />
12
+ <input type="submit" value="Submit" />
13
+ </form>
14
+
15
+ <h1>Post Form 2</h1>
16
+ <form name="post_form2" method="get" action="/form_post?a=b&amp;b=c">
17
+ <table>
18
+ <tr>
19
+ <td>First Name</td>
20
+ <td><input type="text" name="first_name" /></td>
21
+ </tr>
22
+ </table><br />
23
+ <input type="submit" value="Submit" />
24
+ </form>
25
+
26
+ <h1>Post Form 3</h1>
27
+ <form name="post_form3" method="post" action="/form_post?a=b&b=c">
28
+ <table>
29
+ <tr>
30
+ <td>First Name</td>
31
+ <td><input type="text" name="first_name" /></td>
32
+ </tr>
33
+ </table><br />
34
+ <input type="submit" value="Submit" />
35
+ </form>
36
+
37
+ <h1>Post Form 4</h1>
38
+ <form name="post_form4" method="post" action="/form_post#1">
39
+ <table>
40
+ <tr>
41
+ <td>First Name</td>
42
+ <td><input type="text" name="first_name" /></td>
43
+ </tr>
44
+ </table><br />
45
+ <input type="submit" value="Submit" />
46
+ </form>
47
+ </body>
48
+ </html>
@@ -0,0 +1,18 @@
1
+ <html>
2
+ <body>
3
+ <a href="thing.html"><b>Bold Dude</b></a>
4
+ <a href="thing.html">Dude</a>
5
+ <a href="thing.html">Aaron <b>James</b> Patterson</a>
6
+ <a href="thing.html"><b>Aaron</b> Patterson</a>
7
+ <a href="thing.html">Ruby <b>Rocks!</b></a>
8
+ <!-- Testing a bug with escaped stuff in links:
9
+ http://rubyforge.org/pipermail/mechanize-users/2006-September/000002.html
10
+ -->
11
+ <a href="link%20with%20space.html">encoded space</a>
12
+ <a href="link with space.html">not encoded space</a>
13
+ <!-- End escaped bug -->
14
+ <a href="unusual&&%3F%3F%23%23.html">unusual characters</a>
15
+
16
+ <a href="javascript:new_page('1')">javascript link</a>
17
+ </body>
18
+ </html>
@@ -0,0 +1,16 @@
1
+ <html>
2
+ <meta>
3
+ <head><title></title>
4
+ <body>
5
+ <a>Hello</a>
6
+ <a><img /></a>
7
+ <form>
8
+ <input />
9
+ <select>
10
+ <option />
11
+ </select>
12
+ <textarea></textarea>
13
+ </form>
14
+ <frame></frame>
15
+ </body>
16
+ </html>
@@ -0,0 +1,17 @@
1
+ <html>
2
+ <head><title>tc_pretty_print.html</title></head>
3
+ <body>
4
+ <a href="http://google.com/">Google</a><br />
5
+ <form method="post" action="/form_post" name="form1">
6
+ <input type="text" name="first_name"/><br />
7
+ <input type="password" name="password" /><br />
8
+ <input type="hidden" name="secret" value="hey" />
9
+ <input type="checkbox" name="checkme" />
10
+ <input type="radio" name="r" value="one" /><br />
11
+ <input type="radio" name="r" value="two" /><br />
12
+ <input type="submit" value="Submit" />
13
+ </form>
14
+ <frame src="http://memepool.com/" />
15
+ <iframe src="http://memepool.com/" />
16
+ </body>
17
+ </html>
@@ -0,0 +1,17 @@
1
+ <html>
2
+ <head><title>tc_radiobuttons.html</title></head>
3
+ <body>
4
+ <form name="form1" method="post" action="/form_post">
5
+ Gender:<br />
6
+ M: <input type="radio" name="gender" value="male" /><br />
7
+ F: <input type="radio" name="gender" value="female" /><br />
8
+ Your one favorite color:<br />
9
+ Green: <input type="radio" name="color" value="green" /><br />
10
+ Red: <input type="radio" name="color" value="red" /><br />
11
+ Blue: <input type="radio" name="color" value="blue" /><br />
12
+ Yellow: <input type="radio" name="color" value="yellow" /><br />
13
+ Brown: <input type="radio" name="color" value="brown" /><br />
14
+ <input type="submit" value="Submit" />
15
+ </form>
16
+ </body>
17
+ </html>
@@ -0,0 +1,10 @@
1
+ <html>
2
+ <body>
3
+ <a href="/referer">Referer Servlet</a>
4
+ <br />
5
+ <form method="post" action="/referer">
6
+ <input type="text" name="first" /></br>
7
+ <input type="submit" value="Submit" />
8
+ </form>
9
+ </body>
10
+ </html>
@@ -0,0 +1,19 @@
1
+ <html>
2
+ <body>
3
+ <a href="relative/tc_relative_links.html">forward</a>
4
+ <FRAMESET cols="20%, 80%">
5
+ <FRAMESET rows="100, 200, 200">
6
+ <FRAME name="frame1" src="relative/tc_relative_links.html">
7
+ <FRAME name="frame2" src="relative/tc_relative_links.html">
8
+ </FRAMESET>
9
+ <FRAMESET rows="100, 200">
10
+ <FRAME name="frame3" src="/file_upload.html">
11
+ <IFRAME src="http://google.com/" name="frame4">
12
+ [Your user agent does not support frames or is currently configured
13
+ not to display frames. However, you may visit
14
+ <A href="foo.html">the related document.</A>]
15
+ </IFRAME>
16
+ </FRAMESET>
17
+ </FRAMESET>
18
+ </body>
19
+ </html>
@@ -0,0 +1,23 @@
1
+ <html>
2
+ <head><title>tc_textarea.html</title></head>
3
+ <body>
4
+ <form name="form1" method="post" action="/form_post">
5
+ <textarea name="text1"></textarea>
6
+ <br />
7
+ <input type="submit" value="Submit" />
8
+ </form>
9
+ <br />
10
+ <form name="form2" method="post" action="/form_post">
11
+ <textarea name="text1">sample text</textarea>
12
+ <br />
13
+ <input type="submit" value="Submit" />
14
+ </form>
15
+ <br />
16
+ <form name="form3" method="post" action="/form_post">
17
+ <textarea name="text1"></textarea>
18
+ <textarea name="text1">sample text</textarea>
19
+ <br />
20
+ <input type="submit" value="Submit" />
21
+ </form>
22
+ </body>
23
+ </html>
@@ -0,0 +1,5 @@
1
+ <html>
2
+ <body>
3
+ This is a webpage that has a very unusual name.
4
+ </body>
5
+ </html>