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

Side by Side Diff: testing/platform_test.h

Issue 2739783002: MacViews/a11y: Typedef gfx::NativeViewAccessible to id for all of Mac & iOS. (Closed)
Patch Set: Review comments. Created 3 years, 9 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
« no previous file with comments | « no previous file | ui/gfx/native_widget_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 TESTING_PLATFORM_TEST_H_ 5 #ifndef TESTING_PLATFORM_TEST_H_
6 #define TESTING_PLATFORM_TEST_H_ 6 #define TESTING_PLATFORM_TEST_H_
7 7
8 #include <gtest/gtest.h> 8 #include <gtest/gtest.h>
9 9
10 #if defined(GTEST_OS_MAC) 10 #if defined(GTEST_OS_MAC)
11 #ifndef __OBJC__ 11 #include <objc/objc.h>
12 typedef void* id;
13 #endif
14 12
15 // The purpose of this class us to provide a hook for platform-specific 13 // The purpose of this class us to provide a hook for platform-specific
16 // operations across unit tests. For example, on the Mac, it creates and 14 // operations across unit tests. For example, on the Mac, it creates and
17 // releases an outer NSAutoreleasePool for each test case. For now, it's only 15 // releases an outer NSAutoreleasePool for each test case. For now, it's only
18 // implemented on the Mac. To enable this for another platform, just adjust 16 // implemented on the Mac. To enable this for another platform, just adjust
19 // the #ifdefs and add a platform_test_<platform>.cc implementation file. 17 // the #ifdefs and add a platform_test_<platform>.cc implementation file.
20 class PlatformTest : public testing::Test { 18 class PlatformTest : public testing::Test {
21 public: 19 public:
22 virtual ~PlatformTest(); 20 virtual ~PlatformTest();
23 21
24 protected: 22 protected:
25 PlatformTest(); 23 PlatformTest();
26 24
27 private: 25 private:
28 // |pool_| is a NSAutoreleasePool, but since this header may be imported from 26 // |pool_| is a NSAutoreleasePool, but since this header may be imported from
29 // files built with Objective-C ARC that forbids explicit usage of 27 // files built with Objective-C ARC that forbids explicit usage of
30 // NSAutoreleasePools, it is declared as id here. 28 // NSAutoreleasePools, it is declared as id here.
31 id pool_; 29 id pool_;
32 }; 30 };
33 #else 31 #else
34 typedef testing::Test PlatformTest; 32 typedef testing::Test PlatformTest;
35 #endif // GTEST_OS_MAC 33 #endif // GTEST_OS_MAC
36 34
37 #endif // TESTING_PLATFORM_TEST_H_ 35 #endif // TESTING_PLATFORM_TEST_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/native_widget_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698