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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_database_helper_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/browsing_data_database_helper.h" 5 #include "chrome/browser/browsing_data/browsing_data_database_helper.h"
6 6
7 #include "base/message_loop/message_loop.h"
8 #include "chrome/test/base/testing_profile.h" 7 #include "chrome/test/base/testing_profile.h"
9 #include "content/public/test/test_browser_thread.h" 8 #include "content/public/test/test_browser_thread_bundle.h"
10 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
11 10
12 using content::BrowserThread;
13
14 namespace { 11 namespace {
15 12
16 class CannedBrowsingDataDatabaseHelperTest : public testing::Test { 13 class CannedBrowsingDataDatabaseHelperTest : public testing::Test {
17 public: 14 content::TestBrowserThreadBundle thread_bundle_;
18 CannedBrowsingDataDatabaseHelperTest()
19 : ui_thread_(BrowserThread::UI, &message_loop_) {
20 }
21
22 protected:
23 base::MessageLoop message_loop_;
24 content::TestBrowserThread ui_thread_;
25 }; 15 };
26 16
27 TEST_F(CannedBrowsingDataDatabaseHelperTest, Empty) { 17 TEST_F(CannedBrowsingDataDatabaseHelperTest, Empty) {
28 TestingProfile profile; 18 TestingProfile profile;
29 19
30 const GURL origin("http://host1:1/"); 20 const GURL origin("http://host1:1/");
31 const char db[] = "db1"; 21 const char db[] = "db1";
32 22
33 scoped_refptr<CannedBrowsingDataDatabaseHelper> helper( 23 scoped_refptr<CannedBrowsingDataDatabaseHelper> helper(
34 new CannedBrowsingDataDatabaseHelper(&profile)); 24 new CannedBrowsingDataDatabaseHelper(&profile));
(...skipping 18 matching lines...) Expand all
53 ASSERT_TRUE(helper->empty()); 43 ASSERT_TRUE(helper->empty());
54 helper->AddDatabase(origin1, db, std::string()); 44 helper->AddDatabase(origin1, db, std::string());
55 ASSERT_TRUE(helper->empty()); 45 ASSERT_TRUE(helper->empty());
56 helper->AddDatabase(origin2, db, std::string()); 46 helper->AddDatabase(origin2, db, std::string());
57 ASSERT_TRUE(helper->empty()); 47 ASSERT_TRUE(helper->empty());
58 helper->Reset(); 48 helper->Reset();
59 ASSERT_TRUE(helper->empty()); 49 ASSERT_TRUE(helper->empty());
60 } 50 }
61 51
62 } // namespace 52 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698