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

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

Issue 2932863002: Enable PasswordGenerationInteractiveTest.PopupShownAndPasswordSelected (Closed)
Patch Set: Created 3 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 7 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
8 #include "chrome/browser/password_manager/password_manager_test_base.h" 8 #include "chrome/browser/password_manager/password_manager_test_base.h"
9 #include "chrome/browser/password_manager/password_store_factory.h" 9 #include "chrome/browser/password_manager/password_store_factory.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 130 }
131 131
132 bool EditingPopupShowing() { 132 bool EditingPopupShowing() {
133 return observer_.popup_showing() && !observer_.password_visible(); 133 return observer_.popup_showing() && !observer_.password_visible();
134 } 134 }
135 135
136 private: 136 private:
137 TestPopupObserver observer_; 137 TestPopupObserver observer_;
138 }; 138 };
139 139
140 // Disabled due to flakiness due to resizes, see http://crbug.com/407998.
141 IN_PROC_BROWSER_TEST_F(PasswordGenerationInteractiveTest, 140 IN_PROC_BROWSER_TEST_F(PasswordGenerationInteractiveTest,
142 DISABLED_PopupShownAndPasswordSelected) { 141 PopupShownAndPasswordSelected) {
143 FocusPasswordField(); 142 FocusPasswordField();
144 EXPECT_TRUE(GenerationPopupShowing()); 143 EXPECT_TRUE(GenerationPopupShowing());
145 SendKeyToPopup(ui::VKEY_DOWN); 144 SendKeyToPopup(ui::VKEY_DOWN);
146 SendKeyToPopup(ui::VKEY_RETURN); 145 SendKeyToPopup(ui::VKEY_RETURN);
147 146
148 // Selecting the password should fill the field and move focus to the 147 // Selecting the password should fill the field and move focus to the
149 // submit button. 148 // submit button.
150 EXPECT_FALSE(GetFieldValue("password_field").empty()); 149 EXPECT_FALSE(GetFieldValue("password_field").empty());
151 EXPECT_FALSE(GenerationPopupShowing()); 150 EXPECT_FALSE(GenerationPopupShowing());
152 EXPECT_FALSE(EditingPopupShowing()); 151 EXPECT_FALSE(EditingPopupShowing());
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 EXPECT_FALSE(password_store->IsEmpty()); 219 EXPECT_FALSE(password_store->IsEmpty());
221 220
222 // Make sure the username is correct. 221 // Make sure the username is correct.
223 password_manager::TestPasswordStore::PasswordMap stored_passwords = 222 password_manager::TestPasswordStore::PasswordMap stored_passwords =
224 password_store->stored_passwords(); 223 password_store->stored_passwords();
225 EXPECT_EQ(1u, stored_passwords.size()); 224 EXPECT_EQ(1u, stored_passwords.size());
226 EXPECT_EQ(1u, stored_passwords.begin()->second.size()); 225 EXPECT_EQ(1u, stored_passwords.begin()->second.size());
227 EXPECT_EQ(base::UTF8ToUTF16("something"), 226 EXPECT_EQ(base::UTF8ToUTF16("something"),
228 (stored_passwords.begin()->second)[0].username_value); 227 (stored_passwords.begin()->second)[0].username_value);
229 } 228 }
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