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

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

Issue 1874903002: Convert //content from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indent Created 4 years, 8 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/public/test/test_web_ui.h ('k') | content/public/utility/content_utility_client.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) 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 <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "build/build_config.h" 11 #include "build/build_config.h"
11 12
12 namespace base { 13 namespace base {
13 class TestSuite; 14 class TestSuite;
14 } 15 }
15 16
16 namespace content { 17 namespace content {
17 class TestBlinkWebUnitTestSupport; 18 class TestBlinkWebUnitTestSupport;
18 19
19 // A special test suite that also initializes WebKit once for all unittests. 20 // A special test suite that also initializes WebKit once for all unittests.
20 // This is useful for two reasons: 21 // This is useful for two reasons:
21 // 1. It allows the use of some primitive WebKit data types like WebString. 22 // 1. It allows the use of some primitive WebKit data types like WebString.
22 // 2. Individual unittests should not be initting WebKit on their own, initting 23 // 2. Individual unittests should not be initting WebKit on their own, initting
23 // it here ensures attempts to do so within an individual test will fail. 24 // it here ensures attempts to do so within an individual test will fail.
24 class UnitTestTestSuite { 25 class UnitTestTestSuite {
25 public: 26 public:
26 // Takes ownership of |test_suite|. 27 // Takes ownership of |test_suite|.
27 explicit UnitTestTestSuite(base::TestSuite* test_suite); 28 explicit UnitTestTestSuite(base::TestSuite* test_suite);
28 ~UnitTestTestSuite(); 29 ~UnitTestTestSuite();
29 30
30 int Run(); 31 int Run();
31 32
32 private: 33 private:
33 scoped_ptr<base::TestSuite> test_suite_; 34 std::unique_ptr<base::TestSuite> test_suite_;
34 35
35 scoped_ptr<TestBlinkWebUnitTestSupport> blink_test_support_; 36 std::unique_ptr<TestBlinkWebUnitTestSupport> blink_test_support_;
36 37
37 DISALLOW_COPY_AND_ASSIGN(UnitTestTestSuite); 38 DISALLOW_COPY_AND_ASSIGN(UnitTestTestSuite);
38 }; 39 };
39 40
40 } // namespace content 41 } // namespace content
41 42
42 #endif // CONTENT_PUBLIC_TEST_UNITTEST_TEST_SUITE_H_ 43 #endif // CONTENT_PUBLIC_TEST_UNITTEST_TEST_SUITE_H_
OLDNEW
« no previous file with comments | « content/public/test/test_web_ui.h ('k') | content/public/utility/content_utility_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698