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

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

Issue 2146263002: Disable test made flaky by DCHECK() on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/password_manager/password_manager_test_base.h" 7 #include "chrome/browser/password_manager/password_manager_test_base.h"
8 #include "chrome/browser/password_manager/password_store_factory.h" 8 #include "chrome/browser/password_manager/password_store_factory.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 auto& passwords_map = password_store->stored_passwords(); 74 auto& passwords_map = password_store->stored_passwords();
75 ASSERT_EQ(1u, passwords_map.size()); 75 ASSERT_EQ(1u, passwords_map.size());
76 auto& passwords_vector = passwords_map.begin()->second; 76 auto& passwords_vector = passwords_map.begin()->second;
77 ASSERT_EQ(1u, passwords_vector.size()); 77 ASSERT_EQ(1u, passwords_vector.size());
78 const autofill::PasswordForm& form = passwords_vector[0]; 78 const autofill::PasswordForm& form = passwords_vector[0];
79 EXPECT_EQ(base::ASCIIToUTF16("user"), form.username_value); 79 EXPECT_EQ(base::ASCIIToUTF16("user"), form.username_value);
80 EXPECT_EQ(base::ASCIIToUTF16("password"), form.password_value); 80 EXPECT_EQ(base::ASCIIToUTF16("password"), form.password_value);
81 EXPECT_FALSE(form.skip_zero_click); 81 EXPECT_FALSE(form.skip_zero_click);
82 } 82 }
83 83
84 // TODO(crbug.com/626759): flakily failing on Mac.
85 #if defined(OS_MACOSX)
86 #define MAYBE_AutoSigninOldCredentialAndNavigation \
87 DISABLED_AutoSigninOldCredentialAndNavigation
88 #else
89 #define MAYBE_AutoSigninOldCredentialAndNavigation \
90 AutoSigninOldCredentialAndNavigation
91 #endif
84 IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest, 92 IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
85 AutoSigninOldCredentialAndNavigation) { 93 MAYBE_AutoSigninOldCredentialAndNavigation) {
86 // Save credentials with 'skip_zero_click' false. 94 // Save credentials with 'skip_zero_click' false.
87 scoped_refptr<password_manager::TestPasswordStore> password_store = 95 scoped_refptr<password_manager::TestPasswordStore> password_store =
88 static_cast<password_manager::TestPasswordStore*>( 96 static_cast<password_manager::TestPasswordStore*>(
89 PasswordStoreFactory::GetForProfile( 97 PasswordStoreFactory::GetForProfile(
90 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS).get()); 98 browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS).get());
91 autofill::PasswordForm signin_form; 99 autofill::PasswordForm signin_form;
92 signin_form.signon_realm = embedded_test_server()->base_url().spec(); 100 signin_form.signon_realm = embedded_test_server()->base_url().spec();
93 signin_form.password_value = base::ASCIIToUTF16("password"); 101 signin_form.password_value = base::ASCIIToUTF16("password");
94 signin_form.username_value = base::ASCIIToUTF16("user"); 102 signin_form.username_value = base::ASCIIToUTF16("user");
95 signin_form.origin = embedded_test_server()->base_url(); 103 signin_form.origin = embedded_test_server()->base_url();
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 "document.getElementById('input_submit_button').click();")); 201 "document.getElementById('input_submit_button').click();"));
194 form_submit_observer.Wait(); 202 form_submit_observer.Wait();
195 EXPECT_FALSE(prompt_observer->IsShowingSavePrompt()); 203 EXPECT_FALSE(prompt_observer->IsShowingSavePrompt());
196 EXPECT_FALSE(prompt_observer->IsShowingUpdatePrompt()); 204 EXPECT_FALSE(prompt_observer->IsShowingUpdatePrompt());
197 stored = password_store->stored_passwords(); 205 stored = password_store->stored_passwords();
198 ASSERT_EQ(1u, stored.size()); 206 ASSERT_EQ(1u, stored.size());
199 EXPECT_EQ(signin_form, stored[signin_form.signon_realm][0]); 207 EXPECT_EQ(signin_form, stored[signin_form.signon_realm][0]);
200 } 208 }
201 209
202 } // namespace 210 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698