OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "ios/chrome/test/ocmock/OCMockObject+BreakpadControllerTesting.h" |
| 6 |
| 7 #import "breakpad/src/client/ios/BreakpadController.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #import "third_party/ocmock/OCMock/OCMock.h" |
| 10 |
| 11 @implementation OCMockObject (BreakpadControllerTesting) |
| 12 |
| 13 - (void)cr_expectGetCrashReportCount:(int)crashReportCount { |
| 14 id invocationBlock = ^(NSInvocation* invocation) { |
| 15 void (^block)(int); |
| 16 [invocation getArgument:&block atIndex:2]; |
| 17 if (!block) { |
| 18 ADD_FAILURE(); |
| 19 return; |
| 20 } |
| 21 block(crashReportCount); |
| 22 }; |
| 23 BreakpadController* breakpadController = |
| 24 static_cast<BreakpadController*>([[self expect] andDo:invocationBlock]); |
| 25 [breakpadController getCrashReportCount:[OCMArg isNotNil]]; |
| 26 } |
| 27 |
| 28 @end |
OLD | NEW |