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

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

Issue 164547: Mac: make save/open dialogs operate as tab-modal sheets.... Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Painfully (but hopefully correctly) merged ToT. Created 11 years, 2 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/browser.cc ('k') | chrome/browser/cocoa/bookmark_bar_controller.h » ('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 #include "chrome/browser/cocoa/bookmark_bar_bridge.h" 5 #include "chrome/browser/cocoa/bookmark_bar_bridge.h"
6 #include "chrome/browser/cocoa/bookmark_bar_controller.h" 6 #include "chrome/browser/cocoa/bookmark_bar_controller.h"
7 #include "chrome/browser/cocoa/browser_test_helper.h" 7 #include "chrome/browser/cocoa/browser_test_helper.h"
8 #include "chrome/browser/cocoa/cocoa_test_helper.h" 8 #include "chrome/browser/cocoa/cocoa_test_helper.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/platform_test.h" 10 #include "testing/platform_test.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 @end 32 @end
33 33
34 @implementation FakeBookmarkBarController 34 @implementation FakeBookmarkBarController
35 35
36 - (id)initWithBrowser:(Browser*)browser { 36 - (id)initWithBrowser:(Browser*)browser {
37 if ((self = [super initWithBrowser:browser 37 if ((self = [super initWithBrowser:browser
38 initialWidth:100 // arbitrary 38 initialWidth:100 // arbitrary
39 compressDelegate:nil 39 compressDelegate:nil
40 resizeDelegate:nil 40 resizeDelegate:nil
41 urlDelegate:self])) { 41 urlDelegate:self
42 commands:NULL])) {
42 callbacks_.reset([[NSMutableArray alloc] init]); 43 callbacks_.reset([[NSMutableArray alloc] init]);
43 } 44 }
44 return self; 45 return self;
45 } 46 }
46 47
47 - (void)loaded:(BookmarkModel*)model { 48 - (void)loaded:(BookmarkModel*)model {
48 [callbacks_ addObject:[NSNumber numberWithInt:0]]; 49 [callbacks_ addObject:[NSNumber numberWithInt:0]];
49 } 50 }
50 51
51 - (void)beingDeleted:(BookmarkModel*)model { 52 - (void)beingDeleted:(BookmarkModel*)model {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 bridge->BookmarkNodeRemoved(NULL, NULL, 0, NULL); 129 bridge->BookmarkNodeRemoved(NULL, NULL, 0, NULL);
129 130
130 // 8 calls above plus an initial Loaded() in init routine makes 9 131 // 8 calls above plus an initial Loaded() in init routine makes 9
131 EXPECT_TRUE([controller.get()->callbacks_ count] == 9); 132 EXPECT_TRUE([controller.get()->callbacks_ count] == 9);
132 133
133 for (int x = 1; x < 9; x++) { 134 for (int x = 1; x < 9; x++) {
134 NSNumber *num = [NSNumber numberWithInt:x-1]; 135 NSNumber *num = [NSNumber numberWithInt:x-1];
135 EXPECT_TRUE([[controller.get()->callbacks_ objectAtIndex:x] isEqual:num]); 136 EXPECT_TRUE([[controller.get()->callbacks_ objectAtIndex:x] isEqual:num]);
136 } 137 }
137 } 138 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/cocoa/bookmark_bar_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698