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

Side by Side Diff: mash/test/mash_test_suite.cc

Issue 2690113010: Abstract OSMesa from the Layout tests (Closed)
Patch Set: Renamed "Renderer" to "GL" Created 3 years, 10 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 | « gpu/ipc/service/gpu_init.cc ('k') | services/ui/ws/window_server_service_test_base.cc » ('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 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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 }; 56 };
57 57
58 MashTestSuite::MashTestSuite(int argc, char** argv) : TestSuite(argc, argv) {} 58 MashTestSuite::MashTestSuite(int argc, char** argv) : TestSuite(argc, argv) {}
59 59
60 MashTestSuite::~MashTestSuite() {} 60 MashTestSuite::~MashTestSuite() {}
61 61
62 void MashTestSuite::Initialize() { 62 void MashTestSuite::Initialize() {
63 base::TestSuite::Initialize(); 63 base::TestSuite::Initialize();
64 64
65 base::CommandLine::ForCurrentProcess()->AppendSwitch( 65 base::CommandLine::ForCurrentProcess()->AppendSwitch(
66 switches::kOverrideUseGLWithOSMesaForTests); 66 switches::kOverrideUseSoftwareGLForTests);
67 67
68 // Load ash mus strings and resources; not 'common' (Chrome) resources. 68 // Load ash mus strings and resources; not 'common' (Chrome) resources.
69 base::FilePath resources; 69 base::FilePath resources;
70 PathService::Get(base::DIR_MODULE, &resources); 70 PathService::Get(base::DIR_MODULE, &resources);
71 resources = resources.Append(FILE_PATH_LITERAL("ash_mus_resources.pak")); 71 resources = resources.Append(FILE_PATH_LITERAL("ash_mus_resources.pak"));
72 ui::ResourceBundle::InitSharedInstanceWithPakPath(resources); 72 ui::ResourceBundle::InitSharedInstanceWithPakPath(resources);
73 73
74 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); 74 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_);
75 env_ = aura::Env::CreateInstance(aura::Env::Mode::MUS); 75 env_ = aura::Env::CreateInstance(aura::Env::Mode::MUS);
76 76
77 compositor_context_factory_ = base::MakeUnique<TestContextFactory>(); 77 compositor_context_factory_ = base::MakeUnique<TestContextFactory>();
78 env_->set_context_factory(compositor_context_factory_.get()); 78 env_->set_context_factory(compositor_context_factory_.get());
79 } 79 }
80 80
81 void MashTestSuite::Shutdown() { 81 void MashTestSuite::Shutdown() {
82 env_.reset(); 82 env_.reset();
83 ui::ResourceBundle::CleanupSharedInstance(); 83 ui::ResourceBundle::CleanupSharedInstance();
84 base::TestSuite::Shutdown(); 84 base::TestSuite::Shutdown();
85 } 85 }
86 86
87 } // namespace test 87 } // namespace test
88 } // namespace mash 88 } // namespace mash
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_init.cc ('k') | services/ui/ws/window_server_service_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698