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

Unified Diff: mash/test/mash_test_suite.cc

Issue 1994763002: Wires up WorkspaceLayoutManager in mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: data deps Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mash/test/mash_test_suite.h ('k') | mash/test/mash_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/test/mash_test_suite.cc
diff --git a/mash/test/mash_test_suite.cc b/mash/test/mash_test_suite.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5bcb349bfcd64290a4a01d30b669640041b58ed0
--- /dev/null
+++ b/mash/test/mash_test_suite.cc
@@ -0,0 +1,51 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mash/test/mash_test_suite.h"
+
+#include "base/files/file_path.h"
+#include "base/path_service.h"
+#include "ui/aura/env.h"
+#include "ui/base/resource/resource_bundle.h"
+#include "ui/base/ui_base_paths.h"
+#include "ui/compositor/test/context_factories_for_test.h"
+#include "ui/gl/test/gl_surface_test_support.h"
+
+namespace mash {
+namespace test {
+
+MashTestSuite::MashTestSuite(int argc, char** argv) : TestSuite(argc, argv) {}
+
+MashTestSuite::~MashTestSuite() {}
+
+void MashTestSuite::Initialize() {
+ base::TestSuite::Initialize();
+ gfx::GLSurfaceTestSupport::InitializeOneOff();
+
+ // Load ash resources and en-US strings; not 'common' (Chrome) resources.
+ // TODO(msw): Check ResourceBundle::IsScaleFactorSupported; load 300% etc.
+ base::FilePath path;
+ PathService::Get(base::DIR_MODULE, &path);
+ base::FilePath mash_test_strings =
+ path.Append(FILE_PATH_LITERAL("mash_wm_resources.pak"));
+
+ ui::ResourceBundle::InitSharedInstanceWithPakPath(mash_test_strings);
+
+ base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_);
+ env_ = aura::Env::CreateInstance();
+
+ const bool enable_pixel_output = false;
+ env_->set_context_factory(
+ ui::InitializeContextFactoryForTests(enable_pixel_output));
+}
+
+void MashTestSuite::Shutdown() {
+ env_.reset();
+ ui::ResourceBundle::CleanupSharedInstance();
+ ui::TerminateContextFactoryForTests();
+ base::TestSuite::Shutdown();
+}
+
+} // namespace test
+} // namespace mash
« no previous file with comments | « mash/test/mash_test_suite.h ('k') | mash/test/mash_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698