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

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

Issue 171016: Bookmark STAR bubble (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/cocoa/toolbar_controller.mm ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #import "base/scoped_nsobject.h" 7 #import "base/scoped_nsobject.h"
8 #include "chrome/app/chrome_dll_resource.h" 8 #include "chrome/app/chrome_dll_resource.h"
9 #include "chrome/browser/cocoa/browser_test_helper.h" 9 #include "chrome/browser/cocoa/browser_test_helper.h"
10 #import "chrome/browser/cocoa/cocoa_test_helper.h" 10 #import "chrome/browser/cocoa/cocoa_test_helper.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 bookmarkDelegate:nil]); 241 bookmarkDelegate:nil]);
242 EXPECT_TRUE([bar_ view]); 242 EXPECT_TRUE([bar_ view]);
243 243
244 // Make sure the bookmark bar is the same width as the toolbar 244 // Make sure the bookmark bar is the same width as the toolbar
245 NSView* bookmarkBarView = [[bar_ bookmarkBarController] view]; 245 NSView* bookmarkBarView = [[bar_ bookmarkBarController] view];
246 EXPECT_EQ([[bar_ view] frame].size.width, 246 EXPECT_EQ([[bar_ view] frame].size.width,
247 [bookmarkBarView frame].size.width); 247 [bookmarkBarView frame].size.width);
248 EXPECT_TRUE([bookmarkBarView isDescendantOf:[bar_ view]]); 248 EXPECT_TRUE([bookmarkBarView isDescendantOf:[bar_ view]]);
249 } 249 }
250 250
251 TEST_F(ToolbarControllerTest, StarButtonInWindowCoordinates) {
252 NSRect star = [bar_ starButtonInWindowCoordinates];
253 NSRect all = [[[bar_ view] window] frame];
254
255 // Make sure the star is completely inside the window rect
256 EXPECT_TRUE(NSContainsRect(all, star));
257 }
258
259
251 } // namespace 260 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/toolbar_controller.mm ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698