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

Side by Side Diff: chrome/browser/cocoa/page_info_window_mac_unittest.mm

Issue 3056029: Move the number conversions from string_util to a new file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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) 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 "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/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
9 #import "chrome/browser/cocoa/page_info_window_mac.h" 10 #import "chrome/browser/cocoa/page_info_window_mac.h"
10 #import "chrome/browser/cocoa/page_info_window_controller.h" 11 #import "chrome/browser/cocoa/page_info_window_controller.h"
11 #include "chrome/browser/cocoa/browser_test_helper.h" 12 #include "chrome/browser/cocoa/browser_test_helper.h"
12 #import "chrome/browser/cocoa/cocoa_test_helper.h" 13 #import "chrome/browser/cocoa/cocoa_test_helper.h"
13 #include "chrome/browser/page_info_model.h" 14 #include "chrome/browser/page_info_model.h"
14 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
15 16
16 namespace { 17 namespace {
17 18
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // region (kImageSize). 164 // region (kImageSize).
164 string16 title = 165 string16 title =
165 l10n_util::GetStringUTF16(IDS_PAGE_INFO_SECURITY_TAB_CONNECTION_TITLE); 166 l10n_util::GetStringUTF16(IDS_PAGE_INFO_SECURITY_TAB_CONNECTION_TITLE);
166 model_->AddSection(true, 167 model_->AddSection(true,
167 title, 168 title,
168 l10n_util::GetStringFUTF16( 169 l10n_util::GetStringFUTF16(
169 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK, 170 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK,
170 l10n_util::GetStringFUTF16( 171 l10n_util::GetStringFUTF16(
171 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_CONNECTION_TEXT, 172 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_CONNECTION_TEXT,
172 ASCIIToUTF16("chrome.google.com"), 173 ASCIIToUTF16("chrome.google.com"),
173 IntToString16(1024)), 174 base::IntToString16(1024)),
174 l10n_util::GetStringUTF16( 175 l10n_util::GetStringUTF16(
175 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_WARNING))); 176 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_WARNING)));
176 177
177 bridge_->ModelChanged(); 178 bridge_->ModelChanged();
178 179
179 NSArray* subviews = [[window_ contentView] subviews]; 180 NSArray* subviews = [[window_ contentView] subviews];
180 CheckWindow(1, 2); 181 CheckWindow(1, 2);
181 182
182 // Look for the over-sized box. 183 // Look for the over-sized box.
183 NSString* targetTitle = base::SysUTF16ToNSString(title); 184 NSString* targetTitle = base::SysUTF16ToNSString(title);
184 for (NSView* subview in subviews) { 185 for (NSView* subview in subviews) {
185 if ([subview isKindOfClass:[NSBox class]]) { 186 if ([subview isKindOfClass:[NSBox class]]) {
186 NSBox* box = static_cast<NSBox*>(subview); 187 NSBox* box = static_cast<NSBox*>(subview);
187 if ([[box title] isEqualToString:targetTitle]) { 188 if ([[box title] isEqualToString:targetTitle]) {
188 // Typical box frame is ~55px, make sure this is extra large. 189 // Typical box frame is ~55px, make sure this is extra large.
189 EXPECT_LT(75, NSHeight([box frame])); 190 EXPECT_LT(75, NSHeight([box frame]));
190 } 191 }
191 } 192 }
192 } 193 }
193 } 194 }
194 195
195 } // namespace 196 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/history_menu_bridge.mm ('k') | chrome/browser/config_dir_policy_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698