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

Unified Diff: ios/chrome/test/ocmock/OCMockObject+BreakpadControllerTesting.mm

Issue 2580333003: Upstream Chrome on iOS source code [10/11]. (Closed)
Patch Set: Created 4 years 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: ios/chrome/test/ocmock/OCMockObject+BreakpadControllerTesting.mm
diff --git a/ios/chrome/test/ocmock/OCMockObject+BreakpadControllerTesting.mm b/ios/chrome/test/ocmock/OCMockObject+BreakpadControllerTesting.mm
new file mode 100644
index 0000000000000000000000000000000000000000..df3cc83da374062d680eec1aa6f1088a22f5995f
--- /dev/null
+++ b/ios/chrome/test/ocmock/OCMockObject+BreakpadControllerTesting.mm
@@ -0,0 +1,28 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ios/chrome/test/ocmock/OCMockObject+BreakpadControllerTesting.h"
+
+#import "breakpad/src/client/ios/BreakpadController.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#import "third_party/ocmock/OCMock/OCMock.h"
+
+@implementation OCMockObject (BreakpadControllerTesting)
+
+- (void)cr_expectGetCrashReportCount:(int)crashReportCount {
+ id invocationBlock = ^(NSInvocation* invocation) {
+ void (^block)(int);
+ [invocation getArgument:&block atIndex:2];
+ if (!block) {
+ ADD_FAILURE();
+ return;
+ }
+ block(crashReportCount);
+ };
+ BreakpadController* breakpadController =
+ static_cast<BreakpadController*>([[self expect] andDo:invocationBlock]);
+ [breakpadController getCrashReportCount:[OCMArg isNotNil]];
+}
+
+@end

Powered by Google App Engine
This is Rietveld 408576698