| 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
|
|
|