Lines Matching refs:form

62   // Example password form.
63 PasswordForm form;
64 form.origin = GURL("http://accounts.google.com/LoginAuth");
65 form.action = GURL("http://accounts.google.com/Login");
66 form.username_element = ASCIIToUTF16("Email");
67 form.username_value = ASCIIToUTF16("test@gmail.com");
68 form.password_element = ASCIIToUTF16("Passwd");
69 form.password_value = ASCIIToUTF16("test");
70 form.submit_element = ASCIIToUTF16("signIn");
71 form.signon_realm = "http://www.google.com/";
72 form.ssl_valid = false;
73 form.preferred = false;
74 form.scheme = PasswordForm::SCHEME_HTML;
75 form.times_used = 1;
76 form.form_data.name = ASCIIToUTF16("form_name");
77 form.form_data.method = ASCIIToUTF16("POST");
81 EXPECT_TRUE(db_.AddLogin(form));
84 FormsAreEqual(form, *result[0]);
89 EXPECT_TRUE(db_.GetLogins(form, &result));
95 PasswordForm form2(form);
139 EXPECT_TRUE(db_.RemoveLogin(form));
145 // The old form wont match the new site (http vs https).
146 EXPECT_TRUE(db_.GetLogins(form, &result));
166 // old form, and there is only one record.
204 // Example password form.
205 PasswordForm form;
206 form.origin = GURL("https://foo.com/");
207 form.action = GURL("https://foo.com/login");
208 form.username_element = ASCIIToUTF16("username");
209 form.username_value = ASCIIToUTF16("test@gmail.com");
210 form.password_element = ASCIIToUTF16("password");
211 form.password_value = ASCIIToUTF16("test");
212 form.submit_element = ASCIIToUTF16("");
213 form.signon_realm = "https://foo.com/";
214 form.ssl_valid = true;
215 form.preferred = false;
216 form.scheme = PasswordForm::SCHEME_HTML;
219 EXPECT_TRUE(db_.AddLogin(form));
226 EXPECT_TRUE(db_.GetLogins(form, &result));
232 PasswordForm form2(form);
254 // Example password form.
255 PasswordForm form;
256 form.origin = GURL("https://accounts.google.com/");
257 form.action = GURL("https://accounts.google.com/login");
258 form.username_element = ASCIIToUTF16("username");
259 form.username_value = ASCIIToUTF16("test@gmail.com");
260 form.password_element = ASCIIToUTF16("password");
261 form.password_value = ASCIIToUTF16("test");
262 form.submit_element = ASCIIToUTF16("");
263 form.signon_realm = "https://accounts.google.com/";
264 form.ssl_valid = true;
265 form.preferred = false;
266 form.scheme = PasswordForm::SCHEME_HTML;
269 EXPECT_TRUE(db_.AddLogin(form));
276 EXPECT_TRUE(db_.GetLogins(form, &result));
282 PasswordForm form2(form);
304 // Example password form.
305 PasswordForm form;
306 form.origin = GURL("https://foo.com/");
307 form.action = GURL("https://foo.com/login");
308 form.username_element = ASCIIToUTF16("username");
309 form.username_value = ASCIIToUTF16("test@gmail.com");
310 form.password_element = ASCIIToUTF16("password");
311 form.password_value = ASCIIToUTF16("test");
312 form.submit_element = ASCIIToUTF16("");
313 form.signon_realm = "https://foo.com/";
314 form.ssl_valid = true;
315 form.preferred = false;
316 form.scheme = PasswordForm::SCHEME_HTML;
319 EXPECT_TRUE(db_.AddLogin(form));
326 EXPECT_TRUE(db_.GetLogins(form, &result));
332 PasswordForm form2(form);
346 form.origin = GURL("https://baz.com/login/");
347 form.action = GURL("https://baz.com/login/");
348 form.username_element = ASCIIToUTF16("email");
349 form.username_value = ASCIIToUTF16("test@gmail.com");
350 form.password_element = ASCIIToUTF16("password");
351 form.password_value = ASCIIToUTF16("test");
352 form.submit_element = ASCIIToUTF16("");
353 form.signon_realm = "https://baz.com/";
354 form.ssl_valid = true;
355 form.preferred = false;
356 form.scheme = PasswordForm::SCHEME_HTML;
359 EXPECT_TRUE(db_.AddLogin(form));
367 PasswordForm form3(form);
381 PasswordForm GetFormWithNewSignonRealm(PasswordForm form,
383 PasswordForm form2(form);
398 // Example password form.
399 PasswordForm form;
400 form.origin = GURL("http://foo.com/");
401 form.action = GURL("http://foo.com/login");
402 form.username_element = ASCIIToUTF16("username");
403 form.username_value = ASCIIToUTF16("test@gmail.com");
404 form.password_element = ASCIIToUTF16("password");
405 form.password_value = ASCIIToUTF16("test");
406 form.submit_element = ASCIIToUTF16("");
407 form.signon_realm = "http://foo.com/";
408 form.ssl_valid = false;
409 form.preferred = false;
410 form.scheme = PasswordForm::SCHEME_HTML;
413 EXPECT_TRUE(db_.AddLogin(form));
419 // Example password form that has - in the domain name.
421 GetFormWithNewSignonRealm(form, "http://www.foo-bar.com/");
432 EXPECT_TRUE(db_.GetLogins(form, &result));
438 PasswordForm form2 = GetFormWithNewSignonRealm(form, "http://www.foo.com/");
445 form2 = GetFormWithNewSignonRealm(form, "http://a.b.foo.com/");
452 form2 = GetFormWithNewSignonRealm(form, "http://a-b.foo.com/");
459 form2 = GetFormWithNewSignonRealm(form, "http://foo-bar.com/");
466 form2 = GetFormWithNewSignonRealm(form, "http://www.foo-bar.com/");
473 form2 = GetFormWithNewSignonRealm(form, "http://a.b.foo-bar.com/");
480 form2 = GetFormWithNewSignonRealm(form, "http://a-b.foo-bar.com/");
487 form2 = GetFormWithNewSignonRealm(form, "http://foo.com:1337/");
492 form2 = GetFormWithNewSignonRealm(form, "https://foo.com/");
497 form2 = GetFormWithNewSignonRealm(form, "http://notfoo.com/");
502 form2 = GetFormWithNewSignonRealm(form, "http://baz.com/");
507 form2 = GetFormWithNewSignonRealm(form, "http://foo-baz.com/");
515 // Example password form.
516 PasswordForm form;
517 form.origin = GURL(url + std::string("/LoginAuth"));
518 form.username_element = ASCIIToUTF16(unique_string);
519 form.username_value = ASCIIToUTF16(unique_string);
520 form.password_element = ASCIIToUTF16(unique_string);
521 form.submit_element = ASCIIToUTF16("signIn");
522 form.signon_realm = url;
523 form.date_created = time;
524 return db->AddLogin(form);
584 // Save a form as blacklisted.
585 PasswordForm form;
586 form.origin = GURL("http://accounts.google.com/LoginAuth");
587 form.action = GURL("http://accounts.google.com/Login");
588 form.username_element = ASCIIToUTF16("Email");
589 form.password_element = ASCIIToUTF16("Passwd");
590 form.submit_element = ASCIIToUTF16("signIn");
591 form.signon_realm = "http://www.google.com/";
592 form.ssl_valid = false;
593 form.preferred = true;
594 form.blacklisted_by_user = true;
595 form.scheme = PasswordForm::SCHEME_HTML;
596 EXPECT_TRUE(db_.AddLogin(form));
603 EXPECT_TRUE(db_.GetLogins(form, &result));