use imageInfo instead of (deprecated) getDevice and config()
[chromium-blink-merge.git] / ui / views / run_all_unittests.cc
blobe5d7b9d61f03cc4a0ba3525bc4368cef95d25152
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
3 // found in the LICENSE file.
5 #include "base/basictypes.h"
6 #include "base/bind.h"
7 #include "base/compiler_specific.h"
8 #include "base/path_service.h"
9 #include "base/test/launcher/unit_test_launcher.h"
10 #include "base/test/test_suite.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "ui/base/resource/resource_bundle.h"
13 #include "ui/base/ui_base_paths.h"
14 #include "ui/gl/gl_surface.h"
16 class ViewTestSuite : public base::TestSuite {
17 public:
18 ViewTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
20 protected:
21 virtual void Initialize() OVERRIDE {
22 base::TestSuite::Initialize();
23 gfx::GLSurface::InitializeOneOffForTests();
24 ui::RegisterPathProvider();
26 base::FilePath ui_test_pak_path;
27 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
28 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
31 virtual void Shutdown() OVERRIDE {
32 ui::ResourceBundle::CleanupSharedInstance();
33 base::TestSuite::Shutdown();
36 private:
37 DISALLOW_COPY_AND_ASSIGN(ViewTestSuite);
40 int main(int argc, char** argv) {
41 ViewTestSuite test_suite(argc, argv);
43 return base::LaunchUnitTests(
44 argc, argv, base::Bind(&ViewTestSuite::Run,
45 base::Unretained(&test_suite)));