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

Side by Side Diff: chrome/browser/ui/views/passwords/password_dialog_view_browsertest.cc

Issue 2869683003: Views/Harmony: Remove references to layout constants in c/b/u/v/passwords. (Closed)
Patch Set: Review comments. Created 3 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
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc ('k') | 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/memory/ptr_util.h" 5 #include "base/memory/ptr_util.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/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" 10 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 462
463 // Successful login with the same form after block will prompt: 463 // Successful login with the same form after block will prompt:
464 blocked_form.reset(new autofill::PasswordForm(form)); 464 blocked_form.reset(new autofill::PasswordForm(form));
465 client()->NotifyUserCouldBeAutoSignedIn(std::move(blocked_form)); 465 client()->NotifyUserCouldBeAutoSignedIn(std::move(blocked_form));
466 client()->NotifySuccessfulLoginWithExistingPassword(form); 466 client()->NotifySuccessfulLoginWithExistingPassword(form);
467 ASSERT_TRUE(controller()->current_autosignin_prompt()); 467 ASSERT_TRUE(controller()->current_autosignin_prompt());
468 } 468 }
469 469
470 // DialogBrowserTest methods for interactive dialog invocation. 470 // DialogBrowserTest methods for interactive dialog invocation.
471 void PasswordDialogViewTest::ShowDialog(const std::string& name) { 471 void PasswordDialogViewTest::ShowDialog(const std::string& name) {
472 if (name == "AutoSigninFirstRun") {
473 controller()->OnPromptEnableAutoSignin();
474 return;
475 }
476
472 GURL origin("https://example.com"); 477 GURL origin("https://example.com");
473 std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials; 478 std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials;
474 autofill::PasswordForm form; 479 autofill::PasswordForm form;
475 form.origin = origin; 480 form.origin = origin;
476 form.display_name = base::ASCIIToUTF16("Peter"); 481 form.display_name = base::ASCIIToUTF16("Peter");
477 form.username_value = base::ASCIIToUTF16("peter@pan.test"); 482 form.username_value = base::ASCIIToUTF16("peter@pan.test");
478 if (name == "PopupAutoSigninPrompt") { 483 if (name == "PopupAutoSigninPrompt") {
479 form.icon_url = GURL("broken url"); 484 form.icon_url = GURL("broken url");
480 local_credentials.push_back(base::MakeUnique<autofill::PasswordForm>(form)); 485 local_credentials.push_back(base::MakeUnique<autofill::PasswordForm>(form));
481 form.icon_url = GURL("https://google.com/icon.png"); 486 form.icon_url = GURL("https://google.com/icon.png");
(...skipping 15 matching lines...) Expand all
497 InvokeDialog_PopupAutoSigninPrompt) { 502 InvokeDialog_PopupAutoSigninPrompt) {
498 RunDialog(); 503 RunDialog();
499 } 504 }
500 505
501 IN_PROC_BROWSER_TEST_F( 506 IN_PROC_BROWSER_TEST_F(
502 PasswordDialogViewTest, 507 PasswordDialogViewTest,
503 InvokeDialog_PopupAccountChooserWithSingleCredentialClickSignIn) { 508 InvokeDialog_PopupAccountChooserWithSingleCredentialClickSignIn) {
504 RunDialog(); 509 RunDialog();
505 } 510 }
506 511
512 IN_PROC_BROWSER_TEST_F(PasswordDialogViewTest,
513 InvokeDialog_AutoSigninFirstRun) {
514 RunDialog();
515 }
516
507 } // namespace 517 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698