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

Unified Diff: chrome/browser/cocoa/preferences_window_controller_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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/preferences_window_controller_unittest.mm
diff --git a/chrome/browser/cocoa/preferences_window_controller_unittest.mm b/chrome/browser/cocoa/preferences_window_controller_unittest.mm
index cd47d5cf4532a3db896fea8155e0307b016b70b7..53eb21a7f0d804438f479f26eabec495eeaa04b2 100644
--- a/chrome/browser/cocoa/preferences_window_controller_unittest.mm
+++ b/chrome/browser/cocoa/preferences_window_controller_unittest.mm
@@ -12,6 +12,7 @@
#include "chrome/browser/options_window.h"
#include "chrome/common/pref_names.h"
#include "testing/gtest/include/gtest/gtest.h"
+#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
// Helper Objective-C object that sets a BOOL when we get a particular
@@ -197,27 +198,25 @@ TEST_F(PrefsControllerTest, SwitchToPage) {
EXPECT_TRUE([basicsView isDescendantOf:contentView]);
EXPECT_FALSE([personalStuffView isDescendantOf:contentView]);
EXPECT_FALSE([underTheHoodView isDescendantOf:contentView]);
- EXPECT_TRUE([[toolbar selectedItemIdentifier] isEqualTo:basicsIdentifier]);
+ EXPECT_NSEQ(basicsIdentifier, [toolbar selectedItemIdentifier]);
EXPECT_EQ(OPTIONS_PAGE_GENERAL, lastSelectedPage->GetValue());
- EXPECT_TRUE([[window title] isEqualTo:[basicsToolbarItem label]]);
+ EXPECT_NSEQ([window title], [basicsToolbarItem label]);
Mark Mentovai 2010/08/06 20:01:01 Reverse? Also on 211, 219, and 230.
[pref_controller_ switchToPage:OPTIONS_PAGE_CONTENT animate:NO];
EXPECT_FALSE([basicsView isDescendantOf:contentView]);
EXPECT_TRUE([personalStuffView isDescendantOf:contentView]);
EXPECT_FALSE([underTheHoodView isDescendantOf:contentView]);
- EXPECT_TRUE([[toolbar selectedItemIdentifier]
- isEqualTo:personalStuffIdentifier]);
+ EXPECT_NSEQ([toolbar selectedItemIdentifier], personalStuffIdentifier);
EXPECT_EQ(OPTIONS_PAGE_CONTENT, lastSelectedPage->GetValue());
- EXPECT_TRUE([[window title] isEqualTo:[personalStuffToolbarItem label]]);
+ EXPECT_NSEQ([window title], [personalStuffToolbarItem label]);
[pref_controller_ switchToPage:OPTIONS_PAGE_ADVANCED animate:NO];
EXPECT_FALSE([basicsView isDescendantOf:contentView]);
EXPECT_FALSE([personalStuffView isDescendantOf:contentView]);
EXPECT_TRUE([underTheHoodView isDescendantOf:contentView]);
- EXPECT_TRUE([[toolbar selectedItemIdentifier]
- isEqualTo:underTheHoodIdentifier]);
+ EXPECT_NSEQ([toolbar selectedItemIdentifier], underTheHoodIdentifier);
EXPECT_EQ(OPTIONS_PAGE_ADVANCED, lastSelectedPage->GetValue());
- EXPECT_TRUE([[window title] isEqualTo:[underTheHoodToolbarItem label]]);
+ EXPECT_NSEQ([window title], [underTheHoodToolbarItem label]);
// Test OPTIONS_PAGE_DEFAULT.
@@ -226,10 +225,9 @@ TEST_F(PrefsControllerTest, SwitchToPage) {
EXPECT_FALSE([basicsView isDescendantOf:contentView]);
EXPECT_TRUE([personalStuffView isDescendantOf:contentView]);
EXPECT_FALSE([underTheHoodView isDescendantOf:contentView]);
- EXPECT_TRUE([[toolbar selectedItemIdentifier]
- isEqualTo:personalStuffIdentifier]);
+ EXPECT_NSEQ(personalStuffIdentifier, [toolbar selectedItemIdentifier]);
EXPECT_EQ(OPTIONS_PAGE_CONTENT, lastSelectedPage->GetValue());
- EXPECT_TRUE([[window title] isEqualTo:[personalStuffToolbarItem label]]);
+ EXPECT_NSEQ([window title], [personalStuffToolbarItem label]);
// TODO(akalin): Figure out how to test animation; we'll need everything
// to stick around until the animation finishes.

Powered by Google App Engine
This is Rietveld 408576698