| 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/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/public/test/test_content_client_initializer.h" | 8 #include "content/public/test/test_content_client_initializer.h" |
| 9 #include "content/test/test_content_client.h" | 9 #include "content/test/test_content_client.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "ui/base/resource/resource_bundle.h" | |
| 12 | 11 |
| 13 #if defined(USE_AURA) | 12 #if defined(USE_AURA) |
| 14 #include "ui/aura/test/test_aura_initializer.h" | 13 #include "ui/aura/test/test_aura_initializer.h" |
| 15 #endif | 14 #endif |
| 16 | 15 |
| 17 #if defined(OS_MACOSX) | 16 #if defined(OS_MACOSX) |
| 18 #include "base/mac/scoped_nsautorelease_pool.h" | 17 #include "base/mac/scoped_nsautorelease_pool.h" |
| 19 #endif | 18 #endif |
| 20 | 19 |
| 21 namespace { | 20 namespace { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 ContentTestSuite::~ContentTestSuite() { | 53 ContentTestSuite::~ContentTestSuite() { |
| 55 } | 54 } |
| 56 | 55 |
| 57 void ContentTestSuite::Initialize() { | 56 void ContentTestSuite::Initialize() { |
| 58 #if defined(OS_MACOSX) | 57 #if defined(OS_MACOSX) |
| 59 base::mac::ScopedNSAutoreleasePool autorelease_pool; | 58 base::mac::ScopedNSAutoreleasePool autorelease_pool; |
| 60 #endif | 59 #endif |
| 61 | 60 |
| 62 ContentTestSuiteBase::Initialize(); | 61 ContentTestSuiteBase::Initialize(); |
| 63 | 62 |
| 64 // Force unittests to run using en-US so if we test against string | |
| 65 // output, it'll pass regardless of the system language. | |
| 66 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); | |
| 67 | |
| 68 testing::TestEventListeners& listeners = | 63 testing::TestEventListeners& listeners = |
| 69 testing::UnitTest::GetInstance()->listeners(); | 64 testing::UnitTest::GetInstance()->listeners(); |
| 70 listeners.Append(new TestInitializationListener); | 65 listeners.Append(new TestInitializationListener); |
| 71 } | 66 } |
| 72 | 67 |
| 73 ContentClient* ContentTestSuite::CreateClientForInitialization() { | 68 ContentClient* ContentTestSuite::CreateClientForInitialization() { |
| 74 return new TestContentClient(); | 69 return new TestContentClient(); |
| 75 } | 70 } |
| 76 | 71 |
| 77 } // namespace content | 72 } // namespace content |
| OLD | NEW |