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

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm

Issue 7004036: Added some enhancements to OCMock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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/ui/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm
index bff1c11f3c63d9212a6e6a940984d08a7a5c7837..2711086bc9fc3517f312f12840a75f4fc89dd984 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm
@@ -18,6 +18,7 @@
#include "testing/platform_test.h"
#include "third_party/ocmock/gtest_support.h"
#import "third_party/ocmock/OCMock/OCMock.h"
+#import "third_party/ocmock/ocmock_extensions.h"
using ::testing::Return;
using ::testing::ReturnArg;
@@ -110,9 +111,6 @@ TEST_F(AutocompleteTextFieldEditorTest, PageActionMenus) {
action:@selector(goFish:)
keyEquivalent:@""];
- // For OCMOCK_VALUE().
- BOOL yes = YES;
-
// So that we don't have to mock the observer.
[editor_ setEditable:NO];
@@ -120,7 +118,7 @@ TEST_F(AutocompleteTextFieldEditorTest, PageActionMenus) {
// propagated back.
{
id delegate = [OCMockObject mockForClass:[AutocompleteTextField class]];
- [[[delegate stub] andReturnValue:OCMOCK_VALUE(yes)]
+ [[[delegate stub] andReturnBool:YES]
isKindOfClass:[AutocompleteTextField class]];
[[[delegate expect] andReturn:menu.get()] decorationMenuForEvent:event];
[editor_ setDelegate:delegate];
@@ -135,7 +133,7 @@ TEST_F(AutocompleteTextFieldEditorTest, PageActionMenus) {
// returned.
{
id delegate = [OCMockObject mockForClass:[AutocompleteTextField class]];
- [[[delegate stub] andReturnValue:OCMOCK_VALUE(yes)]
+ [[[delegate stub] andReturnBool:YES]
isKindOfClass:[AutocompleteTextField class]];
[[[delegate expect] andReturn:nil] decorationMenuForEvent:event];
[editor_ setDelegate:delegate];

Powered by Google App Engine
This is Rietveld 408576698