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

Side by Side Diff: chrome/browser/browsing_data/cookies_tree_model_unittest.cc

Issue 17127002: Correctly integrate StoragePartition into TestingProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix InstantNTP test. 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 "chrome/browser/browsing_data/cookies_tree_model.h" 5 #include "chrome/browser/browsing_data/cookies_tree_model.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 29 matching lines...) Expand all
40 public: 40 public:
41 virtual ~CookiesTreeModelTest() { 41 virtual ~CookiesTreeModelTest() {
42 // Avoid memory leaks. 42 // Avoid memory leaks.
43 special_storage_policy_ = NULL; 43 special_storage_policy_ = NULL;
44 profile_.reset(); 44 profile_.reset();
45 base::MessageLoop::current()->RunUntilIdle(); 45 base::MessageLoop::current()->RunUntilIdle();
46 } 46 }
47 47
48 virtual void SetUp() OVERRIDE { 48 virtual void SetUp() OVERRIDE {
49 profile_.reset(new TestingProfile()); 49 profile_.reset(new TestingProfile());
50 profile_->CreateRequestContext();
51 mock_browsing_data_cookie_helper_ = 50 mock_browsing_data_cookie_helper_ =
52 new MockBrowsingDataCookieHelper(profile_->GetRequestContext()); 51 new MockBrowsingDataCookieHelper(profile_->GetRequestContext());
53 mock_browsing_data_database_helper_ = 52 mock_browsing_data_database_helper_ =
54 new MockBrowsingDataDatabaseHelper(profile_.get()); 53 new MockBrowsingDataDatabaseHelper(profile_.get());
55 mock_browsing_data_local_storage_helper_ = 54 mock_browsing_data_local_storage_helper_ =
56 new MockBrowsingDataLocalStorageHelper(profile_.get()); 55 new MockBrowsingDataLocalStorageHelper(profile_.get());
57 mock_browsing_data_session_storage_helper_ = 56 mock_browsing_data_session_storage_helper_ =
58 new MockBrowsingDataLocalStorageHelper(profile_.get()); 57 new MockBrowsingDataLocalStorageHelper(profile_.get());
59 mock_browsing_data_appcache_helper_ = 58 mock_browsing_data_appcache_helper_ =
60 new MockBrowsingDataAppCacheHelper(profile_.get()); 59 new MockBrowsingDataAppCacheHelper(profile_.get());
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 EXPECT_EQ("A,C", GetDisplayedCookies(&cookies_model)); 1185 EXPECT_EQ("A,C", GetDisplayedCookies(&cookies_model));
1187 1186
1188 cookies_model.UpdateSearchResults(string16(ASCIIToUTF16("foo3"))); 1187 cookies_model.UpdateSearchResults(string16(ASCIIToUTF16("foo3")));
1189 EXPECT_EQ("D", GetDisplayedCookies(&cookies_model)); 1188 EXPECT_EQ("D", GetDisplayedCookies(&cookies_model));
1190 1189
1191 cookies_model.UpdateSearchResults(string16()); 1190 cookies_model.UpdateSearchResults(string16());
1192 EXPECT_EQ("A,B,C,D", GetDisplayedCookies(&cookies_model)); 1191 EXPECT_EQ("A,B,C,D", GetDisplayedCookies(&cookies_model));
1193 } 1192 }
1194 1193
1195 } // namespace 1194 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698