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

Side by Side Diff: cc/surfaces/surface_display_output_surface_unittest.cc

Issue 1178423008: Provision to start base::SimpleTestTickClock at initial ticks Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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 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 "cc/surfaces/surface_display_output_surface.h" 5 #include "cc/surfaces/surface_display_output_surface.h"
6 6
7 #include "cc/surfaces/onscreen_display_client.h" 7 #include "cc/surfaces/onscreen_display_client.h"
8 #include "cc/surfaces/surface_id_allocator.h" 8 #include "cc/surfaces/surface_id_allocator.h"
9 #include "cc/surfaces/surface_manager.h" 9 #include "cc/surfaces/surface_manager.h"
10 #include "cc/test/fake_output_surface.h" 10 #include "cc/test/fake_output_surface.h"
(...skipping 30 matching lines...) Expand all
41 41
42 FakeOutputSurface* output_surface() { return fake_output_surface_; } 42 FakeOutputSurface* output_surface() { return fake_output_surface_; }
43 43
44 protected: 44 protected:
45 FakeOutputSurface* fake_output_surface_; 45 FakeOutputSurface* fake_output_surface_;
46 }; 46 };
47 47
48 class SurfaceDisplayOutputSurfaceTest : public testing::Test { 48 class SurfaceDisplayOutputSurfaceTest : public testing::Test {
49 public: 49 public:
50 SurfaceDisplayOutputSurfaceTest() 50 SurfaceDisplayOutputSurfaceTest()
51 : now_src_(new base::SimpleTestTickClock()), 51 : now_src_(new base::SimpleTestTickClock(base::TimeTicks())),
52 task_runner_(new OrderedSimpleTaskRunner(now_src_.get(), true)), 52 task_runner_(new OrderedSimpleTaskRunner(now_src_.get(), true)),
53 allocator_(0), 53 allocator_(0),
54 display_size_(1920, 1080), 54 display_size_(1920, 1080),
55 display_rect_(display_size_), 55 display_rect_(display_size_),
56 display_client_(&surface_manager_, 56 display_client_(&surface_manager_,
57 &bitmap_manager_, 57 &bitmap_manager_,
58 &gpu_memory_buffer_manager_, 58 &gpu_memory_buffer_manager_,
59 renderer_settings_, 59 renderer_settings_,
60 task_runner_), 60 task_runner_),
61 context_provider_(TestContextProvider::Create()), 61 context_provider_(TestContextProvider::Create()),
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 EXPECT_EQ(1u, output_surface_->num_sent_frames()); 157 EXPECT_EQ(1u, output_surface_->num_sent_frames());
158 158
159 SwapBuffersWithDamage(gfx::Rect()); 159 SwapBuffersWithDamage(gfx::Rect());
160 EXPECT_EQ(1u, output_surface_->num_sent_frames()); 160 EXPECT_EQ(1u, output_surface_->num_sent_frames());
161 task_runner_->RunUntilIdle(); 161 task_runner_->RunUntilIdle();
162 EXPECT_EQ(1u, output_surface_->num_sent_frames()); 162 EXPECT_EQ(1u, output_surface_->num_sent_frames());
163 } 163 }
164 164
165 } // namespace 165 } // namespace
166 } // namespace cc 166 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/display_scheduler_unittest.cc ('k') | cc/test/ordered_simple_task_runner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698