Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1514)

Unified Diff: chrome/test/data/password/password_xhr_submit.html

Issue 12713007: Fix the no password save issue for ajax login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698