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

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

Issue 896583003: Add risk data to getrealpan request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes for android Created 5 years, 10 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
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 wallet_items->instruments()[0]->TypeAndLastFourDigits(); 1126 wallet_items->instruments()[0]->TypeAndLastFourDigits();
1127 controller()->OnDidGetWalletItems(wallet_items.Pass()); 1127 controller()->OnDidGetWalletItems(wallet_items.Pass());
1128 1128
1129 scoped_ptr<AutofillDialogViewTester> test_view = GetViewTester(); 1129 scoped_ptr<AutofillDialogViewTester> test_view = GetViewTester();
1130 EXPECT_FALSE(test_view->IsShowingOverlay()); 1130 EXPECT_FALSE(test_view->IsShowingOverlay());
1131 EXPECT_CALL(*controller(), LoadRiskFingerprintData()); 1131 EXPECT_CALL(*controller(), LoadRiskFingerprintData());
1132 controller()->OnAccept(); 1132 controller()->OnAccept();
1133 EXPECT_TRUE(test_view->IsShowingOverlay()); 1133 EXPECT_TRUE(test_view->IsShowingOverlay());
1134 1134
1135 EXPECT_CALL(*controller()->GetTestingWalletClient(), GetFullWallet(_)); 1135 EXPECT_CALL(*controller()->GetTestingWalletClient(), GetFullWallet(_));
1136 scoped_ptr<risk::Fingerprint> fingerprint(new risk::Fingerprint()); 1136 controller()->OnDidLoadRiskFingerprintData("a");
1137 fingerprint->mutable_machine_characteristics()->mutable_screen_size()->
1138 set_width(1024);
1139 controller()->OnDidLoadRiskFingerprintData(fingerprint.Pass());
1140 1137
1141 controller()->OnDidGetFullWallet( 1138 controller()->OnDidGetFullWallet(
1142 wallet::GetTestFullWalletWithRequiredActions( 1139 wallet::GetTestFullWalletWithRequiredActions(
1143 std::vector<wallet::RequiredAction>(1, wallet::VERIFY_CVV))); 1140 std::vector<wallet::RequiredAction>(1, wallet::VERIFY_CVV)));
1144 1141
1145 ASSERT_TRUE(controller()->IsSubmitPausedOn(wallet::VERIFY_CVV)); 1142 ASSERT_TRUE(controller()->IsSubmitPausedOn(wallet::VERIFY_CVV));
1146 1143
1147 std::string fake_cvc("123"); 1144 std::string fake_cvc("123");
1148 test_view->SetTextContentsOfSuggestionInput(SECTION_CC_BILLING, 1145 test_view->SetTextContentsOfSuggestionInput(SECTION_CC_BILLING,
1149 ASCIIToUTF16(fake_cvc)); 1146 ASCIIToUTF16(fake_cvc));
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1853 ASSERT_TRUE(content::ExecuteScriptAndExtractString(GetRenderViewHost(), 1850 ASSERT_TRUE(content::ExecuteScriptAndExtractString(GetRenderViewHost(),
1854 "navigateFrame();", 1851 "navigateFrame();",
1855 &unused)); 1852 &unused));
1856 ExpectDomMessage("iframe loaded"); 1853 ExpectDomMessage("iframe loaded");
1857 ChromeAutofillClient* client = 1854 ChromeAutofillClient* client =
1858 ChromeAutofillClient::FromWebContents(GetActiveWebContents()); 1855 ChromeAutofillClient::FromWebContents(GetActiveWebContents());
1859 EXPECT_FALSE(client->GetDialogControllerForTesting()); 1856 EXPECT_FALSE(client->GetDialogControllerForTesting());
1860 } 1857 }
1861 1858
1862 } // namespace autofill 1859 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698