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

Side by Side Diff: content/public/test/unittest_test_suite.h

Issue 1297173003: Revert of aura: Require explicit ownership of the Env instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « content/browser/browser_main_loop.cc ('k') | content/public/test/unittest_test_suite.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_TEST_UNITTEST_TEST_SUITE_H_ 5 #ifndef CONTENT_PUBLIC_TEST_UNITTEST_TEST_SUITE_H_
6 #define CONTENT_PUBLIC_TEST_UNITTEST_TEST_SUITE_H_ 6 #define CONTENT_PUBLIC_TEST_UNITTEST_TEST_SUITE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 10
11 #if defined(USE_AURA)
12 namespace aura {
13 class Env;
14 }
15 #endif
16
17 namespace base { 11 namespace base {
18 class TestSuite; 12 class TestSuite;
19 } 13 }
20 14
21 namespace content { 15 namespace content {
22 class TestBlinkWebUnitTestSupport; 16 class TestBlinkWebUnitTestSupport;
23 17
24 // A special test suite that also initializes WebKit once for all unittests. 18 // A special test suite that also initializes WebKit once for all unittests.
25 // This is useful for two reasons: 19 // This is useful for two reasons:
26 // 1. It allows the use of some primitive WebKit data types like WebString. 20 // 1. It allows the use of some primitive WebKit data types like WebString.
27 // 2. Individual unittests should not be initting WebKit on their own, initting 21 // 2. Individual unittests should not be initting WebKit on their own, initting
28 // it here ensures attempts to do so within an individual test will fail. 22 // it here ensures attempts to do so within an individual test will fail.
29 class UnitTestTestSuite { 23 class UnitTestTestSuite {
30 public: 24 public:
31 // Takes ownership of |test_suite|. 25 // Takes ownership of |test_suite|.
32 explicit UnitTestTestSuite(base::TestSuite* test_suite); 26 explicit UnitTestTestSuite(base::TestSuite* test_suite);
33 ~UnitTestTestSuite(); 27 ~UnitTestTestSuite();
34 28
35 int Run(); 29 int Run();
36 30
37 private: 31 private:
38 scoped_ptr<base::TestSuite> test_suite_; 32 scoped_ptr<base::TestSuite> test_suite_;
39 33
40 #if !defined(OS_IOS) 34 #if !defined(OS_IOS)
41 scoped_ptr<TestBlinkWebUnitTestSupport> blink_test_support_; 35 scoped_ptr<TestBlinkWebUnitTestSupport> blink_test_support_;
42 #endif 36 #endif
43 #if defined(USE_AURA)
44 scoped_ptr<aura::Env> env_;
45 #endif
46 37
47 DISALLOW_COPY_AND_ASSIGN(UnitTestTestSuite); 38 DISALLOW_COPY_AND_ASSIGN(UnitTestTestSuite);
48 }; 39 };
49 40
50 } // namespace content 41 } // namespace content
51 42
52 #endif // CONTENT_PUBLIC_TEST_UNITTEST_TEST_SUITE_H_ 43 #endif // CONTENT_PUBLIC_TEST_UNITTEST_TEST_SUITE_H_
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/public/test/unittest_test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698