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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings_unittest.cc

Issue 6966036: Wrapping blocked filesystems into TabSpecificContentSettings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased onto trunk. Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/content_settings/tab_specific_content_settings_unittest.cc
diff --git a/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc b/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc
index d0e7553699e80136e7a276ef6ca88829a1643e51..777cc794974f8bc6b12b17227c964c6de4c2890c 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -78,6 +78,20 @@ TEST_F(TabSpecificContentSettingsTest, BlockedContent) {
EXPECT_FALSE(content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_POPUPS));
}
+TEST_F(TabSpecificContentSettingsTest, BlockedFileSystems) {
+ TabSpecificContentSettings content_settings(contents());
+
+ // Access a file system.
+ content_settings.OnFileSystemAccessed(GURL("http://google.com"), false);
+ EXPECT_FALSE(
+ content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES));
+
+ // Block access to a file system.
+ content_settings.OnFileSystemAccessed(GURL("http://google.com"), true);
+ EXPECT_TRUE(
+ content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES));
+}
+
TEST_F(TabSpecificContentSettingsTest, AllowedContent) {
TabSpecificContentSettings content_settings(contents());
net::CookieOptions options;
« no previous file with comments | « chrome/browser/content_settings/tab_specific_content_settings.cc ('k') | chrome/browser/cookies_tree_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698