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

Side by Side Diff: content/browser/compositor/reflector_impl_unittest.cc

Issue 2688593002: WIP: Towards merging OffscreenCanvas and Mus code
Patch Set: Fix reflector unit test Created 3 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/memory/ptr_util.h" 5 #include "base/memory/ptr_util.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "cc/output/output_surface_frame.h" 9 #include "cc/output/output_surface_frame.h"
10 #include "cc/scheduler/begin_frame_source.h" 10 #include "cc/scheduler/begin_frame_source.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 class ReflectorImplTest : public testing::Test { 123 class ReflectorImplTest : public testing::Test {
124 public: 124 public:
125 void SetUp() override { 125 void SetUp() override {
126 bool enable_pixel_output = false; 126 bool enable_pixel_output = false;
127 ui::ContextFactory* context_factory = nullptr; 127 ui::ContextFactory* context_factory = nullptr;
128 ui::ContextFactoryPrivate* context_factory_private = nullptr; 128 ui::ContextFactoryPrivate* context_factory_private = nullptr;
129 129
130 ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, 130 ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory,
131 &context_factory_private); 131 &context_factory_private);
132 message_loop_.reset(new base::MessageLoop());
132 ImageTransportFactory::InitializeForUnitTests( 133 ImageTransportFactory::InitializeForUnitTests(
133 std::unique_ptr<ImageTransportFactory>( 134 std::unique_ptr<ImageTransportFactory>(
134 new NoTransportImageTransportFactory)); 135 new NoTransportImageTransportFactory));
135 message_loop_.reset(new base::MessageLoop());
136 task_runner_ = message_loop_->task_runner(); 136 task_runner_ = message_loop_->task_runner();
137 compositor_task_runner_ = new FakeTaskRunner(); 137 compositor_task_runner_ = new FakeTaskRunner();
138 begin_frame_source_.reset(new cc::DelayBasedBeginFrameSource( 138 begin_frame_source_.reset(new cc::DelayBasedBeginFrameSource(
139 base::MakeUnique<cc::DelayBasedTimeSource>( 139 base::MakeUnique<cc::DelayBasedTimeSource>(
140 compositor_task_runner_.get()))); 140 compositor_task_runner_.get())));
141 compositor_.reset(new ui::Compositor( 141 compositor_.reset(new ui::Compositor(
142 context_factory_private->AllocateFrameSinkId(), context_factory, 142 context_factory_private->AllocateFrameSinkId(), context_factory,
143 context_factory_private, compositor_task_runner_.get())); 143 context_factory_private, compositor_task_runner_.get()));
144 compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); 144 compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget);
145 145
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 plane_2.plane_z_order = 1; 231 plane_2.plane_z_order = 1;
232 list.push_back(plane_1); 232 list.push_back(plane_1);
233 list.push_back(plane_2); 233 list.push_back(plane_2);
234 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); 234 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list);
235 EXPECT_FALSE(list[0].overlay_handled); 235 EXPECT_FALSE(list[0].overlay_handled);
236 } 236 }
237 #endif // defined(USE_OZONE) 237 #endif // defined(USE_OZONE)
238 238
239 } // namespace 239 } // namespace
240 } // namespace content 240 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698