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

Side by Side Diff: chrome/browser/ui/cocoa/page_info_bubble_controller_unittest.mm

Issue 6360007: Objective-C readability review for Robert Sesek <rsesek@google.com>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove @property space Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "app/l10n_util.h" 5 #include "app/l10n_util.h"
6 #include "base/scoped_nsobject.h" 6 #include "base/scoped_nsobject.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "chrome/browser/page_info_model.h" 11 #include "chrome/browser/page_info_model.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 ASCIIToUTF16("chrome.google.com"), 179 ASCIIToUTF16("chrome.google.com"),
180 base::IntToString16(1024)), 180 base::IntToString16(1024)),
181 l10n_util::GetStringUTF16( 181 l10n_util::GetStringUTF16(
182 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_WARNING)); 182 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_WARNING));
183 183
184 model_->AddSection(PageInfoModel::ICON_STATE_OK, 184 model_->AddSection(PageInfoModel::ICON_STATE_OK,
185 string16(), 185 string16(),
186 description, 186 description,
187 PageInfoModel::SECTION_INFO_CONNECTION); 187 PageInfoModel::SECTION_INFO_CONNECTION);
188 188
189
190 CreateBubble(); 189 CreateBubble();
191 [controller_ setCertID:1]; 190 [controller_ setCertID:1];
192 [controller_ performLayout]; 191 [controller_ performLayout];
193 192
194 CheckWindow(/*text=*/2, /*image=*/2, /*spacer=*/1, /*button=*/1); 193 CheckWindow(/*text=*/2, /*image=*/2, /*spacer=*/1, /*button=*/1);
195 194
196 // Look for the over-sized box. 195 // Look for the over-sized box.
197 NSString* targetDesc = base::SysUTF16ToNSString(description); 196 NSString* targetDesc = base::SysUTF16ToNSString(description);
198 NSArray* subviews = [[window_ contentView] subviews]; 197 NSArray* subviews = [[window_ contentView] subviews];
199 for (NSView* subview in subviews) { 198 for (NSView* subview in subviews) {
200 if ([subview isKindOfClass:[NSTextField class]]) { 199 if ([subview isKindOfClass:[NSTextField class]]) {
201 NSTextField* desc = static_cast<NSTextField*>(subview); 200 NSTextField* desc = static_cast<NSTextField*>(subview);
202 if ([[desc stringValue] isEqualToString:targetDesc]) { 201 if ([[desc stringValue] isEqualToString:targetDesc]) {
203 // Typical box frame is ~55px, make sure this is extra large. 202 // Typical box frame is ~55px, make sure this is extra large.
204 EXPECT_LT(75, NSHeight([desc frame])); 203 EXPECT_LT(75, NSHeight([desc frame]));
205 } 204 }
206 } 205 }
207 } 206 }
208 } 207 }
209 208
210 } // namespace 209 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698