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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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.h" 9 #include "base/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 // Do not call on the root. 335 // Do not call on the root.
336 void DeleteStoredObjects(CookieTreeNode* node) { 336 void DeleteStoredObjects(CookieTreeNode* node) {
337 node->DeleteStoredObjects(); 337 node->DeleteStoredObjects();
338 CookieTreeNode* parent_node = node->parent(); 338 CookieTreeNode* parent_node = node->parent();
339 DCHECK(parent_node); 339 DCHECK(parent_node);
340 delete parent_node->GetModel()->Remove(parent_node, node); 340 delete parent_node->GetModel()->Remove(parent_node, node);
341 } 341 }
342 342
343 protected: 343 protected:
344 MessageLoop message_loop_; 344 base::MessageLoop message_loop_;
345 content::TestBrowserThread ui_thread_; 345 content::TestBrowserThread ui_thread_;
346 content::TestBrowserThread file_user_blocking_; 346 content::TestBrowserThread file_user_blocking_;
347 content::TestBrowserThread io_thread_; 347 content::TestBrowserThread io_thread_;
348 348
349 scoped_ptr<TestingProfile> profile_; 349 scoped_ptr<TestingProfile> profile_;
350 scoped_refptr<MockBrowsingDataCookieHelper> 350 scoped_refptr<MockBrowsingDataCookieHelper>
351 mock_browsing_data_cookie_helper_; 351 mock_browsing_data_cookie_helper_;
352 scoped_refptr<MockBrowsingDataDatabaseHelper> 352 scoped_refptr<MockBrowsingDataDatabaseHelper>
353 mock_browsing_data_database_helper_; 353 mock_browsing_data_database_helper_;
354 scoped_refptr<MockBrowsingDataLocalStorageHelper> 354 scoped_refptr<MockBrowsingDataLocalStorageHelper>
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 EXPECT_EQ("A,C", GetDisplayedCookies(&cookies_model)); 1192 EXPECT_EQ("A,C", GetDisplayedCookies(&cookies_model));
1193 1193
1194 cookies_model.UpdateSearchResults(string16(ASCIIToUTF16("foo3"))); 1194 cookies_model.UpdateSearchResults(string16(ASCIIToUTF16("foo3")));
1195 EXPECT_EQ("D", GetDisplayedCookies(&cookies_model)); 1195 EXPECT_EQ("D", GetDisplayedCookies(&cookies_model));
1196 1196
1197 cookies_model.UpdateSearchResults(string16()); 1197 cookies_model.UpdateSearchResults(string16());
1198 EXPECT_EQ("A,B,C,D", GetDisplayedCookies(&cookies_model)); 1198 EXPECT_EQ("A,B,C,D", GetDisplayedCookies(&cookies_model));
1199 } 1199 }
1200 1200
1201 } // namespace 1201 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698