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

Side by Side Diff: chrome/browser/autofill/autofill_manager_unittest.cc

Issue 6211002: Don't create a WebDataService in AutoFillManagerTest tests, since that object... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « chrome/browser/autocomplete_history_manager.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <vector> 5 #include <vector>
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/ref_counted.h" 8 #include "base/ref_counted.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/scoped_vector.h" 10 #include "base/scoped_vector.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 public: 427 public:
428 AutoFillManagerTest() {} 428 AutoFillManagerTest() {}
429 virtual ~AutoFillManagerTest() { 429 virtual ~AutoFillManagerTest() {
430 // Order of destruction is important as AutoFillManager relies on 430 // Order of destruction is important as AutoFillManager relies on
431 // PersonalDataManager to be around when it gets destroyed. 431 // PersonalDataManager to be around when it gets destroyed.
432 autofill_manager_.reset(NULL); 432 autofill_manager_.reset(NULL);
433 test_personal_data_ = NULL; 433 test_personal_data_ = NULL;
434 } 434 }
435 435
436 virtual void SetUp() { 436 virtual void SetUp() {
437 profile_.reset(new TestingProfile());
438 profile_->CreateWebDataService(false);
439
440 RenderViewHostTestHarness::SetUp(); 437 RenderViewHostTestHarness::SetUp();
441 test_personal_data_ = new TestPersonalDataManager(); 438 test_personal_data_ = new TestPersonalDataManager();
442 autofill_manager_.reset(new TestAutoFillManager(contents(), 439 autofill_manager_.reset(new TestAutoFillManager(contents(),
443 test_personal_data_.get())); 440 test_personal_data_.get()));
444 } 441 }
445 442
446 Profile* profile() { return contents()->profile(); } 443 Profile* profile() { return contents()->profile(); }
447 444
448 void GetAutoFillSuggestions(int query_id, 445 void GetAutoFillSuggestions(int query_id,
449 const webkit_glue::FormData& form, 446 const webkit_glue::FormData& form,
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 ASSERT_FALSE(profile()->GetPrefs()->GetBoolean( 1579 ASSERT_FALSE(profile()->GetPrefs()->GetBoolean(
1583 prefs::kAutoFillAuxiliaryProfilesEnabled)); 1580 prefs::kAutoFillAuxiliaryProfilesEnabled));
1584 profile()->GetPrefs()->SetBoolean( 1581 profile()->GetPrefs()->SetBoolean(
1585 prefs::kAutoFillAuxiliaryProfilesEnabled, true); 1582 prefs::kAutoFillAuxiliaryProfilesEnabled, true);
1586 profile()->GetPrefs()->ClearPref(prefs::kAutoFillAuxiliaryProfilesEnabled); 1583 profile()->GetPrefs()->ClearPref(prefs::kAutoFillAuxiliaryProfilesEnabled);
1587 ASSERT_FALSE(profile()->GetPrefs()->GetBoolean( 1584 ASSERT_FALSE(profile()->GetPrefs()->GetBoolean(
1588 prefs::kAutoFillAuxiliaryProfilesEnabled)); 1585 prefs::kAutoFillAuxiliaryProfilesEnabled));
1589 #endif 1586 #endif
1590 } 1587 }
1591 1588
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete_history_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698