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

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

Issue 3095004: [Mac] Use the new {EXPECT,ASSERT}_NS{EQ,NE} macros where possible. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Fix compile Created 10 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
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 #import "testing/gtest_mac.h"
10 #include "testing/platform_test.h" 11 #include "testing/platform_test.h"
11 12
12 // TODO(jrg): add OCMock to Chromium to save some typing. 13 // TODO(jrg): add OCMock to Chromium to save some typing.
13 14
14 namespace { 15 namespace {
15 16
16 // Information needed to open a URL, as passed to the 17 // Information needed to open a URL, as passed to the
17 // BookmarkBarController's delegate. 18 // BookmarkBarController's delegate.
18 typedef std::pair<GURL,WindowOpenDisposition> OpenInfo; 19 typedef std::pair<GURL,WindowOpenDisposition> OpenInfo;
19 20
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 bridge->BookmarkNodeAdded(NULL, NULL, 0); 122 bridge->BookmarkNodeAdded(NULL, NULL, 0);
122 bridge->BookmarkNodeChanged(NULL, NULL); 123 bridge->BookmarkNodeChanged(NULL, NULL);
123 bridge->BookmarkNodeFavIconLoaded(NULL, NULL); 124 bridge->BookmarkNodeFavIconLoaded(NULL, NULL);
124 bridge->BookmarkNodeChildrenReordered(NULL, NULL); 125 bridge->BookmarkNodeChildrenReordered(NULL, NULL);
125 bridge->BookmarkNodeRemoved(NULL, NULL, 0, NULL); 126 bridge->BookmarkNodeRemoved(NULL, NULL, 0, NULL);
126 127
127 // 8 calls above plus an initial Loaded() in init routine makes 9 128 // 8 calls above plus an initial Loaded() in init routine makes 9
128 EXPECT_TRUE([controller.get()->callbacks_ count] == 9); 129 EXPECT_TRUE([controller.get()->callbacks_ count] == 9);
129 130
130 for (int x = 1; x < 9; x++) { 131 for (int x = 1; x < 9; x++) {
131 NSNumber *num = [NSNumber numberWithInt:x-1]; 132 NSNumber* num = [NSNumber numberWithInt:x-1];
132 EXPECT_TRUE([[controller.get()->callbacks_ objectAtIndex:x] isEqual:num]); 133 EXPECT_NSEQ(num, [controller.get()->callbacks_ objectAtIndex:x]);
133 } 134 }
134 } 135 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698