OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/scheduler.h" | 5 #include "cc/scheduler.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "cc/test/scheduler_test_common.h" | 8 #include "cc/test/scheduler_test_common.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 using namespace WebKitTests; | |
13 | |
14 namespace cc { | 12 namespace cc { |
15 namespace { | 13 namespace { |
16 | 14 |
17 class FakeSchedulerClient : public SchedulerClient { | 15 class FakeSchedulerClient : public SchedulerClient { |
18 public: | 16 public: |
19 FakeSchedulerClient() { reset(); } | 17 FakeSchedulerClient() { reset(); } |
20 void reset() | 18 void reset() |
21 { | 19 { |
22 m_actions.clear(); | 20 m_actions.clear(); |
23 m_drawWillHappen = true; | 21 m_drawWillHappen = true; |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 scheduler->setNeedsRedraw(); | 458 scheduler->setNeedsRedraw(); |
461 scheduler->setNeedsForcedRedraw(); | 459 scheduler->setNeedsForcedRedraw(); |
462 EXPECT_TRUE(client.hasAction("scheduledActionDrawAndSwapForced")); | 460 EXPECT_TRUE(client.hasAction("scheduledActionDrawAndSwapForced")); |
463 | 461 |
464 // We should not have told the frame rate controller that we began a frame. | 462 // We should not have told the frame rate controller that we began a frame. |
465 EXPECT_EQ(0, controllerPtr->numFramesPending()); | 463 EXPECT_EQ(0, controllerPtr->numFramesPending()); |
466 } | 464 } |
467 | 465 |
468 } // namespace | 466 } // namespace |
469 } // namespace cc | 467 } // namespace cc |
OLD | NEW |