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

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

Issue 112913004: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 #import "chrome/browser/ui/cocoa/website_settings_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/website_settings_bubble_controller.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" 8 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
9 #include "testing/gtest_mac.h" 9 #include "testing/gtest_mac.h"
10 10
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 EXPECT_NSNE([controller_ helpButton], [buttons objectAtIndex:1]); 311 EXPECT_NSNE([controller_ helpButton], [buttons objectAtIndex:1]);
312 312
313 // Check that it has a target and action linked up. 313 // Check that it has a target and action linked up.
314 link_button = static_cast<NSButton*>([buttons objectAtIndex:1]); 314 link_button = static_cast<NSButton*>([buttons objectAtIndex:1]);
315 EXPECT_NSEQ(controller_, [link_button target]); 315 EXPECT_NSEQ(controller_, [link_button target]);
316 EXPECT_TRUE([link_button action] == @selector(showCertificateInfo:)); 316 EXPECT_TRUE([link_button action] == @selector(showCertificateInfo:));
317 } 317 }
318 318
319 TEST_F(WebsiteSettingsBubbleControllerTest, SetFirstVisit) { 319 TEST_F(WebsiteSettingsBubbleControllerTest, SetFirstVisit) {
320 CreateBubble(); 320 CreateBubble();
321 bridge_->SetFirstVisit(ASCIIToUTF16("Yesterday")); 321 bridge_->SetFirstVisit(base::ASCIIToUTF16("Yesterday"));
322 EXPECT_NSEQ(@"Yesterday", 322 EXPECT_NSEQ(@"Yesterday",
323 [[controller_ firstVisitDescriptionField] stringValue]); 323 [[controller_ firstVisitDescriptionField] stringValue]);
324 } 324 }
325 325
326 TEST_F(WebsiteSettingsBubbleControllerTest, SetPermissionInfo) { 326 TEST_F(WebsiteSettingsBubbleControllerTest, SetPermissionInfo) {
327 CreateBubble(); 327 CreateBubble();
328 SetTestPermissions(); 328 SetTestPermissions();
329 329
330 // There should be three subviews per permission (an icon, a label and a 330 // There should be three subviews per permission (an icon, a label and a
331 // select box), plus a text label for the Permission section. 331 // select box), plus a text label for the Permission section.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 // popup buttons. 391 // popup buttons.
392 for (NSView* view in [[controller_ permissionsView] subviews]) { 392 for (NSView* view in [[controller_ permissionsView] subviews]) {
393 if ([view isKindOfClass:[NSPopUpButton class]]) { 393 if ([view isKindOfClass:[NSPopUpButton class]]) {
394 NSPopUpButton* button = static_cast<NSPopUpButton*>(view); 394 NSPopUpButton* button = static_cast<NSPopUpButton*>(view);
395 EXPECT_LT(NSMaxX([button frame]), window_width); 395 EXPECT_LT(NSMaxX([button frame]), window_width);
396 } 396 }
397 } 397 }
398 } 398 }
399 399
400 } // namespace 400 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698