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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/renderer/auto_advancing_virtual_time_domain_unittest.cc

Issue 2967013002: Be explicit about namespace testing to not mix it with blink::testing (Closed)
Patch Set: Dropped mojo parts that need another review. Created 3 years, 5 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "platform/scheduler/renderer/auto_advancing_virtual_time_domain.h" 5 #include "platform/scheduler/renderer/auto_advancing_virtual_time_domain.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/test/simple_test_tick_clock.h" 8 #include "base/test/simple_test_tick_clock.h"
9 #include "cc/test/ordered_simple_task_runner.h" 9 #include "cc/test/ordered_simple_task_runner.h"
10 #include "platform/scheduler/base/task_queue_manager.h" 10 #include "platform/scheduler/base/task_queue_manager.h"
11 #include "platform/scheduler/base/test_task_time_observer.h" 11 #include "platform/scheduler/base/test_task_time_observer.h"
12 #include "platform/scheduler/base/test_time_source.h" 12 #include "platform/scheduler/base/test_time_source.h"
13 #include "platform/scheduler/child/scheduler_tqm_delegate_for_test.h" 13 #include "platform/scheduler/child/scheduler_tqm_delegate_for_test.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 namespace blink { 17 namespace blink {
18 namespace scheduler { 18 namespace scheduler {
19 19
20 class AutoAdvancingVirtualTimeDomainTest : public testing::Test { 20 class AutoAdvancingVirtualTimeDomainTest : public ::testing::Test {
21 public: 21 public:
22 AutoAdvancingVirtualTimeDomainTest() {} 22 AutoAdvancingVirtualTimeDomainTest() {}
23 ~AutoAdvancingVirtualTimeDomainTest() override {} 23 ~AutoAdvancingVirtualTimeDomainTest() override {}
24 24
25 void SetUp() override { 25 void SetUp() override {
26 clock_.reset(new base::SimpleTestTickClock()); 26 clock_.reset(new base::SimpleTestTickClock());
27 clock_->Advance(base::TimeDelta::FromMicroseconds(5000)); 27 clock_->Advance(base::TimeDelta::FromMicroseconds(5000));
28 28
29 test_time_source_.reset(new TestTimeSource(clock_.get())); 29 test_time_source_.reset(new TestTimeSource(clock_.get()));
30 mock_task_runner_ = make_scoped_refptr( 30 mock_task_runner_ = make_scoped_refptr(
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 mock_task_runner_->RunUntilIdle(); 90 mock_task_runner_->RunUntilIdle();
91 91
92 EXPECT_EQ(initial_time_, clock_->NowTicks()); 92 EXPECT_EQ(initial_time_, clock_->NowTicks());
93 EXPECT_EQ(initial_time_, auto_advancing_time_domain_->CreateLazyNow().Now()); 93 EXPECT_EQ(initial_time_, auto_advancing_time_domain_->CreateLazyNow().Now());
94 EXPECT_FALSE(task_run); 94 EXPECT_FALSE(task_run);
95 } 95 }
96 96
97 } // namespace scheduler 97 } // namespace scheduler
98 } // namespace blink 98 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698