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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/CancellableTaskFactoryTest.cpp

Issue 2110363002: Rename SameThreadClosure to Closure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TRV_ExplicitWTFBind
Patch Set: Add WTF:: to Closure Created 4 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
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 "platform/scheduler/CancellableTaskFactory.h" 5 #include "platform/scheduler/CancellableTaskFactory.h"
6 6
7 #include "platform/heap/Handle.h" 7 #include "platform/heap/Handle.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "wtf/PtrUtil.h" 9 #include "wtf/PtrUtil.h"
10 #include <memory> 10 #include <memory>
11 11
12 namespace blink { 12 namespace blink {
13 13
14 namespace { 14 namespace {
15 15
16 class TestCancellableTaskFactory final : public CancellableTaskFactory { 16 class TestCancellableTaskFactory final : public CancellableTaskFactory {
17 public: 17 public:
18 explicit TestCancellableTaskFactory(std::unique_ptr<SameThreadClosure> closu re) 18 explicit TestCancellableTaskFactory(std::unique_ptr<WTF::Closure> closure)
19 : CancellableTaskFactory(std::move(closure)) 19 : CancellableTaskFactory(std::move(closure))
20 { 20 {
21 } 21 }
22 }; 22 };
23 23
24 } // namespace 24 } // namespace
25 25
26 using CancellableTaskFactoryTest = testing::Test; 26 using CancellableTaskFactoryTest = testing::Test;
27 27
28 TEST_F(CancellableTaskFactoryTest, IsPending_TaskNotCreated) 28 TEST_F(CancellableTaskFactoryTest, IsPending_TaskNotCreated)
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 task->run(); 220 task->run();
221 // The owning object will have been GCed and the task will have 221 // The owning object will have been GCed and the task will have
222 // lost its weak reference. Verify that it wasn't invoked. 222 // lost its weak reference. Verify that it wasn't invoked.
223 EXPECT_EQ(0, GCObject::s_invoked); 223 EXPECT_EQ(0, GCObject::s_invoked);
224 224
225 // ..and just to make sure |object| was indeed destructed. 225 // ..and just to make sure |object| was indeed destructed.
226 EXPECT_EQ(1, GCObject::s_destructed); 226 EXPECT_EQ(1, GCObject::s_destructed);
227 } 227 }
228 228
229 } // namespace blink 229 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.cpp ('k') | third_party/WebKit/Source/wtf/Functional.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698