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

Side by Side Diff: ui/views/views_test_suite.cc

Issue 2498053004: Add InProcessContextProvider and update InProcessCommandBuffer (Closed)
Patch Set: Revert experiments and fix android_webview Created 4 years, 1 month 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 | « ui/views/DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 "ui/views/views_test_suite.h" 5 #include "ui/views/views_test_suite.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/test/launcher/unit_test_launcher.h" 11 #include "base/test/launcher/unit_test_launcher.h"
12 #include "base/test/test_suite.h" 12 #include "base/test/test_suite.h"
13 #include "gpu/ipc/service/image_transport_surface.h"
13 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
14 #include "ui/base/resource/resource_bundle.h" 15 #include "ui/base/resource/resource_bundle.h"
15 #include "ui/base/ui_base_paths.h" 16 #include "ui/base/ui_base_paths.h"
16 #include "ui/gl/test/gl_surface_test_support.h" 17 #include "ui/gl/test/gl_surface_test_support.h"
17 18
18 #if defined(USE_AURA) 19 #if defined(USE_AURA)
19 #include <memory> 20 #include <memory>
20 21
21 #include "ui/aura/env.h" 22 #include "ui/aura/env.h"
22 #endif 23 #endif
(...skipping 11 matching lines...) Expand all
34 } 35 }
35 36
36 int ViewsTestSuite::RunTestsSerially() { 37 int ViewsTestSuite::RunTestsSerially() {
37 return base::LaunchUnitTestsSerially( 38 return base::LaunchUnitTestsSerially(
38 argc_, argv_, base::Bind(&ViewsTestSuite::Run, base::Unretained(this))); 39 argc_, argv_, base::Bind(&ViewsTestSuite::Run, base::Unretained(this)));
39 } 40 }
40 41
41 void ViewsTestSuite::Initialize() { 42 void ViewsTestSuite::Initialize() {
42 base::TestSuite::Initialize(); 43 base::TestSuite::Initialize();
43 gl::GLSurfaceTestSupport::InitializeOneOff(); 44 gl::GLSurfaceTestSupport::InitializeOneOff();
45
46 #if defined(OS_MACOSX)
47 gpu::ImageTransportSurface::SetAllowOSMesaForTesting(true);
48 #endif
49
44 ui::RegisterPathProvider(); 50 ui::RegisterPathProvider();
45 51
46 base::FilePath ui_test_pak_path; 52 base::FilePath ui_test_pak_path;
47 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); 53 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
48 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); 54 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
49 #if defined(USE_AURA) 55 #if defined(USE_AURA)
50 env_ = aura::Env::CreateInstance(); 56 env_ = aura::Env::CreateInstance();
51 #endif 57 #endif
52 } 58 }
53 59
54 void ViewsTestSuite::Shutdown() { 60 void ViewsTestSuite::Shutdown() {
55 #if defined(USE_AURA) 61 #if defined(USE_AURA)
56 env_.reset(); 62 env_.reset();
57 #endif 63 #endif
58 ui::ResourceBundle::CleanupSharedInstance(); 64 ui::ResourceBundle::CleanupSharedInstance();
59 base::TestSuite::Shutdown(); 65 base::TestSuite::Shutdown();
60 } 66 }
61 67
62 } // namespace views 68 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698