OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/histogram_samples.h" | 8 #include "base/metrics/histogram_samples.h" |
9 #include "base/metrics/statistics_recorder.h" | 9 #include "base/metrics/statistics_recorder.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 observer.Wait(); | 432 observer.Wait(); |
433 EXPECT_FALSE(observer.infobar_shown()); | 433 EXPECT_FALSE(observer.infobar_shown()); |
434 } | 434 } |
435 | 435 |
436 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest, | 436 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest, |
437 VerifyPasswordGenerationUpload) { | 437 VerifyPasswordGenerationUpload) { |
438 // Prevent Autofill requests from actually going over the wire. | 438 // Prevent Autofill requests from actually going over the wire. |
439 net::TestURLFetcherFactory factory; | 439 net::TestURLFetcherFactory factory; |
440 // Disable Autofill requesting access to AddressBook data. This causes | 440 // Disable Autofill requesting access to AddressBook data. This causes |
441 // the test to hang on Mac. | 441 // the test to hang on Mac. |
442 autofill::test::DisableSystemServices(browser()->profile()); | 442 autofill::test::DisableSystemServices(browser()->profile()->GetPrefs()); |
443 | 443 |
444 // Visit a signup form. | 444 // Visit a signup form. |
445 NavigateToFile("/password/signup_form.html"); | 445 NavigateToFile("/password/signup_form.html"); |
446 | 446 |
447 // Enter a password and save it. | 447 // Enter a password and save it. |
448 NavigationObserver first_observer(WebContents()); | 448 NavigationObserver first_observer(WebContents()); |
449 std::string fill_and_submit = | 449 std::string fill_and_submit = |
450 "document.getElementById('other_info').value = 'stuff';" | 450 "document.getElementById('other_info').value = 'stuff';" |
451 "document.getElementById('username_field').value = 'my_username';" | 451 "document.getElementById('username_field').value = 'my_username';" |
452 "document.getElementById('password_field').value = 'password';" | 452 "document.getElementById('password_field').value = 'password';" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 DontPromptForPasswordFormWithDefaultValue) { | 646 DontPromptForPasswordFormWithDefaultValue) { |
647 NavigateToFile("/password/password_form_with_default_value.html"); | 647 NavigateToFile("/password/password_form_with_default_value.html"); |
648 | 648 |
649 // Don't prompt if we navigate away even if there is a password value since | 649 // Don't prompt if we navigate away even if there is a password value since |
650 // it's not coming from the user. | 650 // it's not coming from the user. |
651 NavigationObserver observer(WebContents()); | 651 NavigationObserver observer(WebContents()); |
652 NavigateToFile("/password/done.html"); | 652 NavigateToFile("/password/done.html"); |
653 observer.Wait(); | 653 observer.Wait(); |
654 EXPECT_FALSE(observer.infobar_shown()); | 654 EXPECT_FALSE(observer.infobar_shown()); |
655 } | 655 } |
OLD | NEW |