OLD | NEW |
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 #include "content/test/content_test_suite.h" | 5 #include "content/test/content_test_suite.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "content/public/common/content_client.h" | 9 #include "content/public/common/content_client.h" |
10 #include "content/public/common/content_paths.h" | 10 #include "content/public/common/content_paths.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "ui/gl/gl_surface.h" | 27 #include "ui/gl/gl_surface.h" |
28 #endif | 28 #endif |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 class TestInitializationListener : public testing::EmptyTestEventListener { | 32 class TestInitializationListener : public testing::EmptyTestEventListener { |
33 public: | 33 public: |
34 TestInitializationListener() : test_content_client_initializer_(NULL) { | 34 TestInitializationListener() : test_content_client_initializer_(NULL) { |
35 } | 35 } |
36 | 36 |
37 virtual void OnTestStart(const testing::TestInfo& test_info) OVERRIDE { | 37 virtual void OnTestStart(const testing::TestInfo& test_info) override { |
38 test_content_client_initializer_ = | 38 test_content_client_initializer_ = |
39 new content::TestContentClientInitializer(); | 39 new content::TestContentClientInitializer(); |
40 } | 40 } |
41 | 41 |
42 virtual void OnTestEnd(const testing::TestInfo& test_info) OVERRIDE { | 42 virtual void OnTestEnd(const testing::TestInfo& test_info) override { |
43 delete test_content_client_initializer_; | 43 delete test_content_client_initializer_; |
44 } | 44 } |
45 | 45 |
46 private: | 46 private: |
47 content::TestContentClientInitializer* test_content_client_initializer_; | 47 content::TestContentClientInitializer* test_content_client_initializer_; |
48 | 48 |
49 DISALLOW_COPY_AND_ASSIGN(TestInitializationListener); | 49 DISALLOW_COPY_AND_ASSIGN(TestInitializationListener); |
50 }; | 50 }; |
51 | 51 |
52 } // namespace | 52 } // namespace |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 gfx::GLSurface::InitializeOneOffForTests(); | 84 gfx::GLSurface::InitializeOneOffForTests(); |
85 gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess()); | 85 gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess()); |
86 } | 86 } |
87 #endif | 87 #endif |
88 testing::TestEventListeners& listeners = | 88 testing::TestEventListeners& listeners = |
89 testing::UnitTest::GetInstance()->listeners(); | 89 testing::UnitTest::GetInstance()->listeners(); |
90 listeners.Append(new TestInitializationListener); | 90 listeners.Append(new TestInitializationListener); |
91 } | 91 } |
92 | 92 |
93 } // namespace content | 93 } // namespace content |
OLD | NEW |