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

Unified Diff: chrome/browser/cocoa/location_bar/selected_keyword_decoration_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/location_bar/selected_keyword_decoration_unittest.mm
diff --git a/chrome/browser/cocoa/location_bar/selected_keyword_decoration_unittest.mm b/chrome/browser/cocoa/location_bar/selected_keyword_decoration_unittest.mm
index bd0f42f7c55dfef235d142d1095803f234e27c98..6a7907a5ba7c6377b8b640e2223efb2875540795 100644
--- a/chrome/browser/cocoa/location_bar/selected_keyword_decoration_unittest.mm
+++ b/chrome/browser/cocoa/location_bar/selected_keyword_decoration_unittest.mm
@@ -8,6 +8,7 @@
#import "chrome/browser/cocoa/cocoa_test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
+#import "testing/gtest_mac.h"
namespace {
@@ -41,24 +42,24 @@ TEST_F(SelectedKeywordDecorationTest, UsesPartialKeywordIfNarrow) {
// Wide width chooses the full string and image.
const CGFloat all_width = decoration_.GetWidthForSpace(kWidth);
EXPECT_TRUE(decoration_.image_);
- EXPECT_TRUE([decoration_.label_ isEqualToString:kFullString]);
+ EXPECT_NSEQ(kFullString, decoration_.label_);
// If not enough space to include the image, uses exactly the full
// string.
const CGFloat full_width = decoration_.GetWidthForSpace(all_width - 5.0);
EXPECT_LT(full_width, all_width);
EXPECT_FALSE(decoration_.image_);
- EXPECT_TRUE([decoration_.label_ isEqualToString:kFullString]);
+ EXPECT_NSEQ(kFullString, decoration_.label_);
// Narrow width chooses the partial string.
const CGFloat partial_width = decoration_.GetWidthForSpace(kNarrowWidth);
EXPECT_LT(partial_width, full_width);
EXPECT_FALSE(decoration_.image_);
- EXPECT_TRUE([decoration_.label_ isEqualToString:kPartialString]);
+ EXPECT_NSEQ(kPartialString, decoration_.label_);
// Narrow doesn't choose partial string if there is not one.
decoration_.partial_string_.reset();
decoration_.GetWidthForSpace(kNarrowWidth);
EXPECT_FALSE(decoration_.image_);
- EXPECT_TRUE([decoration_.label_ isEqualToString:kFullString]);
+ EXPECT_NSEQ(kFullString, decoration_.label_);
}

Powered by Google App Engine
This is Rietveld 408576698