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

Side by Side Diff: content/test/content_test_suite.cc

Issue 1208603002: content: implement unittests backend for Ozone GBM Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Mac bots Created 4 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
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 "content/test/content_test_suite.h" 5 #include "content/test/content_test_suite.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/message_loop/message_loop.h"
11 #include "build/build_config.h" 12 #include "build/build_config.h"
12 #include "content/public/common/content_client.h" 13 #include "content/public/common/content_client.h"
13 #include "content/public/common/content_paths.h" 14 #include "content/public/common/content_paths.h"
14 #include "content/public/test/test_content_client_initializer.h" 15 #include "content/public/test/test_content_client_initializer.h"
15 #include "gpu/config/gpu_util.h" 16 #include "gpu/config/gpu_util.h"
16 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
17 18
18 #if defined(OS_WIN) 19 #if defined(OS_WIN)
19 #include "ui/gfx/win/dpi.h" 20 #include "ui/gfx/win/dpi.h"
20 #endif 21 #endif
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 #if defined(OS_MACOSX) 79 #if defined(OS_MACOSX)
79 base::mac::ScopedNSAutoreleasePool autorelease_pool; 80 base::mac::ScopedNSAutoreleasePool autorelease_pool;
80 #if !defined(OS_IOS) 81 #if !defined(OS_IOS)
81 mock_cr_app::RegisterMockCrApp(); 82 mock_cr_app::RegisterMockCrApp();
82 #endif 83 #endif
83 #endif 84 #endif
84 85
85 #if defined(OS_WIN) 86 #if defined(OS_WIN)
86 gfx::SetDefaultDeviceScaleFactor(1.0f); 87 gfx::SetDefaultDeviceScaleFactor(1.0f);
87 #endif 88 #endif
89 #if defined(USE_OZONE)
90 // Ozone backend needs MessageLoopForUI.
91 scoped_ptr<base::MessageLoop> message_loop;
92 if (!base::MessageLoop::current())
reveman 2016/01/11 19:13:51 is this conditional needed?
dshwang 2016/01/11 20:17:45 content_gl_tests calls it after creating MessageLo
93 message_loop.reset(new base::MessageLoopForUI);
94 ozone_ = ui::OzoneInitializerForTest::Create();
95 DCHECK(ozone_);
96 #endif
88 97
89 ContentTestSuiteBase::Initialize(); 98 ContentTestSuiteBase::Initialize();
90 { 99 {
91 ContentClient client; 100 ContentClient client;
92 ContentTestSuiteBase::RegisterContentSchemes(&client); 101 ContentTestSuiteBase::RegisterContentSchemes(&client);
93 } 102 }
94 RegisterPathProvider(); 103 RegisterPathProvider();
95 #if !defined(OS_IOS) 104 #if !defined(OS_IOS)
96 media::InitializeMediaLibrary(); 105 media::InitializeMediaLibrary();
97 // When running in a child process for Mac sandbox tests, the sandbox exists 106 // When running in a child process for Mac sandbox tests, the sandbox exists
(...skipping 17 matching lines...) Expand all
115 client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create(); 124 client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create();
116 ui::ClientNativePixmapFactory::SetInstance( 125 ui::ClientNativePixmapFactory::SetInstance(
117 client_native_pixmap_factory_.get()); 126 client_native_pixmap_factory_.get());
118 ui::ClientNativePixmapFactory::GetInstance()->Initialize( 127 ui::ClientNativePixmapFactory::GetInstance()->Initialize(
119 ui::OzonePlatform::GetInstance()->OpenClientNativePixmapDevice()); 128 ui::OzonePlatform::GetInstance()->OpenClientNativePixmapDevice());
120 } 129 }
121 #endif 130 #endif
122 } 131 }
123 132
124 } // namespace content 133 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698