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

Side by Side Diff: chromecast/graphics/run_all_unittests.cc

Issue 2636303002: [Chromecast] Add support for z-order and window focus. (Closed)
Patch Set: more tests, and bug fix found by test Created 3 years, 11 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/bind.h"
6 #include "base/macros.h"
7 #include "base/path_service.h"
8 #include "base/test/launcher/unit_test_launcher.h"
9 #include "base/test/test_suite.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "ui/aura/env.h"
12 #include "ui/base/resource/resource_bundle.h"
13 #include "ui/base/ui_base_paths.h"
14 #include "ui/gl/test/gl_surface_test_support.h"
15
16 class ChromecastGraphicsTestSuite : public base::TestSuite {
17 public:
18 ChromecastGraphicsTestSuite(int argc, char** argv)
19 : base::TestSuite(argc, argv) {}
20
21 protected:
22 void Initialize() override {
23 base::TestSuite::Initialize();
24 gl::GLSurfaceTestSupport::InitializeOneOff();
25 ui::RegisterPathProvider();
26
27 base::FilePath ui_test_pak_path;
28 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
29 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
30
31 env_ = aura::Env::CreateInstance();
32 }
33
34 void Shutdown() override {
35 env_.reset();
36 ui::ResourceBundle::CleanupSharedInstance();
37 base::TestSuite::Shutdown();
38 }
39
40 private:
41 std::unique_ptr<aura::Env> env_;
42 DISALLOW_COPY_AND_ASSIGN(ChromecastGraphicsTestSuite);
43 };
44
45 int main(int argc, char** argv) {
46 ChromecastGraphicsTestSuite test_suite(argc, argv);
47
48 return base::LaunchUnitTests(argc, argv,
49 base::Bind(&ChromecastGraphicsTestSuite::Run,
50 base::Unretained(&test_suite)));
51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698