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

Unified Diff: third_party/WebKit/Source/wtf/FunctionalTest.cpp

Issue 2327793002: Expose base::Callback::IsCancelled via WTF::Function (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/wtf/Functional.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/FunctionalTest.cpp
diff --git a/third_party/WebKit/Source/wtf/FunctionalTest.cpp b/third_party/WebKit/Source/wtf/FunctionalTest.cpp
index 03c6e7c6ce0f17aafefc67b7628f06c8eb9dce49..ef6ccc262d4427058172b1d208b0c547a79f5afe 100644
--- a/third_party/WebKit/Source/wtf/FunctionalTest.cpp
+++ b/third_party/WebKit/Source/wtf/FunctionalTest.cpp
@@ -589,9 +589,11 @@ TEST(FunctionalTest, WeakPtr)
std::unique_ptr<WTF::Closure> bound = WTF::bind(&HasWeakPtrSupport::increment, obj.createWeakPtr(), WTF::unretained(&counter));
(*bound)();
+ EXPECT_FALSE(bound->isCancelled());
EXPECT_EQ(1, counter);
obj.revokeAll();
+ EXPECT_TRUE(bound->isCancelled());
(*bound)();
EXPECT_EQ(1, counter);
}
« no previous file with comments | « third_party/WebKit/Source/wtf/Functional.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698