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

Unified Diff: ui/base/cocoa/cocoa_base_utils_unittest.mm

Issue 345243007: Add ScopedObjCClassSwizzler in base/mac, absorbs objc_method_swizzle and ScopedClassSwizzler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Inlude in shiny new gn base_unittests target Created 6 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
« no previous file with comments | « chrome/common/mac/objc_zombie.mm ('k') | ui/events/cocoa/events_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cocoa/cocoa_base_utils_unittest.mm
diff --git a/ui/base/cocoa/cocoa_base_utils_unittest.mm b/ui/base/cocoa/cocoa_base_utils_unittest.mm
index 5749e2d176c9518e542a6a8d2e340b260ed08d2d..f379120e2bfb782a213b45f941d23d8be272dd03 100644
--- a/ui/base/cocoa/cocoa_base_utils_unittest.mm
+++ b/ui/base/cocoa/cocoa_base_utils_unittest.mm
@@ -6,6 +6,7 @@
#import <objc/objc-class.h>
+#import "base/mac/scoped_objc_class_swizzler.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
#include "ui/events/event_constants.h"
@@ -39,8 +40,8 @@ TEST_F(CocoaBaseUtilsTest, WindowOpenDispositionFromNSEvent) {
// Shift+Middle Click = new foreground tab.
{
- ScopedClassSwizzler swizzler([NSEvent class], [TestEvent class],
- @selector(modifierFlags));
+ base::mac::ScopedObjCClassSwizzler swizzler(
+ [NSEvent class], [TestEvent class], @selector(modifierFlags));
me = cocoa_test_event_utils::MouseEventWithType(NSOtherMouseUp,
NSShiftKeyMask);
EXPECT_EQ(NEW_FOREGROUND_TAB, WindowOpenDispositionFromNSEvent(me));
« no previous file with comments | « chrome/common/mac/objc_zombie.mm ('k') | ui/events/cocoa/events_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698