Remove INJECT_EVENTS permissions from test APKs.
[chromium-blink-merge.git] / third_party / ocmock / ocmock_extensions.h
blobd817cbdd2409b670d68f45210482ba7b7653d5e8
1 // Copyright (c) 2011 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.
5 #ifndef THIRD_PARTY_OCMOCK_OCMOCK_EXTENSIONS_H_
6 #define THIRD_PARTY_OCMOCK_OCMOCK_EXTENSIONS_H_
8 #import <Foundation/Foundation.h>
10 #import "third_party/ocmock/OCMock/OCMock.h"
12 // Some enhancements to OCMock to make it easier to write mocks.
13 // Pointers to objects still have to be handled with
14 // - (id)andReturnValue:OCMOCK_VALUE(blah)
15 // to keep the types working correctly.
16 @interface OCMockRecorder(CrExtensions)
17 - (id)andReturnChar:(char)value;
18 - (id)andReturnUnsignedChar:(unsigned char)value;
19 - (id)andReturnShort:(short)value;
20 - (id)andReturnUnsignedShort:(unsigned short)value;
21 - (id)andReturnInt:(int)value;
22 - (id)andReturnUnsignedInt:(unsigned int)value;
23 - (id)andReturnLong:(long)value;
24 - (id)andReturnUnsignedLong:(unsigned long)value;
25 - (id)andReturnLongLong:(long long)value;
26 - (id)andReturnUnsignedLongLong:(unsigned long long)value;
27 - (id)andReturnFloat:(float)value;
28 - (id)andReturnDouble:(double)value;
29 - (id)andReturnBool:(BOOL)value;
30 - (id)andReturnInteger:(NSInteger)value;
31 - (id)andReturnUnsignedInteger:(NSUInteger)value;
32 #if !TARGET_OS_IPHONE
33 - (id)andReturnCGFloat:(CGFloat)value;
34 - (id)andReturnNSRect:(NSRect)rect;
35 - (id)andReturnCGRect:(CGRect)rect;
36 - (id)andReturnNSPoint:(NSPoint)point;
37 - (id)andReturnCGPoint:(CGPoint)point;
38 #endif
39 @end
41 // A constraint for verifying that something conforms to a protocol.
42 @interface cr_OCMConformToProtocolConstraint : OCMConstraint {
43 @private
44 Protocol* protocol_;
46 - (id)initWithProtocol:(Protocol*)protocol;
47 @end
49 @interface OCMArg(CrExtensions)
50 + (id)conformsToProtocol:(Protocol*)protocol;
51 @end
53 #endif // THIRD_PARTY_OCMOCK_OCMOCK_EXTENSIONS_H_