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

Unified Diff: base/callback_unittest.cc

Issue 2616403003: Replacing SurfaceReferenceBase and SequenceSurfaceReference with Closures (Closed)
Patch Set: c Created 3 years, 11 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 | « no previous file | cc/layers/surface_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/callback_unittest.cc
diff --git a/base/callback_unittest.cc b/base/callback_unittest.cc
index 783f3bad4f5fb90e70cc6d9e0df0b08411a4c5e9..a41736946a13f5f6c9b6c3d1492c0a93d153c476 100644
--- a/base/callback_unittest.cc
+++ b/base/callback_unittest.cc
@@ -115,6 +115,17 @@ TEST_F(CallbackTest, Reset) {
EXPECT_TRUE(callback_a_.Equals(null_callback_));
}
+TEST_F(CallbackTest, Move) {
+ // Moving should reset the callback.
+ ASSERT_FALSE(callback_a_.is_null());
+ ASSERT_FALSE(callback_a_.Equals(null_callback_));
+
+ auto tmp = std::move(callback_a_);
+
+ EXPECT_TRUE(callback_a_.is_null());
+ EXPECT_TRUE(callback_a_.Equals(null_callback_));
+}
+
struct TestForReentrancy {
TestForReentrancy()
: cb_already_run(false),
« no previous file with comments | « no previous file | cc/layers/surface_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698