| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/strings/sys_string_conversions.h" | 5 #include "base/strings/sys_string_conversions.h" |
| 6 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 6 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
| 7 #include "chrome/browser/ui/cocoa/content_settings/cookie_details.h" | 7 #include "chrome/browser/ui/cocoa/content_settings/cookie_details.h" |
| 8 #include "net/cookies/canonical_cookie.h" | 8 #include "net/cookies/canonical_cookie.h" |
| 9 #include "net/cookies/parsed_cookie.h" | 9 #include "net/cookies/parsed_cookie.h" |
| 10 #import "testing/gtest_mac.h" | 10 #import "testing/gtest_mac.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 EXPECT_FALSE([details.get() shouldShowIndexedDBTreeDetailsView]); | 100 EXPECT_FALSE([details.get() shouldShowIndexedDBTreeDetailsView]); |
| 101 EXPECT_FALSE([details.get() shouldShowLocalStoragePromptDetailsView]); | 101 EXPECT_FALSE([details.get() shouldShowLocalStoragePromptDetailsView]); |
| 102 EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]); | 102 EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]); |
| 103 EXPECT_FALSE([details.get() shouldShowAppCachePromptDetailsView]); | 103 EXPECT_FALSE([details.get() shouldShowAppCachePromptDetailsView]); |
| 104 } | 104 } |
| 105 | 105 |
| 106 TEST_F(CookiesDetailsTest, CreateForTreeAppCache) { | 106 TEST_F(CookiesDetailsTest, CreateForTreeAppCache) { |
| 107 base::scoped_nsobject<CocoaCookieDetails> details; | 107 base::scoped_nsobject<CocoaCookieDetails> details; |
| 108 | 108 |
| 109 GURL url("http://chromium.org/stuff.manifest"); | 109 GURL url("http://chromium.org/stuff.manifest"); |
| 110 appcache::AppCacheInfo info; | 110 content::AppCacheInfo info; |
| 111 info.creation_time = base::Time::Now(); | 111 info.creation_time = base::Time::Now(); |
| 112 info.last_update_time = base::Time::Now(); | 112 info.last_update_time = base::Time::Now(); |
| 113 info.last_access_time = base::Time::Now(); | 113 info.last_access_time = base::Time::Now(); |
| 114 info.size=2678; | 114 info.size=2678; |
| 115 info.manifest_url = url; | 115 info.manifest_url = url; |
| 116 details.reset([[CocoaCookieDetails alloc] initWithAppCacheInfo:&info]); | 116 details.reset([[CocoaCookieDetails alloc] initWithAppCacheInfo:&info]); |
| 117 | 117 |
| 118 EXPECT_EQ([details.get() type], kCocoaCookieDetailsTypeTreeAppCache); | 118 EXPECT_EQ([details.get() type], kCocoaCookieDetailsTypeTreeAppCache); |
| 119 EXPECT_NSEQ(@"http://chromium.org/stuff.manifest", | 119 EXPECT_NSEQ(@"http://chromium.org/stuff.manifest", |
| 120 [details.get() manifestURL]); | 120 [details.get() manifestURL]); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 EXPECT_FALSE([details.get() shouldShowLocalStorageTreeDetailsView]); | 226 EXPECT_FALSE([details.get() shouldShowLocalStorageTreeDetailsView]); |
| 227 EXPECT_FALSE([details.get() shouldShowDatabaseTreeDetailsView]); | 227 EXPECT_FALSE([details.get() shouldShowDatabaseTreeDetailsView]); |
| 228 EXPECT_FALSE([details.get() shouldShowAppCacheTreeDetailsView]); | 228 EXPECT_FALSE([details.get() shouldShowAppCacheTreeDetailsView]); |
| 229 EXPECT_FALSE([details.get() shouldShowIndexedDBTreeDetailsView]); | 229 EXPECT_FALSE([details.get() shouldShowIndexedDBTreeDetailsView]); |
| 230 EXPECT_FALSE([details.get() shouldShowLocalStoragePromptDetailsView]); | 230 EXPECT_FALSE([details.get() shouldShowLocalStoragePromptDetailsView]); |
| 231 EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]); | 231 EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]); |
| 232 EXPECT_TRUE([details.get() shouldShowAppCachePromptDetailsView]); | 232 EXPECT_TRUE([details.get() shouldShowAppCachePromptDetailsView]); |
| 233 } | 233 } |
| 234 | 234 |
| 235 } | 235 } |
| OLD | NEW |