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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/test/base/testing_profile.h" 9 #include "chrome/test/base/testing_profile.h"
10 #include "content/public/test/test_browser_thread.h" 10 #include "content/public/test/test_browser_thread.h"
(...skipping 17 matching lines...) Expand all
28 TEST_F(CannedBrowsingDataDatabaseHelperTest, Empty) { 28 TEST_F(CannedBrowsingDataDatabaseHelperTest, Empty) {
29 TestingProfile profile; 29 TestingProfile profile;
30 30
31 const GURL origin("http://host1:1/"); 31 const GURL origin("http://host1:1/");
32 const char db[] = "db1"; 32 const char db[] = "db1";
33 33
34 scoped_refptr<CannedBrowsingDataDatabaseHelper> helper( 34 scoped_refptr<CannedBrowsingDataDatabaseHelper> helper(
35 new CannedBrowsingDataDatabaseHelper(&profile)); 35 new CannedBrowsingDataDatabaseHelper(&profile));
36 36
37 ASSERT_TRUE(helper->empty()); 37 ASSERT_TRUE(helper->empty());
38 helper->AddDatabase(origin, db, ""); 38 helper->AddDatabase(origin, db, std::string());
39 ASSERT_FALSE(helper->empty()); 39 ASSERT_FALSE(helper->empty());
40 helper->Reset(); 40 helper->Reset();
41 ASSERT_TRUE(helper->empty()); 41 ASSERT_TRUE(helper->empty());
42 } 42 }
43 43
44 TEST_F(CannedBrowsingDataDatabaseHelperTest, IgnoreExtensionsAndDevTools) { 44 TEST_F(CannedBrowsingDataDatabaseHelperTest, IgnoreExtensionsAndDevTools) {
45 TestingProfile profile; 45 TestingProfile profile;
46 46
47 const GURL origin1("chrome-extension://abcdefghijklmnopqrstuvwxyz/"); 47 const GURL origin1("chrome-extension://abcdefghijklmnopqrstuvwxyz/");
48 const GURL origin2("chrome-devtools://abcdefghijklmnopqrstuvwxyz/"); 48 const GURL origin2("chrome-devtools://abcdefghijklmnopqrstuvwxyz/");
49 const char db[] = "db1"; 49 const char db[] = "db1";
50 50
51 scoped_refptr<CannedBrowsingDataDatabaseHelper> helper( 51 scoped_refptr<CannedBrowsingDataDatabaseHelper> helper(
52 new CannedBrowsingDataDatabaseHelper(&profile)); 52 new CannedBrowsingDataDatabaseHelper(&profile));
53 53
54 ASSERT_TRUE(helper->empty()); 54 ASSERT_TRUE(helper->empty());
55 helper->AddDatabase(origin1, db, ""); 55 helper->AddDatabase(origin1, db, std::string());
56 ASSERT_TRUE(helper->empty()); 56 ASSERT_TRUE(helper->empty());
57 helper->AddDatabase(origin2, db, ""); 57 helper->AddDatabase(origin2, db, std::string());
58 ASSERT_TRUE(helper->empty()); 58 ASSERT_TRUE(helper->empty());
59 helper->Reset(); 59 helper->Reset();
60 ASSERT_TRUE(helper->empty()); 60 ASSERT_TRUE(helper->empty());
61 } 61 }
62 62
63 } // namespace 63 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698