| Index: chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm
|
| diff --git a/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm b/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm
|
| index 7a3c8e71b6014f141504ea79e5a59c3078b16d52..e0711a8a810726dfa7cf5bf661b90405233cc7a1 100644
|
| --- a/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm
|
| +++ b/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm
|
| @@ -51,6 +51,7 @@ TEST_F(CookiesDetailsTest, CreateForCookie) {
|
| EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowAppCachePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowServiceWorkerTreeDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowCacheStorageTreeDetailsView]);
|
| }
|
|
|
| TEST_F(CookiesDetailsTest, CreateForTreeDatabase) {
|
| @@ -82,6 +83,7 @@ TEST_F(CookiesDetailsTest, CreateForTreeDatabase) {
|
| EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowAppCachePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowServiceWorkerTreeDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowCacheStorageTreeDetailsView]);
|
| }
|
|
|
| TEST_F(CookiesDetailsTest, CreateForTreeLocalStorage) {
|
| @@ -107,6 +109,7 @@ TEST_F(CookiesDetailsTest, CreateForTreeLocalStorage) {
|
| EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowAppCachePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowServiceWorkerTreeDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowCacheStorageTreeDetailsView]);
|
| }
|
|
|
| TEST_F(CookiesDetailsTest, CreateForTreeAppCache) {
|
| @@ -137,6 +140,7 @@ TEST_F(CookiesDetailsTest, CreateForTreeAppCache) {
|
| EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowAppCachePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowServiceWorkerTreeDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowCacheStorageTreeDetailsView]);
|
| }
|
|
|
| TEST_F(CookiesDetailsTest, CreateForTreeIndexedDB) {
|
| @@ -166,6 +170,7 @@ TEST_F(CookiesDetailsTest, CreateForTreeIndexedDB) {
|
| EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowAppCachePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowServiceWorkerTreeDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowCacheStorageTreeDetailsView]);
|
| }
|
|
|
| TEST_F(CookiesDetailsTest, CreateForPromptDatabase) {
|
| @@ -193,6 +198,7 @@ TEST_F(CookiesDetailsTest, CreateForPromptDatabase) {
|
| EXPECT_TRUE([details.get() shouldShowDatabasePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowAppCachePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowServiceWorkerTreeDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowCacheStorageTreeDetailsView]);
|
| }
|
|
|
| TEST_F(CookiesDetailsTest, CreateForPromptLocalStorage) {
|
| @@ -218,6 +224,7 @@ TEST_F(CookiesDetailsTest, CreateForPromptLocalStorage) {
|
| EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowAppCachePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowServiceWorkerTreeDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowCacheStorageTreeDetailsView]);
|
| }
|
|
|
| TEST_F(CookiesDetailsTest, CreateForPromptAppCache) {
|
| @@ -239,6 +246,7 @@ TEST_F(CookiesDetailsTest, CreateForPromptAppCache) {
|
| EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]);
|
| EXPECT_TRUE([details.get() shouldShowAppCachePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowServiceWorkerTreeDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowCacheStorageTreeDetailsView]);
|
| }
|
|
|
| TEST_F(CookiesDetailsTest, CreateForTreeServiceWorker) {
|
| @@ -270,5 +278,32 @@ TEST_F(CookiesDetailsTest, CreateForTreeServiceWorker) {
|
| EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]);
|
| EXPECT_FALSE([details.get() shouldShowAppCachePromptDetailsView]);
|
| EXPECT_TRUE([details.get() shouldShowServiceWorkerTreeDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowCacheStorageTreeDetailsView]);
|
| +}
|
| +
|
| +TEST_F(CookiesDetailsTest, CreateForTreeCacheStorage) {
|
| + base::scoped_nsobject<CocoaCookieDetails> details;
|
| +
|
| + GURL origin("https://example.com/");
|
| + content::CacheStorageUsageInfo info(origin);
|
| +
|
| + details.reset(
|
| + [[CocoaCookieDetails alloc] initWithServiceWorkerUsageInfo:&info]);
|
| +
|
| + EXPECT_EQ([details.get() type], kCocoaCookieDetailsTypeTreeServiceWorker);
|
| + EXPECT_NSEQ(@"https://example.com/", [details.get() domain]);
|
| + EXPECT_NSEQ(@"0 B", [details.get() fileSize]);
|
| + EXPECT_NSEQ(@"", [details.get() lastModified]);
|
| +
|
| + EXPECT_TRUE([details.get() shouldHideCookieDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowLocalStorageTreeDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowDatabaseTreeDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowAppCacheTreeDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowIndexedDBTreeDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowLocalStoragePromptDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowAppCachePromptDetailsView]);
|
| + EXPECT_FALSE([details.get() shouldShowServiceWorkerTreeDetailsView]);
|
| + EXPECT_TRUE([details.get() shouldShowCacheStorageTreeDetailsView]);
|
| }
|
| }
|
|
|