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

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

Issue 7056025: More WebSQLDatabase and QuotaManager integration. (Closed) Base URL: svn://chrome-svn/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
« no previous file with comments | « no previous file | webkit/database/database_connections.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service_unittest.cc
===================================================================
--- chrome/browser/extensions/extension_service_unittest.cc (revision 86470)
+++ chrome/browser/extensions/extension_service_unittest.cc (working copy)
@@ -3351,38 +3351,12 @@
ASSERT_EQ(3u, loaded_.size());
EXPECT_TRUE(profile_.get());
EXPECT_FALSE(profile_->IsOffTheRecord());
-
- // Open the database from each origin to make the tracker aware
- // of the existence of these origins and to get their quotas.
- int64 limited_quota = -1;
- int64 unlimited_quota = -1;
- string16 limited_quota_identifier =
- webkit_database::DatabaseUtil::GetOriginIdentifier(loaded_[0]->url());
- string16 unlimited_quota_identifier =
- webkit_database::DatabaseUtil::GetOriginIdentifier(loaded_[1]->url());
- string16 unlimited_quota_identifier2 =
- webkit_database::DatabaseUtil::GetOriginIdentifier(loaded_[2]->url());
- string16 db_name = UTF8ToUTF16("db");
- string16 description = UTF8ToUTF16("db_description");
- int64 database_size;
- webkit_database::DatabaseTracker* db_tracker = profile_->GetDatabaseTracker();
-
- // First check the normal limited quota extension.
- db_tracker->DatabaseOpened(limited_quota_identifier, db_name, description,
- 1, &database_size, &limited_quota);
- db_tracker->DatabaseClosed(limited_quota_identifier, db_name);
- EXPECT_EQ(profile_->GetDatabaseTracker()->GetDefaultQuota(), limited_quota);
-
- // Now check the two unlimited quota ones.
- db_tracker->DatabaseOpened(unlimited_quota_identifier, db_name, description,
- 1, &database_size, &unlimited_quota);
- db_tracker->DatabaseClosed(unlimited_quota_identifier, db_name);
- EXPECT_EQ(kint64max, unlimited_quota);
- db_tracker->DatabaseOpened(unlimited_quota_identifier2, db_name, description,
- 1, &database_size, &unlimited_quota);
- db_tracker->DatabaseClosed(unlimited_quota_identifier2, db_name);
-
- EXPECT_EQ(kint64max, unlimited_quota);
+ EXPECT_FALSE(profile_->GetExtensionSpecialStoragePolicy()->IsStorageUnlimited(
+ loaded_[0]->url()));
+ EXPECT_TRUE(profile_->GetExtensionSpecialStoragePolicy()->IsStorageUnlimited(
+ loaded_[1]->url()));
+ EXPECT_TRUE(profile_->GetExtensionSpecialStoragePolicy()->IsStorageUnlimited(
+ loaded_[2]->url()));
}
// Tests ExtensionService::register_component_extension().
« no previous file with comments | « no previous file | webkit/database/database_connections.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698