Index: cc/timer_unittest.cc |
diff --git a/cc/timer_unittest.cc b/cc/timer_unittest.cc |
deleted file mode 100644 |
index 9a540c1a1a453b8410a926a2426179b9d4f878d0..0000000000000000000000000000000000000000 |
--- a/cc/timer_unittest.cc |
+++ /dev/null |
@@ -1,63 +0,0 @@ |
-// Copyright 2011 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#include "config.h" |
- |
-#include "cc/timer.h" |
- |
-#include "cc/test/scheduler_test_common.h" |
-#include "testing/gtest/include/gtest/gtest.h" |
- |
-using namespace cc; |
-using namespace WebKitTests; |
- |
-namespace { |
- |
-class TimerTest : public testing::Test, public TimerClient { |
-public: |
- TimerTest() : m_flag(false) { } |
- |
- void onTimerFired() { m_flag = true; } |
- |
-protected: |
- FakeThread m_thread; |
- bool m_flag; |
-}; |
- |
-TEST_F(TimerTest, OneShot) |
-{ |
- Timer timer(&m_thread, this); |
- timer.startOneShot(0.001); |
- EXPECT_TRUE(timer.isActive()); |
- m_thread.runPendingTask(); |
- EXPECT_FALSE(timer.isActive()); |
- EXPECT_TRUE(m_flag); |
- EXPECT_FALSE(m_thread.hasPendingTask()); |
-} |
- |
-TEST_F(TimerTest, StopManually) |
-{ |
- Timer timer(&m_thread, this); |
- timer.startOneShot(0.001); |
- EXPECT_TRUE(timer.isActive()); |
- timer.stop(); |
- EXPECT_FALSE(timer.isActive()); |
- |
- m_thread.runPendingTask(); |
- EXPECT_FALSE(m_flag); |
- EXPECT_FALSE(m_thread.hasPendingTask()); |
-} |
- |
-TEST_F(TimerTest, StopByScope) |
-{ |
- { |
- Timer timer(&m_thread, this); |
- timer.startOneShot(0.001); |
- } |
- |
- m_thread.runPendingTask(); |
- EXPECT_FALSE(m_flag); |
-} |
- |
-} |