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

Side by Side Diff: chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm

Issue 13954002: Refactor IndexedDBInfo out of browsingdata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix cocoa unit tests Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "net/cookies/canonical_cookie.h" 9 #include "net/cookies/canonical_cookie.h"
10 #include "net/cookies/parsed_cookie.h" 10 #include "net/cookies/parsed_cookie.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]); 131 EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]);
132 EXPECT_FALSE([details.get() shouldShowAppCachePromptDetailsView]); 132 EXPECT_FALSE([details.get() shouldShowAppCachePromptDetailsView]);
133 } 133 }
134 134
135 TEST_F(CookiesDetailsTest, CreateForTreeIndexedDB) { 135 TEST_F(CookiesDetailsTest, CreateForTreeIndexedDB) {
136 scoped_nsobject<CocoaCookieDetails> details; 136 scoped_nsobject<CocoaCookieDetails> details;
137 137
138 GURL origin("http://moose.org/"); 138 GURL origin("http://moose.org/");
139 int64 size = 1234; 139 int64 size = 1234;
140 base::Time last_modified = base::Time::Now(); 140 base::Time last_modified = base::Time::Now();
141 BrowsingDataIndexedDBHelper::IndexedDBInfo info(origin, 141 content::IndexedDBInfo info(origin,
142 size, 142 size,
143 last_modified); 143 last_modified);
144 144
145 details.reset([[CocoaCookieDetails alloc] initWithIndexedDBInfo:&info]); 145 details.reset([[CocoaCookieDetails alloc] initWithIndexedDBInfo:&info]);
146 146
147 EXPECT_EQ([details.get() type], kCocoaCookieDetailsTypeTreeIndexedDB); 147 EXPECT_EQ([details.get() type], kCocoaCookieDetailsTypeTreeIndexedDB);
148 EXPECT_NSEQ(@"http://moose.org/", [details.get() domain]); 148 EXPECT_NSEQ(@"http://moose.org/", [details.get() domain]);
149 EXPECT_NSEQ(@"1,234 B", [details.get() fileSize]); 149 EXPECT_NSEQ(@"1,234 B", [details.get() fileSize]);
150 EXPECT_NSNE(@"", [details.get() lastModified]); 150 EXPECT_NSNE(@"", [details.get() lastModified]);
151 151
152 EXPECT_TRUE([details.get() shouldHideCookieDetailsView]); 152 EXPECT_TRUE([details.get() shouldHideCookieDetailsView]);
153 EXPECT_FALSE([details.get() shouldShowLocalStorageTreeDetailsView]); 153 EXPECT_FALSE([details.get() shouldShowLocalStorageTreeDetailsView]);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 EXPECT_FALSE([details.get() shouldShowLocalStorageTreeDetailsView]); 223 EXPECT_FALSE([details.get() shouldShowLocalStorageTreeDetailsView]);
224 EXPECT_FALSE([details.get() shouldShowDatabaseTreeDetailsView]); 224 EXPECT_FALSE([details.get() shouldShowDatabaseTreeDetailsView]);
225 EXPECT_FALSE([details.get() shouldShowAppCacheTreeDetailsView]); 225 EXPECT_FALSE([details.get() shouldShowAppCacheTreeDetailsView]);
226 EXPECT_FALSE([details.get() shouldShowIndexedDBTreeDetailsView]); 226 EXPECT_FALSE([details.get() shouldShowIndexedDBTreeDetailsView]);
227 EXPECT_FALSE([details.get() shouldShowLocalStoragePromptDetailsView]); 227 EXPECT_FALSE([details.get() shouldShowLocalStoragePromptDetailsView]);
228 EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]); 228 EXPECT_FALSE([details.get() shouldShowDatabasePromptDetailsView]);
229 EXPECT_TRUE([details.get() shouldShowAppCachePromptDetailsView]); 229 EXPECT_TRUE([details.get() shouldShowAppCachePromptDetailsView]);
230 } 230 }
231 231
232 } 232 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/content_settings/cookie_details.mm ('k') | chrome/browser/ui/gtk/gtk_chrome_cookie_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698