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

Side by Side Diff: Source/platform/scheduler/SchedulerTest.cpp

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/scheduler/Scheduler.cpp ('k') | Source/platform/scroll/FramelessScrollView.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "config.h" 5 #include "config.h"
6 #include "platform/scheduler/Scheduler.h" 6 #include "platform/scheduler/Scheduler.h"
7 7
8 #include "platform/TestingPlatformSupport.h" 8 #include "platform/TestingPlatformSupport.h"
9 #include "public/platform/Platform.h" 9 #include "public/platform/Platform.h"
10 #include "public/platform/WebThread.h" 10 #include "public/platform/WebThread.h"
11 11
12 #include <gtest/gtest.h> 12 #include <gtest/gtest.h>
13 13
14 using WebCore::Scheduler; 14 using blink::Scheduler;
15 15
16 namespace { 16 namespace {
17 17
18 class TestMainThread : public blink::WebThread { 18 class TestMainThread : public blink::WebThread {
19 public: 19 public:
20 // blink::WebThread implementation. 20 // blink::WebThread implementation.
21 virtual void postTask(Task* task) OVERRIDE 21 virtual void postTask(Task* task) OVERRIDE
22 { 22 {
23 m_pendingTasks.append(adoptPtr(task)); 23 m_pendingTasks.append(adoptPtr(task));
24 } 24 }
(...skipping 21 matching lines...) Expand all
46 void runPendingTasks() 46 void runPendingTasks()
47 { 47 {
48 while (!m_pendingTasks.isEmpty()) 48 while (!m_pendingTasks.isEmpty())
49 m_pendingTasks.takeFirst()->run(); 49 m_pendingTasks.takeFirst()->run();
50 } 50 }
51 51
52 private: 52 private:
53 WTF::Deque<OwnPtr<Task> > m_pendingTasks; 53 WTF::Deque<OwnPtr<Task> > m_pendingTasks;
54 }; 54 };
55 55
56 class SchedulerTestingPlatformSupport : WebCore::TestingPlatformSupport { 56 class SchedulerTestingPlatformSupport : blink::TestingPlatformSupport {
57 public: 57 public:
58 SchedulerTestingPlatformSupport() 58 SchedulerTestingPlatformSupport()
59 : TestingPlatformSupport(TestingPlatformSupport::Config()) 59 : TestingPlatformSupport(TestingPlatformSupport::Config())
60 , m_sharedTimerFunction(nullptr) 60 , m_sharedTimerFunction(nullptr)
61 , m_sharedTimerRunning(false) 61 , m_sharedTimerRunning(false)
62 , m_sharedTimerFireInterval(0) 62 , m_sharedTimerFireInterval(0)
63 { 63 {
64 } 64 }
65 65
66 // blink::Platform implementation. 66 // blink::Platform implementation.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 EXPECT_EQ(1, s_sharedTimerTickCount); 185 EXPECT_EQ(1, s_sharedTimerTickCount);
186 186
187 m_scheduler->stopSharedTimer(); 187 m_scheduler->stopSharedTimer();
188 EXPECT_FALSE(m_platformSupport.sharedTimerRunning()); 188 EXPECT_FALSE(m_platformSupport.sharedTimerRunning());
189 189
190 m_scheduler->setSharedTimerFiredFunction(nullptr); 190 m_scheduler->setSharedTimerFiredFunction(nullptr);
191 EXPECT_FALSE(m_platformSupport.sharedTimerRunning()); 191 EXPECT_FALSE(m_platformSupport.sharedTimerRunning());
192 } 192 }
193 193
194 } // namespace 194 } // namespace
OLDNEW
« no previous file with comments | « Source/platform/scheduler/Scheduler.cpp ('k') | Source/platform/scroll/FramelessScrollView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698