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

Side by Side Diff: chrome/browser/browsing_data_database_helper_unittest.cc

Issue 10092013: Display third party cookies and site data counts in the WebsiteSettings UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "Fix CannedBrowsingDataDatabaseHelperTest.*" Created 8 years, 7 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_database_helper.h" 5 #include "chrome/browser/browsing_data_database_helper.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop.h"
8 #include "chrome/test/base/testing_profile.h" 9 #include "chrome/test/base/testing_profile.h"
10 #include "content/test/test_browser_thread.h"
9 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
10 12
13 using content::BrowserThread;
14
11 namespace { 15 namespace {
12 16
13 typedef testing::Test CannedBrowsingDataDatabaseHelperTest; 17 class CannedBrowsingDataDatabaseHelperTest : public testing::Test {
18 public:
19 CannedBrowsingDataDatabaseHelperTest()
20 : ui_thread_(BrowserThread::UI, &message_loop_) {
21 }
22
23 protected:
24 MessageLoop message_loop_;
25 content::TestBrowserThread ui_thread_;
26 };
14 27
15 TEST_F(CannedBrowsingDataDatabaseHelperTest, Empty) { 28 TEST_F(CannedBrowsingDataDatabaseHelperTest, Empty) {
16 TestingProfile profile; 29 TestingProfile profile;
17 30
18 const GURL origin("http://host1:1/"); 31 const GURL origin("http://host1:1/");
19 const char db[] = "db1"; 32 const char db[] = "db1";
20 33
21 scoped_refptr<CannedBrowsingDataDatabaseHelper> helper( 34 scoped_refptr<CannedBrowsingDataDatabaseHelper> helper(
22 new CannedBrowsingDataDatabaseHelper(&profile)); 35 new CannedBrowsingDataDatabaseHelper(&profile));
23 36
(...skipping 17 matching lines...) Expand all
41 ASSERT_TRUE(helper->empty()); 54 ASSERT_TRUE(helper->empty());
42 helper->AddDatabase(origin1, db, ""); 55 helper->AddDatabase(origin1, db, "");
43 ASSERT_TRUE(helper->empty()); 56 ASSERT_TRUE(helper->empty());
44 helper->AddDatabase(origin2, db, ""); 57 helper->AddDatabase(origin2, db, "");
45 ASSERT_TRUE(helper->empty()); 58 ASSERT_TRUE(helper->empty());
46 helper->Reset(); 59 helper->Reset();
47 ASSERT_TRUE(helper->empty()); 60 ASSERT_TRUE(helper->empty());
48 } 61 }
49 62
50 } // namespace 63 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_database_helper.cc ('k') | chrome/browser/browsing_data_file_system_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698