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

Unified Diff: base/at_exit_unittest.cc

Issue 7831021: Support for registering arbitrary Tasks with AtExitManager. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
« base/at_exit.h ('K') | « base/at_exit.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/at_exit_unittest.cc
===================================================================
--- base/at_exit_unittest.cc (revision 99168)
+++ base/at_exit_unittest.cc (working copy)
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/at_exit.h"
+#include "base/task.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -77,3 +78,10 @@
&g_test_counter_1);
base::AtExitManager::ProcessCallbacksNow();
}
+
+TEST_F(AtExitTest, Task) {
+ ZeroTestCounters();
+ base::AtExitManager::RegisterTask(NewRunnableFunction(ExpectParamIsCounter,
+ &g_test_counter_1));
+ base::AtExitManager::ProcessCallbacksNow();
+}
« base/at_exit.h ('K') | « base/at_exit.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698