| Index: chrome/browser/cookies_tree_model_unittest.cc
|
| diff --git a/chrome/browser/cookies_tree_model_unittest.cc b/chrome/browser/cookies_tree_model_unittest.cc
|
| index 2ce762e99e9e6a1b655d0a95011c3b802ba4db4c..58f4b185b5eb3f0767985bfab1b06a9d580cfd61 100644
|
| --- a/chrome/browser/cookies_tree_model_unittest.cc
|
| +++ b/chrome/browser/cookies_tree_model_unittest.cc
|
| @@ -12,6 +12,7 @@
|
| #include "chrome/browser/mock_browsing_data_database_helper.h"
|
| #include "chrome/browser/mock_browsing_data_file_system_helper.h"
|
| #include "chrome/browser/mock_browsing_data_indexed_db_helper.h"
|
| +#include "chrome/browser/mock_browsing_data_quota_helper.h"
|
| #include "chrome/browser/mock_browsing_data_local_storage_helper.h"
|
| #include "chrome/test/testing_profile.h"
|
| #include "content/common/content_notification_types.h"
|
| @@ -50,6 +51,8 @@ class CookiesTreeModelTest : public testing::Test {
|
| new MockBrowsingDataIndexedDBHelper(profile_.get());
|
| mock_browsing_data_file_system_helper_ =
|
| new MockBrowsingDataFileSystemHelper(profile_.get());
|
| + mock_browsing_data_quota_helper_ =
|
| + new MockBrowsingDataQuotaHelper(profile_.get());
|
| }
|
|
|
| CookiesTreeModel* CreateCookiesTreeModelWithInitialSample() {
|
| @@ -64,6 +67,7 @@ class CookiesTreeModelTest : public testing::Test {
|
| mock_browsing_data_appcache_helper_,
|
| mock_browsing_data_indexed_db_helper_,
|
| mock_browsing_data_file_system_helper_,
|
| + mock_browsing_data_quota_helper_,
|
| false);
|
| mock_browsing_data_database_helper_->AddDatabaseSamples();
|
| mock_browsing_data_database_helper_->Notify();
|
| @@ -75,10 +79,13 @@ class CookiesTreeModelTest : public testing::Test {
|
| mock_browsing_data_indexed_db_helper_->Notify();
|
| mock_browsing_data_file_system_helper_->AddFileSystemSamples();
|
| mock_browsing_data_file_system_helper_->Notify();
|
| + mock_browsing_data_quota_helper_->AddQuotaSamples();
|
| + mock_browsing_data_quota_helper_->Notify();
|
| {
|
| SCOPED_TRACE("Initial State 3 cookies, 2 databases, 2 local storages, "
|
| - "2 session storages, 2 indexed DBs, 3 filesystems");
|
| - // 41 because there's the root, then foo1 -> cookies -> a,
|
| + "2 session storages, 2 indexed DBs, 3 filesystems, "
|
| + "2 quotas");
|
| + // 45 because there's the root, then foo1 -> cookies -> a,
|
| // foo2 -> cookies -> b, foo3 -> cookies -> c,
|
| // dbhost1 -> database -> db1, dbhost2 -> database -> db2,
|
| // fshost1 -> filesystem -> http://fshost1:1/,
|
| @@ -89,8 +96,10 @@ class CookiesTreeModelTest : public testing::Test {
|
| // host1 -> sessionstorage -> http://host1:1/,
|
| // host2 -> sessionstorage -> http://host2:2/,
|
| // idbhost1 -> indexeddb -> http://idbhost1:1/,
|
| - // idbhost2 -> indexeddb -> http://idbhost2:2/.
|
| - EXPECT_EQ(41, cookies_model->GetRoot()->GetTotalNodeCount());
|
| + // idbhost2 -> indexeddb -> http://idbhost2:2/,
|
| + // quotahost1 -> quotahost1,
|
| + // quotahost2 -> quotahost2.
|
| + EXPECT_EQ(45, cookies_model->GetRoot()->GetTotalNodeCount());
|
| EXPECT_EQ("db1,db2", GetDisplayedDatabases(cookies_model));
|
| EXPECT_EQ("http://host1:1/,http://host2:2/",
|
| GetDisplayedLocalStorages(cookies_model));
|
| @@ -100,6 +109,8 @@ class CookiesTreeModelTest : public testing::Test {
|
| GetDisplayedIndexedDBs(cookies_model));
|
| EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/",
|
| GetDisplayedFileSystems(cookies_model));
|
| + EXPECT_EQ("quotahost1,quotahost2",
|
| + GetDisplayedQuotas(cookies_model));
|
| }
|
| return cookies_model;
|
| }
|
| @@ -146,6 +157,8 @@ class CookiesTreeModelTest : public testing::Test {
|
| case CookieTreeNode::DetailedInfo::TYPE_FILE_SYSTEM:
|
| return node->GetDetailedInfo().file_system_info->origin.spec() +
|
| ",";
|
| + case CookieTreeNode::DetailedInfo::TYPE_QUOTA:
|
| + return node->GetDetailedInfo().quota_info->host + ",";
|
| default:
|
| return "";
|
| }
|
| @@ -184,6 +197,11 @@ class CookiesTreeModelTest : public testing::Test {
|
| node, CookieTreeNode::DetailedInfo::TYPE_FILE_SYSTEM);
|
| }
|
|
|
| + std::string GetFileQuotaOfChildren(const CookieTreeNode* node) {
|
| + return GetNodesOfChildren(
|
| + node, CookieTreeNode::DetailedInfo::TYPE_QUOTA);
|
| + }
|
| +
|
| // Get the nodes names displayed in the view (if we had one) in the order
|
| // they are displayed, as a comma seperated string.
|
| // Ex: EXPECT_STREQ("X,Y", GetDisplayedNodes(cookies_view, type).c_str());
|
| @@ -232,6 +250,11 @@ class CookiesTreeModelTest : public testing::Test {
|
| CookieTreeNode::DetailedInfo::TYPE_FILE_SYSTEM);
|
| }
|
|
|
| + std::string GetDisplayedQuotas(CookiesTreeModel* cookies_model) {
|
| + return GetDisplayedNodes(cookies_model,
|
| + CookieTreeNode::DetailedInfo::TYPE_QUOTA);
|
| + }
|
| +
|
| // Do not call on the root.
|
| void DeleteStoredObjects(CookieTreeNode* node) {
|
| node->DeleteStoredObjects();
|
| @@ -258,6 +281,8 @@ class CookiesTreeModelTest : public testing::Test {
|
| mock_browsing_data_indexed_db_helper_;
|
| scoped_refptr<MockBrowsingDataFileSystemHelper>
|
| mock_browsing_data_file_system_helper_;
|
| + scoped_refptr<MockBrowsingDataQuotaHelper>
|
| + mock_browsing_data_quota_helper_;
|
| };
|
|
|
| TEST_F(CookiesTreeModelTest, RemoveAll) {
|
| @@ -280,6 +305,8 @@ TEST_F(CookiesTreeModelTest, RemoveAll) {
|
| GetDisplayedIndexedDBs(cookies_model.get()));
|
| EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/",
|
| GetDisplayedFileSystems(cookies_model.get()));
|
| + EXPECT_EQ("quotahost1,quotahost2",
|
| + GetDisplayedQuotas(cookies_model.get()));
|
| }
|
|
|
| mock_browsing_data_database_helper_->Reset();
|
| @@ -324,10 +351,46 @@ TEST_F(CookiesTreeModelTest, Remove) {
|
| // 9. `host2`
|
| // 10. `idbhost1`
|
| // 11. `idbhost2`
|
| + // 12. `quotahost1`
|
| + // 13. `quotahost2`
|
| //
|
| // Here, we'll remove them one by one, starting from the end, and
|
| // check that the state makes sense.
|
|
|
| + DeleteStoredObjects(cookies_model->GetRoot()->GetChild(13));
|
| + {
|
| + SCOPED_TRACE("`quotahost2` removed.");
|
| + EXPECT_STREQ("A,B,C", GetMonsterCookies(monster).c_str());
|
| + EXPECT_STREQ("A,B,C", GetDisplayedCookies(cookies_model.get()).c_str());
|
| + EXPECT_EQ("db1,db2", GetDisplayedDatabases(cookies_model.get()));
|
| + EXPECT_EQ("http://host1:1/,http://host2:2/",
|
| + GetDisplayedLocalStorages(cookies_model.get()));
|
| + EXPECT_EQ("http://host1:1/,http://host2:2/",
|
| + GetDisplayedSessionStorages(cookies_model.get()));
|
| + EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/",
|
| + GetDisplayedFileSystems(cookies_model.get()));
|
| + EXPECT_EQ("http://idbhost1:1/,http://idbhost2:2/",
|
| + GetDisplayedIndexedDBs(cookies_model.get()));
|
| + EXPECT_EQ("quotahost1",
|
| + GetDisplayedQuotas(cookies_model.get()));
|
| + EXPECT_EQ(43, cookies_model->GetRoot()->GetTotalNodeCount());
|
| + }
|
| + DeleteStoredObjects(cookies_model->GetRoot()->GetChild(12));
|
| + {
|
| + SCOPED_TRACE("`quotahost1` removed.");
|
| + EXPECT_STREQ("A,B,C", GetMonsterCookies(monster).c_str());
|
| + EXPECT_STREQ("A,B,C", GetDisplayedCookies(cookies_model.get()).c_str());
|
| + EXPECT_EQ("db1,db2", GetDisplayedDatabases(cookies_model.get()));
|
| + EXPECT_EQ("http://host1:1/,http://host2:2/",
|
| + GetDisplayedLocalStorages(cookies_model.get()));
|
| + EXPECT_EQ("http://host1:1/,http://host2:2/",
|
| + GetDisplayedSessionStorages(cookies_model.get()));
|
| + EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/",
|
| + GetDisplayedFileSystems(cookies_model.get()));
|
| + EXPECT_EQ("http://idbhost1:1/,http://idbhost2:2/",
|
| + GetDisplayedIndexedDBs(cookies_model.get()));
|
| + EXPECT_EQ(41, cookies_model->GetRoot()->GetTotalNodeCount());
|
| + }
|
| DeleteStoredObjects(cookies_model->GetRoot()->GetChild(11));
|
| {
|
| SCOPED_TRACE("`idbhost2` removed.");
|
| @@ -499,7 +562,7 @@ TEST_F(CookiesTreeModelTest, RemoveCookiesNode) {
|
| SCOPED_TRACE("First origin removed");
|
| EXPECT_STREQ("B,C", GetMonsterCookies(monster).c_str());
|
| EXPECT_STREQ("B,C", GetDisplayedCookies(cookies_model.get()).c_str());
|
| - // 39 because in this case, the origin remains, although the COOKIES
|
| + // 43 because in this case, the origin remains, although the COOKIES
|
| // node beneath it has been deleted. So, we have
|
| // root -> foo1 -> cookies -> a, foo2, foo3 -> cookies -> c
|
| // dbhost1 -> database -> db1, dbhost2 -> database -> db2,
|
| @@ -509,8 +572,10 @@ TEST_F(CookiesTreeModelTest, RemoveCookiesNode) {
|
| // host1 -> localstorage -> http://host1:1/,
|
| // host2 -> localstorage -> http://host2:2/,
|
| // idbhost1 -> sessionstorage -> http://idbhost1:1/,
|
| - // idbhost2 -> sessionstorage -> http://idbhost2:2/.
|
| - EXPECT_EQ(39, cookies_model->GetRoot()->GetTotalNodeCount());
|
| + // idbhost2 -> sessionstorage -> http://idbhost2:2/,
|
| + // quotahost1 -> quotahost1,
|
| + // quotahost2 -> quotahost1.
|
| + EXPECT_EQ(43, cookies_model->GetRoot()->GetTotalNodeCount());
|
| EXPECT_EQ("db1,db2", GetDisplayedDatabases(cookies_model.get()));
|
| EXPECT_EQ("http://host1:1/,http://host2:2/",
|
| GetDisplayedLocalStorages(cookies_model.get()));
|
| @@ -520,6 +585,7 @@ TEST_F(CookiesTreeModelTest, RemoveCookiesNode) {
|
| GetDisplayedIndexedDBs(cookies_model.get()));
|
| EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/",
|
| GetDisplayedFileSystems(cookies_model.get()));
|
| + EXPECT_EQ("quotahost1,quotahost2", GetDisplayedQuotas(cookies_model.get()));
|
| }
|
|
|
| DeleteStoredObjects(cookies_model->GetRoot()->GetChild(6)->GetChild(0));
|
| @@ -536,7 +602,8 @@ TEST_F(CookiesTreeModelTest, RemoveCookiesNode) {
|
| GetDisplayedIndexedDBs(cookies_model.get()));
|
| EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/",
|
| GetDisplayedFileSystems(cookies_model.get()));
|
| - EXPECT_EQ(37, cookies_model->GetRoot()->GetTotalNodeCount());
|
| + EXPECT_EQ("quotahost1,quotahost2", GetDisplayedQuotas(cookies_model.get()));
|
| + EXPECT_EQ(41, cookies_model->GetRoot()->GetTotalNodeCount());
|
| }
|
|
|
| DeleteStoredObjects(cookies_model->GetRoot()->GetChild(8)->GetChild(0));
|
| @@ -553,7 +620,8 @@ TEST_F(CookiesTreeModelTest, RemoveCookiesNode) {
|
| GetDisplayedIndexedDBs(cookies_model.get()));
|
| EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/",
|
| GetDisplayedFileSystems(cookies_model.get()));
|
| - EXPECT_EQ(35, cookies_model->GetRoot()->GetTotalNodeCount());
|
| + EXPECT_EQ("quotahost1,quotahost2", GetDisplayedQuotas(cookies_model.get()));
|
| + EXPECT_EQ(39, cookies_model->GetRoot()->GetTotalNodeCount());
|
| }
|
| }
|
|
|
| @@ -576,7 +644,8 @@ TEST_F(CookiesTreeModelTest, RemoveCookieNode) {
|
| GetDisplayedIndexedDBs(cookies_model.get()));
|
| EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/",
|
| GetDisplayedFileSystems(cookies_model.get()));
|
| - // 39 because in this case, the origin remains, although the COOKIES
|
| + EXPECT_EQ("quotahost1,quotahost2", GetDisplayedQuotas(cookies_model.get()));
|
| + // 43 because in this case, the origin remains, although the COOKIES
|
| // node beneath it has been deleted. So, we have
|
| // root -> foo1 -> cookies -> a, foo2, foo3 -> cookies -> c
|
| // dbhost1 -> database -> db1, dbhost2 -> database -> db2,
|
| @@ -588,8 +657,10 @@ TEST_F(CookiesTreeModelTest, RemoveCookieNode) {
|
| // host1 -> sessionstorage -> http://host1:1/,
|
| // host2 -> sessionstorage -> http://host2:2/,
|
| // idbhost1 -> sessionstorage -> http://idbhost1:1/,
|
| - // idbhost2 -> sessionstorage -> http://idbhost2:2/.
|
| - EXPECT_EQ(39, cookies_model->GetRoot()->GetTotalNodeCount());
|
| + // idbhost2 -> sessionstorage -> http://idbhost2:2/,
|
| + // quotahost1 -> quotahost1,
|
| + // quotahost2 -> quotahost2.
|
| + EXPECT_EQ(43, cookies_model->GetRoot()->GetTotalNodeCount());
|
| }
|
|
|
| DeleteStoredObjects(cookies_model->GetRoot()->GetChild(6)->GetChild(0));
|
| @@ -606,7 +677,8 @@ TEST_F(CookiesTreeModelTest, RemoveCookieNode) {
|
| GetDisplayedIndexedDBs(cookies_model.get()));
|
| EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/",
|
| GetDisplayedFileSystems(cookies_model.get()));
|
| - EXPECT_EQ(37, cookies_model->GetRoot()->GetTotalNodeCount());
|
| + EXPECT_EQ("quotahost1,quotahost2", GetDisplayedQuotas(cookies_model.get()));
|
| + EXPECT_EQ(41, cookies_model->GetRoot()->GetTotalNodeCount());
|
| }
|
|
|
| DeleteStoredObjects(cookies_model->GetRoot()->GetChild(8)->GetChild(0));
|
| @@ -623,7 +695,8 @@ TEST_F(CookiesTreeModelTest, RemoveCookieNode) {
|
| GetDisplayedIndexedDBs(cookies_model.get()));
|
| EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/",
|
| GetDisplayedFileSystems(cookies_model.get()));
|
| - EXPECT_EQ(35, cookies_model->GetRoot()->GetTotalNodeCount());
|
| + EXPECT_EQ("quotahost1,quotahost2", GetDisplayedQuotas(cookies_model.get()));
|
| + EXPECT_EQ(39, cookies_model->GetRoot()->GetTotalNodeCount());
|
| }
|
| }
|
|
|
| @@ -640,6 +713,7 @@ TEST_F(CookiesTreeModelTest, RemoveSingleCookieNode) {
|
| mock_browsing_data_appcache_helper_,
|
| mock_browsing_data_indexed_db_helper_,
|
| mock_browsing_data_file_system_helper_,
|
| + mock_browsing_data_quota_helper_,
|
| false);
|
| mock_browsing_data_database_helper_->AddDatabaseSamples();
|
| mock_browsing_data_database_helper_->Notify();
|
| @@ -651,10 +725,13 @@ TEST_F(CookiesTreeModelTest, RemoveSingleCookieNode) {
|
| mock_browsing_data_indexed_db_helper_->Notify();
|
| mock_browsing_data_file_system_helper_->AddFileSystemSamples();
|
| mock_browsing_data_file_system_helper_->Notify();
|
| + mock_browsing_data_quota_helper_->AddQuotaSamples();
|
| + mock_browsing_data_quota_helper_->Notify();
|
|
|
| {
|
| SCOPED_TRACE("Initial State 4 cookies, 2 databases, 2 local storages, "
|
| - "2 session storages, 2 indexed DBs, 3 file systems");
|
| + "2 session storages, 2 indexed DBs, 3 file systems, "
|
| + "2 quotas.");
|
| // 42 because there's the root, then foo1 -> cookies -> a,
|
| // foo2 -> cookies -> b, foo3 -> cookies -> c,d
|
| // dbhost1 -> database -> db1, dbhost2 -> database -> db2,
|
| @@ -665,8 +742,10 @@ TEST_F(CookiesTreeModelTest, RemoveSingleCookieNode) {
|
| // host1 -> sessionstorage -> http://host1:1/,
|
| // host2 -> sessionstorage -> http://host2:2/,
|
| // idbhost1 -> sessionstorage -> http://idbhost1:1/,
|
| - // idbhost2 -> sessionstorage -> http://idbhost2:2/.
|
| - EXPECT_EQ(42, cookies_model.GetRoot()->GetTotalNodeCount());
|
| + // idbhost2 -> sessionstorage -> http://idbhost2:2/,
|
| + // quotahost1 -> quotahost1,
|
| + // quotahost2 -> quotahost2.
|
| + EXPECT_EQ(46, cookies_model.GetRoot()->GetTotalNodeCount());
|
| EXPECT_STREQ("A,B,C,D", GetMonsterCookies(monster).c_str());
|
| EXPECT_STREQ("A,B,C,D", GetDisplayedCookies(&cookies_model).c_str());
|
| EXPECT_EQ("db1,db2", GetDisplayedDatabases(&cookies_model));
|
| @@ -678,6 +757,7 @@ TEST_F(CookiesTreeModelTest, RemoveSingleCookieNode) {
|
| GetDisplayedIndexedDBs(&cookies_model));
|
| EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/",
|
| GetDisplayedFileSystems(&cookies_model));
|
| + EXPECT_EQ("quotahost1,quotahost2", GetDisplayedQuotas(&cookies_model));
|
| }
|
| DeleteStoredObjects(cookies_model.GetRoot()->GetChild(2));
|
| {
|
| @@ -693,7 +773,8 @@ TEST_F(CookiesTreeModelTest, RemoveSingleCookieNode) {
|
| GetDisplayedIndexedDBs(&cookies_model));
|
| EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/",
|
| GetDisplayedFileSystems(&cookies_model));
|
| - EXPECT_EQ(38, cookies_model.GetRoot()->GetTotalNodeCount());
|
| + EXPECT_EQ("quotahost1,quotahost2", GetDisplayedQuotas(&cookies_model));
|
| + EXPECT_EQ(42, cookies_model.GetRoot()->GetTotalNodeCount());
|
| }
|
| }
|
|
|
| @@ -711,6 +792,7 @@ TEST_F(CookiesTreeModelTest, RemoveSingleCookieNodeOf3) {
|
| mock_browsing_data_appcache_helper_,
|
| mock_browsing_data_indexed_db_helper_,
|
| mock_browsing_data_file_system_helper_,
|
| + mock_browsing_data_quota_helper_,
|
| false);
|
| mock_browsing_data_database_helper_->AddDatabaseSamples();
|
| mock_browsing_data_database_helper_->Notify();
|
| @@ -722,10 +804,13 @@ TEST_F(CookiesTreeModelTest, RemoveSingleCookieNodeOf3) {
|
| mock_browsing_data_indexed_db_helper_->Notify();
|
| mock_browsing_data_file_system_helper_->AddFileSystemSamples();
|
| mock_browsing_data_file_system_helper_->Notify();
|
| + mock_browsing_data_quota_helper_->AddQuotaSamples();
|
| + mock_browsing_data_quota_helper_->Notify();
|
|
|
| {
|
| SCOPED_TRACE("Initial State 5 cookies, 2 databases, 2 local storages, "
|
| - "2 session storages, 2 indexed DBs");
|
| + "2 session storages, 2 indexed DBs, 3 filesystems, "
|
| + "2 quotas.");
|
| // 43 because there's the root, then foo1 -> cookies -> a,
|
| // foo2 -> cookies -> b, foo3 -> cookies -> c,d,e
|
| // dbhost1 -> database -> db1, dbhost2 -> database -> db2,
|
| @@ -737,8 +822,10 @@ TEST_F(CookiesTreeModelTest, RemoveSingleCookieNodeOf3) {
|
| // host1 -> sessionstorage -> http://host1:1/,
|
| // host2 -> sessionstorage -> http://host2:2/,
|
| // idbhost1 -> sessionstorage -> http://idbhost1:1/,
|
| - // idbhost2 -> sessionstorage -> http://idbhost2:2/.
|
| - EXPECT_EQ(43, cookies_model.GetRoot()->GetTotalNodeCount());
|
| + // idbhost2 -> sessionstorage -> http://idbhost2:2/,
|
| + // quotahost1 -> quotahost1,
|
| + // quotahost2 -> quotahost2.
|
| + EXPECT_EQ(47, cookies_model.GetRoot()->GetTotalNodeCount());
|
| EXPECT_STREQ("A,B,C,D,E", GetMonsterCookies(monster).c_str());
|
| EXPECT_STREQ("A,B,C,D,E", GetDisplayedCookies(&cookies_model).c_str());
|
| EXPECT_EQ("db1,db2", GetDisplayedDatabases(&cookies_model));
|
| @@ -750,6 +837,7 @@ TEST_F(CookiesTreeModelTest, RemoveSingleCookieNodeOf3) {
|
| GetDisplayedIndexedDBs(&cookies_model));
|
| EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/",
|
| GetDisplayedFileSystems(&cookies_model));
|
| + EXPECT_EQ("quotahost1,quotahost2", GetDisplayedQuotas(&cookies_model));
|
| }
|
| DeleteStoredObjects(cookies_model.GetRoot()->GetChild(2)->GetChild(0)->
|
| GetChild(1));
|
| @@ -757,7 +845,7 @@ TEST_F(CookiesTreeModelTest, RemoveSingleCookieNodeOf3) {
|
| SCOPED_TRACE("Middle cookie in third origin removed");
|
| EXPECT_STREQ("A,B,C,E", GetMonsterCookies(monster).c_str());
|
| EXPECT_STREQ("A,B,C,E", GetDisplayedCookies(&cookies_model).c_str());
|
| - EXPECT_EQ(42, cookies_model.GetRoot()->GetTotalNodeCount());
|
| + EXPECT_EQ(46, cookies_model.GetRoot()->GetTotalNodeCount());
|
| EXPECT_EQ("db1,db2", GetDisplayedDatabases(&cookies_model));
|
| EXPECT_EQ("http://host1:1/,http://host2:2/",
|
| GetDisplayedLocalStorages(&cookies_model));
|
| @@ -767,6 +855,7 @@ TEST_F(CookiesTreeModelTest, RemoveSingleCookieNodeOf3) {
|
| GetDisplayedIndexedDBs(&cookies_model));
|
| EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/",
|
| GetDisplayedFileSystems(&cookies_model));
|
| + EXPECT_EQ("quotahost1,quotahost2", GetDisplayedQuotas(&cookies_model));
|
| }
|
| }
|
|
|
| @@ -784,6 +873,7 @@ TEST_F(CookiesTreeModelTest, RemoveSecondOrigin) {
|
| mock_browsing_data_appcache_helper_,
|
| mock_browsing_data_indexed_db_helper_,
|
| mock_browsing_data_file_system_helper_,
|
| + mock_browsing_data_quota_helper_,
|
| false);
|
| {
|
| SCOPED_TRACE("Initial State 5 cookies");
|
| @@ -822,6 +912,7 @@ TEST_F(CookiesTreeModelTest, OriginOrdering) {
|
| new MockBrowsingDataAppCacheHelper(profile_.get()),
|
| new MockBrowsingDataIndexedDBHelper(profile_.get()),
|
| new MockBrowsingDataFileSystemHelper(profile_.get()),
|
| + new MockBrowsingDataQuotaHelper(profile_.get()),
|
| false);
|
|
|
| {
|
| @@ -851,6 +942,7 @@ TEST_F(CookiesTreeModelTest, ContentSettings) {
|
| new MockBrowsingDataAppCacheHelper(profile_.get()),
|
| new MockBrowsingDataIndexedDBHelper(profile_.get()),
|
| new MockBrowsingDataFileSystemHelper(profile_.get()),
|
| + new MockBrowsingDataQuotaHelper(profile_.get()),
|
| false);
|
|
|
| TestingProfile profile;
|
|
|