OLD | NEW |
---|---|
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 Loading... | |
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 | 189 |
pink (ping after 24hrs)
2011/01/24 15:59:11
omit extra line
Robert Sesek
2011/01/24 16:39:56
Done.
| |
190 CreateBubble(); | 190 CreateBubble(); |
191 [controller_ setCertID:1]; | 191 [controller_ setCertID:1]; |
192 [controller_ performLayout]; | 192 [controller_ performLayout]; |
193 | 193 |
194 CheckWindow(/*text=*/2, /*image=*/2, /*spacer=*/1, /*button=*/1); | 194 CheckWindow(/*text=*/2, /*image=*/2, /*spacer=*/1, /*button=*/1); |
195 | 195 |
196 // Look for the over-sized box. | 196 // Look for the over-sized box. |
197 NSString* targetDesc = base::SysUTF16ToNSString(description); | 197 NSString* targetDesc = base::SysUTF16ToNSString(description); |
198 NSArray* subviews = [[window_ contentView] subviews]; | 198 NSArray* subviews = [[window_ contentView] subviews]; |
199 for (NSView* subview in subviews) { | 199 for (NSView* subview in subviews) { |
200 if ([subview isKindOfClass:[NSTextField class]]) { | 200 if ([subview isKindOfClass:[NSTextField class]]) { |
201 NSTextField* desc = static_cast<NSTextField*>(subview); | 201 NSTextField* desc = static_cast<NSTextField*>(subview); |
202 if ([[desc stringValue] isEqualToString:targetDesc]) { | 202 if ([[desc stringValue] isEqualToString:targetDesc]) { |
203 // Typical box frame is ~55px, make sure this is extra large. | 203 // Typical box frame is ~55px, make sure this is extra large. |
204 EXPECT_LT(75, NSHeight([desc frame])); | 204 EXPECT_LT(75, NSHeight([desc frame])); |
205 } | 205 } |
206 } | 206 } |
207 } | 207 } |
208 } | 208 } |
209 | 209 |
210 } // namespace | 210 } // namespace |
OLD | NEW |