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

Side by Side Diff: base/mac/libdispatch_task_runner_unittest.cc

Issue 614103004: replace 'virtual ... OVERRIDE' with '... override' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: process base/ Created 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/mac/libdispatch_task_runner.h" 5 #include "base/mac/libdispatch_task_runner.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/mac/bind_objc_block.h" 8 #include "base/mac/bind_objc_block.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 class LibDispatchTaskRunnerTest : public testing::Test { 13 class LibDispatchTaskRunnerTest : public testing::Test {
14 public: 14 public:
15 virtual void SetUp() OVERRIDE { 15 void SetUp() override {
16 task_runner_ = new base::mac::LibDispatchTaskRunner( 16 task_runner_ = new base::mac::LibDispatchTaskRunner(
17 "org.chromium.LibDispatchTaskRunnerTest"); 17 "org.chromium.LibDispatchTaskRunnerTest");
18 } 18 }
19 19
20 // DispatchLastTask is used to run the main test thread's MessageLoop until 20 // DispatchLastTask is used to run the main test thread's MessageLoop until
21 // all non-delayed tasks are run on the LibDispatchTaskRunner. 21 // all non-delayed tasks are run on the LibDispatchTaskRunner.
22 void DispatchLastTask() { 22 void DispatchLastTask() {
23 dispatch_async(task_runner_->GetDispatchQueue(), ^{ 23 dispatch_async(task_runner_->GetDispatchQueue(), ^{
24 message_loop_.PostTask(FROM_HERE, 24 message_loop_.PostTask(FROM_HERE,
25 base::MessageLoop::QuitWhenIdleClosure()); 25 base::MessageLoop::QuitWhenIdleClosure());
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 }))); 215 })));
216 216
217 const char* const expectations[] = { 217 const char* const expectations[] = {
218 "BEGIN First", 218 "BEGIN First",
219 "END First", 219 "END First",
220 "BEGIN Second", 220 "BEGIN Second",
221 "END Second" 221 "END Second"
222 }; 222 };
223 VerifyTaskOrder(expectations, arraysize(expectations)); 223 VerifyTaskOrder(expectations, arraysize(expectations));
224 } 224 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698