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

Side by Side Diff: components/scheduler/child/webthread_impl_for_worker_scheduler_unittest.cc

Issue 1361223003: Enforce marking "override" for functions overriding Blink in components/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 "components/scheduler/child/webthread_impl_for_worker_scheduler.h" 5 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h"
6 6
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "components/scheduler/child/web_scheduler_impl.h" 8 #include "components/scheduler/child/web_scheduler_impl.h"
9 #include "components/scheduler/child/worker_scheduler_impl.h" 9 #include "components/scheduler/child/worker_scheduler_impl.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "third_party/WebKit/public/platform/WebTraceLocation.h" 12 #include "third_party/WebKit/public/platform/WebTraceLocation.h"
13 13
14 using testing::_; 14 using testing::_;
15 using testing::AnyOf; 15 using testing::AnyOf;
16 using testing::ElementsAre; 16 using testing::ElementsAre;
17 using testing::Invoke; 17 using testing::Invoke;
18 18
19 namespace scheduler { 19 namespace scheduler {
20 namespace { 20 namespace {
21 21
22 class NopTask : public blink::WebTaskRunner::Task { 22 class NopTask : public blink::WebTaskRunner::Task {
23 public: 23 public:
24 ~NopTask() override {} 24 ~NopTask() override {}
25 25
26 void run() {} 26 void run() override {}
27 }; 27 };
28 28
29 class MockTask : public blink::WebTaskRunner::Task { 29 class MockTask : public blink::WebTaskRunner::Task {
30 public: 30 public:
31 ~MockTask() override {} 31 ~MockTask() override {}
32 32
33 MOCK_METHOD0(run, void()); 33 MOCK_METHOD0(run, void());
34 }; 34 };
35 35
36 class MockIdleTask : public blink::WebThread::IdleTask { 36 class MockIdleTask : public blink::WebThread::IdleTask {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 EXPECT_CALL(*delayed_task, run()).Times(0); 184 EXPECT_CALL(*delayed_task, run()).Times(0);
185 185
186 RunOnWorkerThread(FROM_HERE, base::Bind(&shutdownOnThread, thread_.get())); 186 RunOnWorkerThread(FROM_HERE, base::Bind(&shutdownOnThread, thread_.get()));
187 thread_->taskRunner()->postTask(blink::WebTraceLocation(), task.release()); 187 thread_->taskRunner()->postTask(blink::WebTraceLocation(), task.release());
188 thread_->taskRunner()->postDelayedTask(blink::WebTraceLocation(), 188 thread_->taskRunner()->postDelayedTask(blink::WebTraceLocation(),
189 task.release(), 50ll); 189 task.release(), 50ll);
190 thread_.reset(); 190 thread_.reset();
191 } 191 }
192 192
193 } // namespace scheduler 193 } // namespace scheduler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698