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

Side by Side Diff: ios/chrome/test/ocmock/scoped_mock_object.h

Issue 2608733002: Fix include/import in ios/testing and ios/chrome/test (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_CHROME_TEST_OCMOCK_SCOPED_MOCK_OBJECT_H_ 5 #ifndef IOS_CHROME_TEST_OCMOCK_SCOPED_MOCK_OBJECT_H_
6 #define IOS_CHROME_TEST_OCMOCK_SCOPED_MOCK_OBJECT_H_ 6 #define IOS_CHROME_TEST_OCMOCK_SCOPED_MOCK_OBJECT_H_
7 7
8 #include "base/mac/scoped_nsobject.h" 8 #import "base/mac/scoped_nsobject.h"
9 #import "third_party/ocmock/OCMock/OCMock.h" 9 #import "third_party/ocmock/OCMock/OCMock.h"
10 10
11 // Helper class that constructs an OCMock and manages ownership of it. 11 // Helper class that constructs an OCMock and manages ownership of it.
12 template <typename NST> 12 template <typename NST>
13 class ScopedMockObject : public base::scoped_nsobject<id> { 13 class ScopedMockObject : public base::scoped_nsobject<id> {
14 public: 14 public:
15 ScopedMockObject() 15 ScopedMockObject()
16 : base::scoped_nsobject<id>( 16 : base::scoped_nsobject<id>(
17 [[OCMockObject mockForClass:[NST class]] retain]) {} 17 [[OCMockObject mockForClass:[NST class]] retain]) {}
18 }; 18 };
19 19
20 #endif // IOS_CHROME_TEST_OCMOCK_SCOPED_MOCK_OBJECT_H_ 20 #endif // IOS_CHROME_TEST_OCMOCK_SCOPED_MOCK_OBJECT_H_
OLDNEW
« no previous file with comments | « ios/chrome/test/ios_chrome_unit_test_suite.mm ('k') | ios/chrome/test/ocmock/scoped_verifying_mock_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698