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

Side by Side Diff: chrome/browser/password_manager/password_manager_browsertest.cc

Issue 1978563002: Stop compiling password infobar code on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up cocoa Created 4 years, 7 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 unified diff | Download patch
OLDNEW
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 #include <utility> 6 #include <utility>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 content::RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT); 2042 content::RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
2043 2043
2044 IPC::IpcSecurityTestUtil::PwnMessageReceived( 2044 IPC::IpcSecurityTestUtil::PwnMessageReceived(
2045 iframe->GetProcess()->GetChannel(), illegal_forms_parsed); 2045 iframe->GetProcess()->GetChannel(), illegal_forms_parsed);
2046 2046
2047 iframe_killed.Wait(); 2047 iframe_killed.Wait();
2048 } 2048 }
2049 2049
2050 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, 2050 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
2051 ChangePwdNoAccountStored) { 2051 ChangePwdNoAccountStored) {
2052 ASSERT_TRUE(ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled());
2053 NavigateToFile("/password/password_form.html"); 2052 NavigateToFile("/password/password_form.html");
2054 2053
2055 // Fill a form and submit through a <input type="submit"> button. 2054 // Fill a form and submit through a <input type="submit"> button.
2056 NavigationObserver observer(WebContents()); 2055 NavigationObserver observer(WebContents());
2057 std::unique_ptr<PromptObserver> prompt_observer( 2056 std::unique_ptr<PromptObserver> prompt_observer(
2058 PromptObserver::Create(WebContents())); 2057 PromptObserver::Create(WebContents()));
2059 2058
2060 std::string fill_and_submit = 2059 std::string fill_and_submit =
2061 "document.getElementById('chg_password_wo_username_field').value = " 2060 "document.getElementById('chg_password_wo_username_field').value = "
2062 "'old_pw';" 2061 "'old_pw';"
(...skipping 17 matching lines...) Expand all
2080 // the password. 2079 // the password.
2081 base::RunLoop run_loop; 2080 base::RunLoop run_loop;
2082 run_loop.RunUntilIdle(); 2081 run_loop.RunUntilIdle();
2083 EXPECT_FALSE(password_store->IsEmpty()); 2082 EXPECT_FALSE(password_store->IsEmpty());
2084 CheckThatCredentialsStored(password_store.get(), base::ASCIIToUTF16(""), 2083 CheckThatCredentialsStored(password_store.get(), base::ASCIIToUTF16(""),
2085 base::ASCIIToUTF16("new_pw")); 2084 base::ASCIIToUTF16("new_pw"));
2086 } 2085 }
2087 2086
2088 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, 2087 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
2089 ChangePwd1AccountStored) { 2088 ChangePwd1AccountStored) {
2090 ASSERT_TRUE(ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled());
2091 // At first let us save credentials to the PasswordManager. 2089 // At first let us save credentials to the PasswordManager.
2092 scoped_refptr<password_manager::TestPasswordStore> password_store = 2090 scoped_refptr<password_manager::TestPasswordStore> password_store =
2093 static_cast<password_manager::TestPasswordStore*>( 2091 static_cast<password_manager::TestPasswordStore*>(
2094 PasswordStoreFactory::GetForProfile( 2092 PasswordStoreFactory::GetForProfile(
2095 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) 2093 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS)
2096 .get()); 2094 .get());
2097 autofill::PasswordForm signin_form; 2095 autofill::PasswordForm signin_form;
2098 signin_form.signon_realm = embedded_test_server()->base_url().spec(); 2096 signin_form.signon_realm = embedded_test_server()->base_url().spec();
2099 signin_form.password_value = base::ASCIIToUTF16("pw"); 2097 signin_form.password_value = base::ASCIIToUTF16("pw");
2100 signin_form.username_value = base::ASCIIToUTF16("temp"); 2098 signin_form.username_value = base::ASCIIToUTF16("temp");
(...skipping 26 matching lines...) Expand all
2127 // Spin the message loop to make sure the password store had a chance to 2125 // Spin the message loop to make sure the password store had a chance to
2128 // update the password. 2126 // update the password.
2129 base::RunLoop run_loop; 2127 base::RunLoop run_loop;
2130 run_loop.RunUntilIdle(); 2128 run_loop.RunUntilIdle();
2131 CheckThatCredentialsStored(password_store.get(), base::ASCIIToUTF16("temp"), 2129 CheckThatCredentialsStored(password_store.get(), base::ASCIIToUTF16("temp"),
2132 base::ASCIIToUTF16("new_pw")); 2130 base::ASCIIToUTF16("new_pw"));
2133 } 2131 }
2134 2132
2135 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, 2133 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
2136 PasswordOverridenUpdateBubbleShown) { 2134 PasswordOverridenUpdateBubbleShown) {
2137 ASSERT_TRUE(ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled());
2138 // At first let us save credentials to the PasswordManager. 2135 // At first let us save credentials to the PasswordManager.
2139 scoped_refptr<password_manager::TestPasswordStore> password_store = 2136 scoped_refptr<password_manager::TestPasswordStore> password_store =
2140 static_cast<password_manager::TestPasswordStore*>( 2137 static_cast<password_manager::TestPasswordStore*>(
2141 PasswordStoreFactory::GetForProfile( 2138 PasswordStoreFactory::GetForProfile(
2142 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) 2139 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS)
2143 .get()); 2140 .get());
2144 autofill::PasswordForm signin_form; 2141 autofill::PasswordForm signin_form;
2145 signin_form.signon_realm = embedded_test_server()->base_url().spec(); 2142 signin_form.signon_realm = embedded_test_server()->base_url().spec();
2146 signin_form.username_value = base::ASCIIToUTF16("temp"); 2143 signin_form.username_value = base::ASCIIToUTF16("temp");
2147 signin_form.password_value = base::ASCIIToUTF16("pw"); 2144 signin_form.password_value = base::ASCIIToUTF16("pw");
(...skipping 20 matching lines...) Expand all
2168 // Spin the message loop to make sure the password store had a chance to 2165 // Spin the message loop to make sure the password store had a chance to
2169 // update the password. 2166 // update the password.
2170 base::RunLoop run_loop; 2167 base::RunLoop run_loop;
2171 run_loop.RunUntilIdle(); 2168 run_loop.RunUntilIdle();
2172 CheckThatCredentialsStored(password_store.get(), base::ASCIIToUTF16("temp"), 2169 CheckThatCredentialsStored(password_store.get(), base::ASCIIToUTF16("temp"),
2173 base::ASCIIToUTF16("new_pw")); 2170 base::ASCIIToUTF16("new_pw"));
2174 } 2171 }
2175 2172
2176 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, 2173 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
2177 PasswordNotOverridenUpdateBubbleNotShown) { 2174 PasswordNotOverridenUpdateBubbleNotShown) {
2178 ASSERT_TRUE(ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled());
2179 // At first let us save credentials to the PasswordManager. 2175 // At first let us save credentials to the PasswordManager.
2180 scoped_refptr<password_manager::TestPasswordStore> password_store = 2176 scoped_refptr<password_manager::TestPasswordStore> password_store =
2181 static_cast<password_manager::TestPasswordStore*>( 2177 static_cast<password_manager::TestPasswordStore*>(
2182 PasswordStoreFactory::GetForProfile( 2178 PasswordStoreFactory::GetForProfile(
2183 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) 2179 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS)
2184 .get()); 2180 .get());
2185 autofill::PasswordForm signin_form; 2181 autofill::PasswordForm signin_form;
2186 signin_form.signon_realm = embedded_test_server()->base_url().spec(); 2182 signin_form.signon_realm = embedded_test_server()->base_url().spec();
2187 signin_form.username_value = base::ASCIIToUTF16("temp"); 2183 signin_form.username_value = base::ASCIIToUTF16("temp");
2188 signin_form.password_value = base::ASCIIToUTF16("pw"); 2184 signin_form.password_value = base::ASCIIToUTF16("pw");
(...skipping 12 matching lines...) Expand all
2201 observer.Wait(); 2197 observer.Wait();
2202 // The stored password "pw" was not overriden, so update prompt is not 2198 // The stored password "pw" was not overriden, so update prompt is not
2203 // expected. 2199 // expected.
2204 EXPECT_FALSE(prompt_observer->IsShowingUpdatePrompt()); 2200 EXPECT_FALSE(prompt_observer->IsShowingUpdatePrompt());
2205 CheckThatCredentialsStored(password_store.get(), base::ASCIIToUTF16("temp"), 2201 CheckThatCredentialsStored(password_store.get(), base::ASCIIToUTF16("temp"),
2206 base::ASCIIToUTF16("pw")); 2202 base::ASCIIToUTF16("pw"));
2207 } 2203 }
2208 2204
2209 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, 2205 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
2210 ChangePwdWhenTheFormContainNotUsernameTextfield) { 2206 ChangePwdWhenTheFormContainNotUsernameTextfield) {
2211 ASSERT_TRUE(ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled());
2212 // At first let us save credentials to the PasswordManager. 2207 // At first let us save credentials to the PasswordManager.
2213 scoped_refptr<password_manager::TestPasswordStore> password_store = 2208 scoped_refptr<password_manager::TestPasswordStore> password_store =
2214 static_cast<password_manager::TestPasswordStore*>( 2209 static_cast<password_manager::TestPasswordStore*>(
2215 PasswordStoreFactory::GetForProfile( 2210 PasswordStoreFactory::GetForProfile(
2216 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) 2211 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS)
2217 .get()); 2212 .get());
2218 autofill::PasswordForm signin_form; 2213 autofill::PasswordForm signin_form;
2219 signin_form.signon_realm = embedded_test_server()->base_url().spec(); 2214 signin_form.signon_realm = embedded_test_server()->base_url().spec();
2220 signin_form.password_value = base::ASCIIToUTF16("pw"); 2215 signin_form.password_value = base::ASCIIToUTF16("pw");
2221 signin_form.username_value = base::ASCIIToUTF16("temp"); 2216 signin_form.username_value = base::ASCIIToUTF16("temp");
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
2782 base::RunLoop run_loop; 2777 base::RunLoop run_loop;
2783 run_loop.RunUntilIdle(); 2778 run_loop.RunUntilIdle();
2784 CheckThatCredentialsStored(password_store.get(), base::string16(), 2779 CheckThatCredentialsStored(password_store.get(), base::string16(),
2785 base::ASCIIToUTF16("pw")); 2780 base::ASCIIToUTF16("pw"));
2786 } 2781 }
2787 2782
2788 // Tests that no bubble shown when a password form without username submitted 2783 // Tests that no bubble shown when a password form without username submitted
2789 // and there is stored credentials with the same password. 2784 // and there is stored credentials with the same password.
2790 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, 2785 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
2791 PasswordRetryFormNoBubbleWhenPasswordTheSame) { 2786 PasswordRetryFormNoBubbleWhenPasswordTheSame) {
2792 ASSERT_TRUE(ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled());
2793 // At first let us save credentials to the PasswordManager. 2787 // At first let us save credentials to the PasswordManager.
2794 scoped_refptr<password_manager::TestPasswordStore> password_store = 2788 scoped_refptr<password_manager::TestPasswordStore> password_store =
2795 static_cast<password_manager::TestPasswordStore*>( 2789 static_cast<password_manager::TestPasswordStore*>(
2796 PasswordStoreFactory::GetForProfile( 2790 PasswordStoreFactory::GetForProfile(
2797 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) 2791 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS)
2798 .get()); 2792 .get());
2799 autofill::PasswordForm signin_form; 2793 autofill::PasswordForm signin_form;
2800 signin_form.signon_realm = embedded_test_server()->base_url().spec(); 2794 signin_form.signon_realm = embedded_test_server()->base_url().spec();
2801 signin_form.username_value = base::ASCIIToUTF16("temp"); 2795 signin_form.username_value = base::ASCIIToUTF16("temp");
2802 signin_form.password_value = base::ASCIIToUTF16("pw"); 2796 signin_form.password_value = base::ASCIIToUTF16("pw");
(...skipping 14 matching lines...) Expand all
2817 ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), fill_and_submit)); 2811 ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), fill_and_submit));
2818 observer.Wait(); 2812 observer.Wait();
2819 EXPECT_FALSE(prompt_observer->IsShowingPrompt()); 2813 EXPECT_FALSE(prompt_observer->IsShowingPrompt());
2820 EXPECT_FALSE(prompt_observer->IsShowingUpdatePrompt()); 2814 EXPECT_FALSE(prompt_observer->IsShowingUpdatePrompt());
2821 } 2815 }
2822 2816
2823 // Tests that the update bubble shown when a password form without username is 2817 // Tests that the update bubble shown when a password form without username is
2824 // submitted and there are stored credentials but with different password. 2818 // submitted and there are stored credentials but with different password.
2825 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, 2819 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
2826 PasswordRetryFormUpdateBubbleShown) { 2820 PasswordRetryFormUpdateBubbleShown) {
2827 ASSERT_TRUE(ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled());
2828 // At first let us save credentials to the PasswordManager. 2821 // At first let us save credentials to the PasswordManager.
2829 scoped_refptr<password_manager::TestPasswordStore> password_store = 2822 scoped_refptr<password_manager::TestPasswordStore> password_store =
2830 static_cast<password_manager::TestPasswordStore*>( 2823 static_cast<password_manager::TestPasswordStore*>(
2831 PasswordStoreFactory::GetForProfile( 2824 PasswordStoreFactory::GetForProfile(
2832 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) 2825 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS)
2833 .get()); 2826 .get());
2834 autofill::PasswordForm signin_form; 2827 autofill::PasswordForm signin_form;
2835 signin_form.signon_realm = embedded_test_server()->base_url().spec(); 2828 signin_form.signon_realm = embedded_test_server()->base_url().spec();
2836 signin_form.username_value = base::ASCIIToUTF16("temp"); 2829 signin_form.username_value = base::ASCIIToUTF16("temp");
2837 signin_form.password_value = base::ASCIIToUTF16("pw"); 2830 signin_form.password_value = base::ASCIIToUTF16("pw");
(...skipping 18 matching lines...) Expand all
2856 // Spin the message loop to make sure the password store had a chance to 2849 // Spin the message loop to make sure the password store had a chance to
2857 // update the password. 2850 // update the password.
2858 base::RunLoop run_loop; 2851 base::RunLoop run_loop;
2859 run_loop.RunUntilIdle(); 2852 run_loop.RunUntilIdle();
2860 CheckThatCredentialsStored(password_store.get(), base::ASCIIToUTF16("temp"), 2853 CheckThatCredentialsStored(password_store.get(), base::ASCIIToUTF16("temp"),
2861 base::ASCIIToUTF16("new_pw")); 2854 base::ASCIIToUTF16("new_pw"));
2862 } 2855 }
2863 2856
2864 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, 2857 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
2865 NoCrashWhenNavigatingWithOpenAccountPicker) { 2858 NoCrashWhenNavigatingWithOpenAccountPicker) {
2866 ASSERT_TRUE(ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled());
2867 // Save credentials with 'skip_zero_click'. 2859 // Save credentials with 'skip_zero_click'.
2868 scoped_refptr<password_manager::TestPasswordStore> password_store = 2860 scoped_refptr<password_manager::TestPasswordStore> password_store =
2869 static_cast<password_manager::TestPasswordStore*>( 2861 static_cast<password_manager::TestPasswordStore*>(
2870 PasswordStoreFactory::GetForProfile( 2862 PasswordStoreFactory::GetForProfile(
2871 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) 2863 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS)
2872 .get()); 2864 .get());
2873 autofill::PasswordForm signin_form; 2865 autofill::PasswordForm signin_form;
2874 signin_form.signon_realm = embedded_test_server()->base_url().spec(); 2866 signin_form.signon_realm = embedded_test_server()->base_url().spec();
2875 signin_form.password_value = base::ASCIIToUTF16("password"); 2867 signin_form.password_value = base::ASCIIToUTF16("password");
2876 signin_form.username_value = base::ASCIIToUTF16("user"); 2868 signin_form.username_value = base::ASCIIToUTF16("user");
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2919 "document.getElementById('password').value = 'mypassword';" 2911 "document.getElementById('password').value = 'mypassword';"
2920 "document.getElementById('submit').click();"; 2912 "document.getElementById('submit').click();";
2921 VerifyPasswordIsSavedAndFilled( 2913 VerifyPasswordIsSavedAndFilled(
2922 "/password/password_autocomplete_off_test.html", submit, "password", 2914 "/password/password_autocomplete_off_test.html", submit, "password",
2923 "mypassword"); 2915 "mypassword");
2924 } 2916 }
2925 2917
2926 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, 2918 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
2927 SkipZeroClickNotToggledAfterSuccessfulSubmissionWithAPI) 2919 SkipZeroClickNotToggledAfterSuccessfulSubmissionWithAPI)
2928 { 2920 {
2929 ASSERT_TRUE(ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled());
2930 // Save credentials with 'skip_zero_click' 2921 // Save credentials with 'skip_zero_click'
2931 scoped_refptr<password_manager::TestPasswordStore> password_store = 2922 scoped_refptr<password_manager::TestPasswordStore> password_store =
2932 static_cast<password_manager::TestPasswordStore*>( 2923 static_cast<password_manager::TestPasswordStore*>(
2933 PasswordStoreFactory::GetForProfile( 2924 PasswordStoreFactory::GetForProfile(
2934 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) 2925 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS)
2935 .get()); 2926 .get());
2936 autofill::PasswordForm signin_form; 2927 autofill::PasswordForm signin_form;
2937 signin_form.signon_realm = embedded_test_server()->base_url().spec(); 2928 signin_form.signon_realm = embedded_test_server()->base_url().spec();
2938 signin_form.password_value = base::ASCIIToUTF16("password"); 2929 signin_form.password_value = base::ASCIIToUTF16("password");
2939 signin_form.username_value = base::ASCIIToUTF16("user"); 2930 signin_form.username_value = base::ASCIIToUTF16("user");
(...skipping 26 matching lines...) Expand all
2966 auto& passwords_vector = passwords_map.begin()->second; 2957 auto& passwords_vector = passwords_map.begin()->second;
2967 ASSERT_EQ(1u, passwords_vector.size()); 2958 ASSERT_EQ(1u, passwords_vector.size());
2968 const autofill::PasswordForm& form = passwords_vector[0]; 2959 const autofill::PasswordForm& form = passwords_vector[0];
2969 EXPECT_EQ(base::ASCIIToUTF16("user"), form.username_value); 2960 EXPECT_EQ(base::ASCIIToUTF16("user"), form.username_value);
2970 EXPECT_EQ(base::ASCIIToUTF16("password"), form.password_value); 2961 EXPECT_EQ(base::ASCIIToUTF16("password"), form.password_value);
2971 EXPECT_TRUE(form.skip_zero_click); 2962 EXPECT_TRUE(form.skip_zero_click);
2972 } 2963 }
2973 2964
2974 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, 2965 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
2975 SkipZeroClickNotToggledAfterSuccessfulAutofill) { 2966 SkipZeroClickNotToggledAfterSuccessfulAutofill) {
2976 ASSERT_TRUE(ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled());
2977 // Save credentials with 'skip_zero_click' 2967 // Save credentials with 'skip_zero_click'
2978 scoped_refptr<password_manager::TestPasswordStore> password_store = 2968 scoped_refptr<password_manager::TestPasswordStore> password_store =
2979 static_cast<password_manager::TestPasswordStore*>( 2969 static_cast<password_manager::TestPasswordStore*>(
2980 PasswordStoreFactory::GetForProfile( 2970 PasswordStoreFactory::GetForProfile(
2981 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) 2971 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS)
2982 .get()); 2972 .get());
2983 autofill::PasswordForm signin_form; 2973 autofill::PasswordForm signin_form;
2984 signin_form.signon_realm = embedded_test_server()->base_url().spec(); 2974 signin_form.signon_realm = embedded_test_server()->base_url().spec();
2985 signin_form.password_value = base::ASCIIToUTF16("password"); 2975 signin_form.password_value = base::ASCIIToUTF16("password");
2986 signin_form.username_value = base::ASCIIToUTF16("user"); 2976 signin_form.username_value = base::ASCIIToUTF16("user");
(...skipping 22 matching lines...) Expand all
3009 ASSERT_EQ(1u, passwords_map.size()); 2999 ASSERT_EQ(1u, passwords_map.size());
3010 auto& passwords_vector = passwords_map.begin()->second; 3000 auto& passwords_vector = passwords_map.begin()->second;
3011 ASSERT_EQ(1u, passwords_vector.size()); 3001 ASSERT_EQ(1u, passwords_vector.size());
3012 const autofill::PasswordForm& form = passwords_vector[0]; 3002 const autofill::PasswordForm& form = passwords_vector[0];
3013 EXPECT_EQ(base::ASCIIToUTF16("user"), form.username_value); 3003 EXPECT_EQ(base::ASCIIToUTF16("user"), form.username_value);
3014 EXPECT_EQ(base::ASCIIToUTF16("password"), form.password_value); 3004 EXPECT_EQ(base::ASCIIToUTF16("password"), form.password_value);
3015 EXPECT_TRUE(form.skip_zero_click); 3005 EXPECT_TRUE(form.skip_zero_click);
3016 } 3006 }
3017 3007
3018 } // namespace password_manager 3008 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698