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

Unified Diff: chrome/browser/extensions/extension_special_storage_policy_unittest.cc

Issue 15862008: Add SpecialStoragePolicy::HasIsolatedStorage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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/extensions/extension_special_storage_policy_unittest.cc
diff --git a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
index 257b8ec8a1874eb828fc1f61d63d51946bb42d12..942732c649d59ee3f3553648846cd0c5e0ac050f 100644
--- a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
+++ b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
@@ -262,6 +262,17 @@ TEST_F(ExtensionSpecialStoragePolicyTest, CanQueryDiskSize) {
EXPECT_TRUE(policy_->CanQueryDiskSize(unlimited_app->url()));
}
+TEST_F(ExtensionSpecialStoragePolicyTest, HasIsolatedStorage) {
+ const GURL kHttpUrl("http://foo");
+ const GURL kExtensionUrl("chrome-extension://bar");
+ scoped_refptr<Extension> app(CreateRegularApp());
+ policy_->GrantRightsForExtension(app);
+
+ EXPECT_FALSE(policy_->HasIsolatedStorage(kHttpUrl));
+ EXPECT_FALSE(policy_->HasIsolatedStorage(kExtensionUrl));
+ EXPECT_TRUE(policy_->HasIsolatedStorage(app->url()));
+}
+
TEST_F(ExtensionSpecialStoragePolicyTest, OverlappingApps) {
scoped_refptr<Extension> protected_app(CreateProtectedApp());
scoped_refptr<Extension> unlimited_app(CreateUnlimitedApp());
« no previous file with comments | « chrome/browser/extensions/extension_special_storage_policy.cc ('k') | webkit/browser/quota/mock_special_storage_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698