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

Side by Side Diff: chrome/browser/ui/cocoa/infobars/infobar_controller_unittest.mm

Issue 6598057: Split infobar_delegate.[cc,h] into separate pieces for the different classes defined within, so that (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac Created 9 years, 9 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) 2011 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/scoped_nsobject.h" 7 #include "base/scoped_nsobject.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "chrome/browser/tab_contents/infobar_delegate.h" 10 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
11 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 11 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
12 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" 12 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h"
13 #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h" 13 #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h"
14 #include "chrome/browser/ui/cocoa/infobars/infobar_test_helper.h" 14 #include "chrome/browser/ui/cocoa/infobars/infobar_test_helper.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "testing/platform_test.h" 16 #include "testing/platform_test.h"
17 17
18 @interface InfoBarController (ExposedForTesting) 18 @interface InfoBarController (ExposedForTesting)
19 - (NSString*)labelString; 19 - (NSString*)labelString;
20 - (NSRect)labelFrame; 20 - (NSRect)labelFrame;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 const CGFloat width = 20; 244 const CGFloat width = 20;
245 NSRect newViewFrame = [[controller_ view] frame]; 245 NSRect newViewFrame = [[controller_ view] frame];
246 newViewFrame.size.width += width; 246 newViewFrame.size.width += width;
247 [[controller_ view] setFrame:newViewFrame]; 247 [[controller_ view] setFrame:newViewFrame];
248 248
249 NSRect newLabelFrame = [controller_ labelFrame]; 249 NSRect newLabelFrame = [controller_ labelFrame];
250 EXPECT_EQ(NSWidth(newLabelFrame), NSWidth(originalLabelFrame) + width); 250 EXPECT_EQ(NSWidth(newLabelFrame), NSWidth(originalLabelFrame) + width);
251 } 251 }
252 252
253 } // namespace 253 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698