Chromium Code Reviews| Index: chrome/test/data/password/password_xhr_submit.html |
| diff --git a/chrome/test/data/password/password_xhr_submit.html b/chrome/test/data/password/password_xhr_submit.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..006ec61f8880485fb5522ae4a55fad9d248bb990 |
| --- /dev/null |
| +++ b/chrome/test/data/password/password_xhr_submit.html |
| @@ -0,0 +1,28 @@ |
| +<html> |
| +<head> |
| +<script> |
| + |
| +function state_changed(xhr) { |
| + if (xhr.readyState == 4) { |
| + window.location.href = "password_xhr_done.html"; |
| + } |
|
Ilya Sherman
2013/03/22 03:26:48
nit: Omit the curly braces?
|
| +} |
| + |
| +function send_xhr() { |
| + var xhr = new XMLHttpRequest(); |
| + xhr.onreadystatechange = function() { state_changed(xhr); }; |
| + xhr.open("GET", "password_xhr_submit.html", true); |
| + xhr.send(null); |
| +} |
| + |
| +</script> |
| +</head> |
| +<body> |
| +<form action="password_xhr_submit.html" onsubmit="send_xhr(); return false;" |
| + id="testform"> |
| + <input type="text" id="username_field" name="username_field"> |
| + <input type="password" id="password_field" name="password_field"> |
| + <input type="submit" id="submit_button" name="submit_button"> |
| +</form> |
| +</body> |
| +</html> |