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

Unified Diff: chrome/browser/browsing_data_database_helper_unittest.cc

Issue 9958107: Limiting the "Cookies and site data" form to "web safe" schemes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: License. Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browsing_data_database_helper.cc ('k') | chrome/browser/browsing_data_file_system_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data_database_helper_unittest.cc
diff --git a/chrome/browser/browsing_data_database_helper_unittest.cc b/chrome/browser/browsing_data_database_helper_unittest.cc
index cda759140183a6f74b032c0c922f9857846a01ea..01dc3e374b9c9a3e9c87c74b58bb18329725b801 100644
--- a/chrome/browser/browsing_data_database_helper_unittest.cc
+++ b/chrome/browser/browsing_data_database_helper_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,9 +10,9 @@
namespace {
-typedef testing::Test CannedBrowsingDataDatabaseTest;
+typedef testing::Test CannedBrowsingDataDatabaseHelperTest;
-TEST_F(CannedBrowsingDataDatabaseTest, Empty) {
+TEST_F(CannedBrowsingDataDatabaseHelperTest, Empty) {
TestingProfile profile;
const GURL origin("http://host1:1/");
@@ -28,4 +28,23 @@ TEST_F(CannedBrowsingDataDatabaseTest, Empty) {
ASSERT_TRUE(helper->empty());
}
+TEST_F(CannedBrowsingDataDatabaseHelperTest, IgnoreExtensionsAndDevTools) {
+ TestingProfile profile;
+
+ const GURL origin1("chrome-extension://abcdefghijklmnopqrstuvwxyz/");
+ const GURL origin2("chrome-devtools://abcdefghijklmnopqrstuvwxyz/");
+ const char db[] = "db1";
+
+ scoped_refptr<CannedBrowsingDataDatabaseHelper> helper(
+ new CannedBrowsingDataDatabaseHelper(&profile));
+
+ ASSERT_TRUE(helper->empty());
+ helper->AddDatabase(origin1, db, "");
+ ASSERT_TRUE(helper->empty());
+ helper->AddDatabase(origin2, db, "");
+ ASSERT_TRUE(helper->empty());
+ helper->Reset();
+ ASSERT_TRUE(helper->empty());
+}
+
} // namespace
« no previous file with comments | « chrome/browser/browsing_data_database_helper.cc ('k') | chrome/browser/browsing_data_file_system_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698