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

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

Issue 25092011: rAc: update android test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 2 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 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 scoped_ptr<wallet::WalletItems> wallet_items = 1351 scoped_ptr<wallet::WalletItems> wallet_items =
1352 wallet::GetTestWalletItems(wallet::AMEX_DISALLOWED); 1352 wallet::GetTestWalletItems(wallet::AMEX_DISALLOWED);
1353 wallet_items->AddInstrument(wallet::GetTestMaskedInstrument()); 1353 wallet_items->AddInstrument(wallet::GetTestMaskedInstrument());
1354 controller()->OnDidGetWalletItems(wallet_items.Pass()); 1354 controller()->OnDidGetWalletItems(wallet_items.Pass());
1355 // If there is no shipping address in wallet, it will default to 1355 // If there is no shipping address in wallet, it will default to
1356 // "same-as-billing" instead of "add-new-item". "same-as-billing" is covered 1356 // "same-as-billing" instead of "add-new-item". "same-as-billing" is covered
1357 // by the following tests. The penultimate item in the menu is "add-new-item". 1357 // by the following tests. The penultimate item in the menu is "add-new-item".
1358 ui::MenuModel* shipping_model = 1358 ui::MenuModel* shipping_model =
1359 controller()->MenuModelForSection(SECTION_SHIPPING); 1359 controller()->MenuModelForSection(SECTION_SHIPPING);
1360 shipping_model->ActivatedAt(shipping_model->GetItemCount() - 2); 1360 shipping_model->ActivatedAt(shipping_model->GetItemCount() - 2);
1361
1362 AutofillProfile test_profile(test::GetVerifiedProfile());
1363 FillInputs(SECTION_SHIPPING, test_profile);
1364
1361 AcceptAndLoadFakeFingerprint(); 1365 AcceptAndLoadFakeFingerprint();
1362 } 1366 }
1363 1367
1364 TEST_F(AutofillDialogControllerTest, SaveInstrument) { 1368 TEST_F(AutofillDialogControllerTest, SaveInstrument) {
1365 EXPECT_CALL(*controller()->GetView(), ModelChanged()).Times(1); 1369 EXPECT_CALL(*controller()->GetView(), ModelChanged()).Times(1);
1366 EXPECT_CALL(*controller()->GetTestingWalletClient(), 1370 EXPECT_CALL(*controller()->GetTestingWalletClient(),
1367 SaveToWalletMock(testing::NotNull(), 1371 SaveToWalletMock(testing::NotNull(),
1368 testing::IsNull(), 1372 testing::IsNull(),
1369 _)).Times(1); 1373 _)).Times(1);
1370 1374
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
2504 controller()->OnAccept(); 2508 controller()->OnAccept();
2505 2509
2506 const CreditCard& imported_card = test_pdm->imported_credit_card(); 2510 const CreditCard& imported_card = test_pdm->imported_credit_card();
2507 EXPECT_EQ(test_profile.GetRawInfo(NAME_FULL), 2511 EXPECT_EQ(test_profile.GetRawInfo(NAME_FULL),
2508 imported_card.GetRawInfo(CREDIT_CARD_NAME)); 2512 imported_card.GetRawInfo(CREDIT_CARD_NAME));
2509 2513
2510 controller()->ViewClosed(); 2514 controller()->ViewClosed();
2511 } 2515 }
2512 2516
2513 } // namespace autofill 2517 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698