| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/sys_string_conversions.h" | 5 #include "base/sys_string_conversions.h" |
| 6 #import "chrome/browser/cocoa/cocoa_test_helper.h" | 6 #import "chrome/browser/cocoa/cocoa_test_helper.h" |
| 7 #include "chrome/browser/cocoa/cookie_details.h" | 7 #include "chrome/browser/cocoa/cookie_details.h" |
| 8 #include "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
| 9 #import "testing/gtest_mac.h" | 9 #import "testing/gtest_mac.h" |
| 10 | 10 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 } | 138 } |
| 139 | 139 |
| 140 TEST_F(CookiesDetailsTest, CreateForTreeIndexedDB) { | 140 TEST_F(CookiesDetailsTest, CreateForTreeIndexedDB) { |
| 141 scoped_nsobject<CocoaCookieDetails> details; | 141 scoped_nsobject<CocoaCookieDetails> details; |
| 142 | 142 |
| 143 std::string protocol("http"); | 143 std::string protocol("http"); |
| 144 std::string host("moose.org"); | 144 std::string host("moose.org"); |
| 145 unsigned short port = 80; | 145 unsigned short port = 80; |
| 146 std::string database_identifier("id"); | 146 std::string database_identifier("id"); |
| 147 std::string origin("moose.org"); | 147 std::string origin("moose.org"); |
| 148 std::string name("name"); | |
| 149 FilePath file_path(FILE_PATH_LITERAL("/")); | 148 FilePath file_path(FILE_PATH_LITERAL("/")); |
| 150 int64 size = 1234; | 149 int64 size = 1234; |
| 151 base::Time last_modified = base::Time::Now(); | 150 base::Time last_modified = base::Time::Now(); |
| 152 BrowsingDataIndexedDBHelper::IndexedDBInfo info(protocol, | 151 BrowsingDataIndexedDBHelper::IndexedDBInfo info(protocol, |
| 153 host, | 152 host, |
| 154 port, | 153 port, |
| 155 database_identifier, | 154 database_identifier, |
| 156 origin, | 155 origin, |
| 157 name, | |
| 158 file_path, | 156 file_path, |
| 159 size, | 157 size, |
| 160 last_modified); | 158 last_modified); |
| 161 | 159 |
| 162 details.reset([[CocoaCookieDetails alloc] initWithIndexedDBInfo:&info]); | 160 details.reset([[CocoaCookieDetails alloc] initWithIndexedDBInfo:&info]); |
| 163 | 161 |
| 164 EXPECT_EQ([details.get() type], kCocoaCookieDetailsTypeTreeIndexedDB); | 162 EXPECT_EQ([details.get() type], kCocoaCookieDetailsTypeTreeIndexedDB); |
| 165 EXPECT_NSEQ(@"moose.org", [details.get() domain]); | 163 EXPECT_NSEQ(@"moose.org", [details.get() domain]); |
| 166 EXPECT_NSEQ(@"1234 B", [details.get() fileSize]); | 164 EXPECT_NSEQ(@"1234 B", [details.get() fileSize]); |
| 167 EXPECT_NSNE(@"", [details.get() lastModified]); | 165 EXPECT_NSNE(@"", [details.get() lastModified]); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 EXPECT_FALSE([details.get() shouldShowLocalStorageTreeDetailsView]); | 238 EXPECT_FALSE([details.get() shouldShowLocalStorageTreeDetailsView]); |
| 241 EXPECT_FALSE([details.get() shouldShowDatabaseTreeDetailsView]); | 239 EXPECT_FALSE([details.get() shouldShowDatabaseTreeDetailsView]); |
| 242 EXPECT_FALSE([details.get() shouldShowAppCacheTreeDetailsView]); | 240 EXPECT_FALSE([details.get() shouldShowAppCacheTreeDetailsView]); |
| 243 EXPECT_FALSE([details.get() shouldShowIndexedDBTreeDetailsView]); | 241 EXPECT_FALSE([details.get() shouldShowIndexedDBTreeDetailsView]); |
| 244 EXPECT_FALSE([details.get() shouldShowLocalStoragePromptDetailsView]); | 242 EXPECT_FALSE([details.get() shouldShowLocalStoragePromptDetailsView]); |
| 245 EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]); | 243 EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]); |
| 246 EXPECT_TRUE([details.get() shouldShowAppCachePromptDetailsView]); | 244 EXPECT_TRUE([details.get() shouldShowAppCachePromptDetailsView]); |
| 247 } | 245 } |
| 248 | 246 |
| 249 } | 247 } |
| OLD | NEW |