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

Unified Diff: ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm

Issue 2912373002: [iOS] Stop swizzling the |init| method of CameraController. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm
diff --git a/ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm b/ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm
index 31aabe36b105c3c4bc0d41e5ab13b76fb8ad48ff..e656803c2828ff8200802b8503dd149912c09f07 100644
--- a/ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm
+++ b/ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm
@@ -396,13 +396,11 @@ - (NSString*)dialogTitleForState:(CameraState)state {
- (void)swizzleCameraController:(id)cameraControllerMock {
CameraController* (^swizzleCameraControllerBlock)(
id<CameraControllerDelegate>) = ^(id<CameraControllerDelegate> delegate) {
- // |initWithDelegate:| must return an object with a return count of 1
- // because it is preceded by a call to |alloc|.
- return [cameraControllerMock retain];
+ return cameraControllerMock;
};
camera_controller_swizzler_.reset(new ScopedBlockSwizzler(
- [CameraController class], @selector(initWithDelegate:),
+ [CameraController class], @selector(cameraControllerWithDelegate:),
swizzleCameraControllerBlock));
}
« no previous file with comments | « ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698