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

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: 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..84c35edc622ae4e97bc5f58e02bb16c59f45d46f 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc
@@ -78,6 +78,21 @@ TEST_F(TabSpecificContentSettingsTest, BlockedContent) {
EXPECT_FALSE(content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_POPUPS));
}
+TEST_F(TabSpecificContentSettingsTest, BlockedFilesystems) {
+ TabSpecificContentSettings content_settings(contents());
+ net::CookieOptions options;
+
+ // Access a filesystem.
+ content_settings.OnFileSystemAccessed(GURL("http://google.com"), false);
+ EXPECT_FALSE(
+ content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES));
+
+ // Block access to a filesystem.
+ 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;

Powered by Google App Engine
This is Rietveld 408576698