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

Unified Diff: chrome/browser/cocoa/location_bar/autocomplete_text_field_editor_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/autocomplete_text_field_editor_unittest.mm
diff --git a/chrome/browser/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm b/chrome/browser/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm
index 543d4fa8eed151165ced1538b7f41d0b42eacf85..8d5cecfffc4b377ed487754d367afb71333d296c 100644
--- a/chrome/browser/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm
+++ b/chrome/browser/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm
@@ -14,6 +14,7 @@
#include "grit/generated_resources.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gtest/include/gtest/gtest.h"
+#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
#import "third_party/ocmock/OCMock/OCMock.h"
@@ -73,28 +74,28 @@ TEST_F(AutocompleteTextFieldEditorTest, InsertStripsControlChars) {
[editor_ selectAll:nil];
[editor_ insertText:@"t"];
- EXPECT_TRUE([[field_ stringValue] isEqualToString:@"t"]);
+ EXPECT_NSEQ(@"t", [field_ stringValue]);
[editor_ insertText:@"h"];
- EXPECT_TRUE([[field_ stringValue] isEqualToString:@"th"]);
+ EXPECT_NSEQ(@"th", [field_ stringValue]);
// TAB doesn't get inserted.
[editor_ insertText:[NSString stringWithFormat:@"%c", 7]];
- EXPECT_TRUE([[field_ stringValue] isEqualToString:@"th"]);
+ EXPECT_NSEQ(@"th", [field_ stringValue]);
// Newline doesn't get inserted.
[editor_ insertText:[NSString stringWithFormat:@"%c", 12]];
- EXPECT_TRUE([[field_ stringValue] isEqualToString:@"th"]);
+ EXPECT_NSEQ(@"th", [field_ stringValue]);
// Multi-character strings get through.
[editor_ insertText:[NSString stringWithFormat:@"i%cs%c", 8, 127]];
- EXPECT_TRUE([[field_ stringValue] isEqualToString:@"this"]);
+ EXPECT_NSEQ(@"this", [field_ stringValue]);
// Attempting to insert newline when everything is selected clears
// the field.
[editor_ selectAll:nil];
[editor_ insertText:[NSString stringWithFormat:@"%c", 12]];
- EXPECT_TRUE([[field_ stringValue] isEqualToString:@""]);
+ EXPECT_NSEQ(@"", [field_ stringValue]);
}
// Test that |delegate| can provide page action menus.

Powered by Google App Engine
This is Rietveld 408576698