| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "mash/test/mash_test_suite.h" | 5 #include "mash/test/mash_test_suite.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "ui/aura/env.h" | 9 #include "ui/aura/env.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); | 31 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); |
| 32 env_ = aura::Env::CreateInstance(); | 32 env_ = aura::Env::CreateInstance(); |
| 33 gl::GLSurfaceTestSupport::InitializeOneOff(); | 33 gl::GLSurfaceTestSupport::InitializeOneOff(); |
| 34 const bool enable_pixel_output = false; | 34 const bool enable_pixel_output = false; |
| 35 env_->set_context_factory( | 35 env_->set_context_factory( |
| 36 ui::InitializeContextFactoryForTests(enable_pixel_output)); | 36 ui::InitializeContextFactoryForTests(enable_pixel_output)); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void MashTestSuite::Shutdown() { | 39 void MashTestSuite::Shutdown() { |
| 40 ui::TerminateContextFactoryForTests(); |
| 40 env_.reset(); | 41 env_.reset(); |
| 41 ui::ResourceBundle::CleanupSharedInstance(); | 42 ui::ResourceBundle::CleanupSharedInstance(); |
| 42 base::TestSuite::Shutdown(); | 43 base::TestSuite::Shutdown(); |
| 43 } | 44 } |
| 44 | 45 |
| 45 } // namespace test | 46 } // namespace test |
| 46 } // namespace mash | 47 } // namespace mash |
| OLD | NEW |