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

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

Issue 289083004: infobars: Componentize ConfirmInfoBarDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 "chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.h" 5 #import "chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.h"
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "chrome/browser/infobars/confirm_infobar_delegate.h"
11 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
12 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" 11 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
13 #import "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h" 12 #import "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h"
14 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" 13 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h"
15 #include "chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.h" 14 #include "chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.h"
16 #include "chrome/browser/ui/cocoa/run_loop_testing.h" 15 #include "chrome/browser/ui/cocoa/run_loop_testing.h"
17 #include "chrome/test/base/testing_profile.h" 16 #include "chrome/test/base/testing_profile.h"
17 #include "components/infobars/core/confirm_infobar_delegate.h"
18 #import "content/public/browser/web_contents.h" 18 #import "content/public/browser/web_contents.h"
19 #include "ipc/ipc_message.h" 19 #include "ipc/ipc_message.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 #include "testing/platform_test.h" 21 #include "testing/platform_test.h"
22 22
23 using content::WebContents; 23 using content::WebContents;
24 24
25 @interface InfoBarController (ExposedForTesting) 25 @interface InfoBarController (ExposedForTesting)
26 - (NSString*)labelString; 26 - (NSString*)labelString;
27 - (NSRect)labelFrame; 27 - (NSRect)labelFrame;
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 const CGFloat width = 20; 238 const CGFloat width = 20;
239 NSRect newViewFrame = [[controller_ view] frame]; 239 NSRect newViewFrame = [[controller_ view] frame];
240 newViewFrame.size.width += width; 240 newViewFrame.size.width += width;
241 [[controller_ view] setFrame:newViewFrame]; 241 [[controller_ view] setFrame:newViewFrame];
242 242
243 NSRect newLabelFrame = [controller_ labelFrame]; 243 NSRect newLabelFrame = [controller_ labelFrame];
244 EXPECT_EQ(NSWidth(newLabelFrame), NSWidth(originalLabelFrame) + width); 244 EXPECT_EQ(NSWidth(newLabelFrame), NSWidth(originalLabelFrame) + width);
245 } 245 }
246 246
247 } // namespace 247 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698