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

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

Issue 17127002: Correctly integrate StoragePartition into TestingProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged to ToT Created 7 years, 5 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 306
307 DISALLOW_COPY_AND_ASSIGN(TestAutofillCreditCardBubbleController); 307 DISALLOW_COPY_AND_ASSIGN(TestAutofillCreditCardBubbleController);
308 }; 308 };
309 309
310 class AutofillDialogControllerTest : public testing::Test { 310 class AutofillDialogControllerTest : public testing::Test {
311 protected: 311 protected:
312 AutofillDialogControllerTest(): form_structure_(NULL) {} 312 AutofillDialogControllerTest(): form_structure_(NULL) {}
313 313
314 // testing::Test implementation: 314 // testing::Test implementation:
315 virtual void SetUp() OVERRIDE { 315 virtual void SetUp() OVERRIDE {
316 profile()->CreateRequestContext();
317 test_web_contents_.reset( 316 test_web_contents_.reset(
318 content::WebContentsTester::CreateTestWebContents(profile(), NULL)); 317 content::WebContentsTester::CreateTestWebContents(profile(), NULL));
319 318
320 test_bubble_controller_ = 319 test_bubble_controller_ =
321 new testing::NiceMock<TestAutofillCreditCardBubbleController>( 320 new testing::NiceMock<TestAutofillCreditCardBubbleController>(
322 test_web_contents_.get()); 321 test_web_contents_.get());
323 322
324 // Don't get stuck on the first run wallet interstitial. 323 // Don't get stuck on the first run wallet interstitial.
325 profile()->GetPrefs()->SetBoolean(::prefs::kAutofillDialogHasPaidWithWallet, 324 profile()->GetPrefs()->SetBoolean(::prefs::kAutofillDialogHasPaidWithWallet,
326 true); 325 true);
(...skipping 1917 matching lines...) Expand 10 before | Expand all | Expand 10 after
2244 EXPECT_CALL(*test_bubble_controller(), 2243 EXPECT_CALL(*test_bubble_controller(),
2245 ShowAsGeneratedCardBubble(_, _)).Times(1); 2244 ShowAsGeneratedCardBubble(_, _)).Times(1);
2246 EXPECT_CALL(*test_bubble_controller(), ShowAsNewCardSavedBubble(_)).Times(0); 2245 EXPECT_CALL(*test_bubble_controller(), ShowAsNewCardSavedBubble(_)).Times(0);
2247 2246
2248 SubmitWithWalletItems(CompleteAndValidWalletItems()); 2247 SubmitWithWalletItems(CompleteAndValidWalletItems());
2249 controller()->OnDidGetFullWallet(wallet::GetTestFullWallet()); 2248 controller()->OnDidGetFullWallet(wallet::GetTestFullWallet());
2250 controller()->ViewClosed(); 2249 controller()->ViewClosed();
2251 } 2250 }
2252 2251
2253 } // namespace autofill 2252 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698