OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "content/common/content_client.h" | 9 #include "content/common/content_client.h" |
| 10 #include "content/common/content_paths.h" |
10 #include "content/test/test_content_client.h" | 11 #include "content/test/test_content_client.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "ui/base/ui_base_paths.h" |
12 | 14 |
13 namespace { | 15 namespace { |
14 | 16 |
15 class TestContentClientInitializer : public testing::EmptyTestEventListener { | 17 class TestContentClientInitializer : public testing::EmptyTestEventListener { |
16 public: | 18 public: |
17 TestContentClientInitializer() { | 19 TestContentClientInitializer() { |
18 } | 20 } |
19 | 21 |
20 virtual void OnTestStart(const testing::TestInfo& test_info) OVERRIDE { | 22 virtual void OnTestStart(const testing::TestInfo& test_info) OVERRIDE { |
21 DCHECK(!content::GetContentClient()); | 23 DCHECK(!content::GetContentClient()); |
(...skipping 18 matching lines...) Expand all Loading... |
40 ContentTestSuite::ContentTestSuite(int argc, char** argv) | 42 ContentTestSuite::ContentTestSuite(int argc, char** argv) |
41 : base::TestSuite(argc, argv) { | 43 : base::TestSuite(argc, argv) { |
42 } | 44 } |
43 | 45 |
44 ContentTestSuite::~ContentTestSuite() { | 46 ContentTestSuite::~ContentTestSuite() { |
45 } | 47 } |
46 | 48 |
47 void ContentTestSuite::Initialize() { | 49 void ContentTestSuite::Initialize() { |
48 base::TestSuite::Initialize(); | 50 base::TestSuite::Initialize(); |
49 | 51 |
| 52 content::RegisterPathProvider(); |
| 53 ui::RegisterPathProvider(); |
| 54 |
50 testing::TestEventListeners& listeners = | 55 testing::TestEventListeners& listeners = |
51 testing::UnitTest::GetInstance()->listeners(); | 56 testing::UnitTest::GetInstance()->listeners(); |
52 listeners.Append(new TestContentClientInitializer); | 57 listeners.Append(new TestContentClientInitializer); |
53 } | 58 } |
OLD | NEW |