Home | History | Annotate | Download | only in password_manager

Lines Matching defs:form

70     PasswordForm form;
71 form.origin = GURL("http://www.google.com/a/LoginAuth");
72 form.action = GURL("http://www.google.com/a/Login");
73 form.username_element = ASCIIToUTF16("Email");
74 form.password_element = ASCIIToUTF16("Passwd");
75 form.username_value = ASCIIToUTF16("google");
76 form.password_value = ASCIIToUTF16("password");
78 form.password_autocomplete_set = true;
79 form.submit_element = ASCIIToUTF16("signIn");
80 form.signon_realm = "http://www.google.com";
81 return form;
92 MATCHER_P(FormMatches, form, "") {
93 return form.signon_realm == arg.signon_realm &&
94 form.origin == arg.origin &&
95 form.action == arg.action &&
96 form.username_element == arg.username_element &&
97 form.password_element == arg.password_element &&
98 form.password_autocomplete_set ==
100 form.submit_element == arg.submit_element;
104 // Test that observing a newly submitted form shows the save password bar.
110 PasswordForm form(MakeSimpleForm());
111 observed.push_back(form);
115 // And the form submit contract is to call ProvisionallySavePassword.
116 manager()->ProvisionallySavePassword(form);
128 EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form)));
130 // Simulate saving the form, as if the info bar was accepted.
142 PasswordForm form(MakeSimpleForm());
143 observed.push_back(form);
147 // Simulate the user generating the password and submitting the form.
148 manager()->SetFormHasGeneratedPassword(form);
149 manager()->ProvisionallySavePassword(form);
152 // consent by using the generated password. The form should be saved once
156 EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form)));
165 // Same as above, except with an existing form for the same signon realm,
177 PasswordForm form(MakeSimpleForm());
178 observed.push_back(form);
181 manager()->ProvisionallySavePassword(form);
194 EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form)));
196 // Simulate saving the form.
206 PasswordForm form(MakeSimpleForm());
207 observed.push_back(form);
211 PasswordForm empty_form(form);
234 PasswordForm form(MakeSimpleForm());
235 observed.push_back(form);
247 params.password_form = form;
260 EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form)));
262 // Simulate saving the form, as if the info bar was accepted.
281 // Pretend that the form is hidden on the first page.
294 // This page contains a form with the same markup, but on a different
300 // Now submit this form
304 // Navigation after form submit.
312 // Make sure that the saved form matches the second form, not the first.
316 // Simulate saving the form, as if the info bar was accepted.
326 PasswordForm form(MakeSimpleForm());
327 observed.push_back(form);
331 manager()->ProvisionallySavePassword(form);
333 // The form reappears, and is visible in the layout:
340 // Tests fix of issue 28911: if the login form reappears on the subsequent
347 PasswordForm form(MakeSimpleForm());
348 observed.push_back(form);
352 manager()->ProvisionallySavePassword(form);
359 // The form reappears, but is not visible in the layout:
365 EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form)));
367 // Simulate saving the form.
372 // Make sure an invisible login form still gets autofilled.
380 PasswordForm form(MakeSimpleForm());
381 observed.push_back(form);
415 PasswordForm form(MakeSimpleForm());
416 observed.push_back(form);
421 // Test password form with non-generated password will not be saved if
428 PasswordForm form(MakeSimpleForm());
429 form.password_autocomplete_set = false;
430 observed.push_back(form);
434 // And the form submit contract is to call ProvisionallySavePassword.
435 manager()->ProvisionallySavePassword(form);
437 // Password form should not be saved.
440 EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form))).Times(Exactly(0));
449 // Test password form with generated password will still be saved if
456 PasswordForm form(MakeSimpleForm());
457 form.password_autocomplete_set = false;
458 observed.push_back(form);
462 // Simulate the user generating the password and submitting the form.
463 manager()->SetFormHasGeneratedPassword(form);
464 manager()->ProvisionallySavePassword(form);
467 // consent by using the generated password. The form should be saved once
471 EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form)));