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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc

Issue 23068005: Convert UserPolicySigninService to use OAuth2TokenService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <map> 5 #include <map>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 2100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 2111
2112 controller()->EditClickedForSection(SECTION_EMAIL); 2112 controller()->EditClickedForSection(SECTION_EMAIL);
2113 EXPECT_TRUE(controller()->ShouldOfferToSaveInChrome()); 2113 EXPECT_TRUE(controller()->ShouldOfferToSaveInChrome());
2114 2114
2115 controller()->EditCancelledForSection(SECTION_EMAIL); 2115 controller()->EditCancelledForSection(SECTION_EMAIL);
2116 EXPECT_FALSE(controller()->ShouldOfferToSaveInChrome()); 2116 EXPECT_FALSE(controller()->ShouldOfferToSaveInChrome());
2117 2117
2118 controller()->MenuModelForSection(SECTION_EMAIL)->ActivatedAt(1); 2118 controller()->MenuModelForSection(SECTION_EMAIL)->ActivatedAt(1);
2119 EXPECT_TRUE(controller()->ShouldOfferToSaveInChrome()); 2119 EXPECT_TRUE(controller()->ShouldOfferToSaveInChrome());
2120 2120
2121 profile()->set_incognito(true); 2121 profile()->ForceIncognito(true);
2122 EXPECT_FALSE(controller()->ShouldOfferToSaveInChrome()); 2122 EXPECT_FALSE(controller()->ShouldOfferToSaveInChrome());
2123 } 2123 }
2124 2124
2125 // Tests that user is prompted when using instrument with minimal address. 2125 // Tests that user is prompted when using instrument with minimal address.
2126 TEST_F(AutofillDialogControllerTest, UpgradeMinimalAddress) { 2126 TEST_F(AutofillDialogControllerTest, UpgradeMinimalAddress) {
2127 // A minimal address being selected should trigger error validation in the 2127 // A minimal address being selected should trigger error validation in the
2128 // view. Called once for each incomplete suggestion. 2128 // view. Called once for each incomplete suggestion.
2129 EXPECT_CALL(*controller()->GetView(), UpdateForErrors()).Times(1); 2129 EXPECT_CALL(*controller()->GetView(), UpdateForErrors()).Times(1);
2130 2130
2131 scoped_ptr<wallet::WalletItems> wallet_items = wallet::GetTestWalletItems(); 2131 scoped_ptr<wallet::WalletItems> wallet_items = wallet::GetTestWalletItems();
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 SubmitWithWalletItems(CompleteAndValidWalletItems()); 2513 SubmitWithWalletItems(CompleteAndValidWalletItems());
2514 controller()->set_dialog_type(DIALOG_TYPE_AUTOCHECKOUT); 2514 controller()->set_dialog_type(DIALOG_TYPE_AUTOCHECKOUT);
2515 controller()->OnDidGetFullWallet(wallet::GetTestFullWallet()); 2515 controller()->OnDidGetFullWallet(wallet::GetTestFullWallet());
2516 controller()->OnAutocheckoutError(); 2516 controller()->OnAutocheckoutError();
2517 controller()->ViewClosed(); 2517 controller()->ViewClosed();
2518 2518
2519 EXPECT_EQ(0, mock_new_card_bubble_controller()->bubbles_shown()); 2519 EXPECT_EQ(0, mock_new_card_bubble_controller()->bubbles_shown());
2520 } 2520 }
2521 2521
2522 } // namespace autofill 2522 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698