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

Side by Side Diff: content/browser/renderer_host/begin_frame_observer_proxy_unittest.cc

Issue 1373033004: aura: Defer OutputSurface creation until widget is available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 <algorithm> 5 #include <algorithm>
6 #include <list> 6 #include <list>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 22 matching lines...) Expand all
33 BeginFrameObserverProxyTest() {} 33 BeginFrameObserverProxyTest() {}
34 ~BeginFrameObserverProxyTest() override {} 34 ~BeginFrameObserverProxyTest() override {}
35 35
36 void SetUp() override { 36 void SetUp() override {
37 bool enable_pixel_output = false; 37 bool enable_pixel_output = false;
38 ui::ContextFactory* context_factory = 38 ui::ContextFactory* context_factory =
39 ui::InitializeContextFactoryForTests(enable_pixel_output); 39 ui::InitializeContextFactoryForTests(enable_pixel_output);
40 compositor_task_runner_ = new base::TestSimpleTaskRunner(); 40 compositor_task_runner_ = new base::TestSimpleTaskRunner();
41 compositor_.reset( 41 compositor_.reset(
42 new ui::Compositor(context_factory, compositor_task_runner_)); 42 new ui::Compositor(context_factory, compositor_task_runner_));
43 compositor_->SetAcceleratedWidgetAndStartCompositor( 43 compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget);
44 gfx::kNullAcceleratedWidget);
45 } 44 }
46 45
47 void TearDown() override { 46 void TearDown() override {
48 compositor_.reset(); 47 compositor_.reset();
49 ui::TerminateContextFactoryForTests(); 48 ui::TerminateContextFactoryForTests();
50 } 49 }
51 50
52 ui::Compositor* compositor() { return compositor_.get(); } 51 ui::Compositor* compositor() { return compositor_.get(); }
53 52
54 private: 53 private:
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 begin_frame_observer.ResetCompositor(); 88 begin_frame_observer.ResetCompositor();
90 cc::BeginFrameArgs args3 = 89 cc::BeginFrameArgs args3 =
91 cc::CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, 90 cc::CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE,
92 base::TimeTicks::FromInternalValue(99)); 91 base::TimeTicks::FromInternalValue(99));
93 EXPECT_CALL(client, SendBeginFrame(_)).Times(0); 92 EXPECT_CALL(client, SendBeginFrame(_)).Times(0);
94 compositor()->SendBeginFramesToChildren(args3); 93 compositor()->SendBeginFramesToChildren(args3);
95 Mock::VerifyAndClearExpectations(&client); 94 Mock::VerifyAndClearExpectations(&client);
96 } 95 }
97 96
98 } // namespace content 97 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/software_output_device_ozone_unittest.cc ('k') | ui/aura/window_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698