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

Unified Diff: base/task_unittest.cc

Issue 9114020: Remove task.h and finish base::Bind() migration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 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 | « base/task.cc ('k') | base/threading/worker_pool_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_unittest.cc
diff --git a/base/task_unittest.cc b/base/task_unittest.cc
deleted file mode 100644
index 1fcbfa93318bc7c3b06f4aeee769276e8a55c446..0000000000000000000000000000000000000000
--- a/base/task_unittest.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/bind.h"
-#include "base/memory/ref_counted.h"
-#include "base/task.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace {
-
-void Increment(int* value) {
- (*value)++;
-}
-
-TEST(TaskTest, TestScopedClosureRunnerExitScope) {
- int run_count = 0;
- {
- base::ScopedClosureRunner runner(base::Bind(&Increment, &run_count));
- EXPECT_EQ(0, run_count);
- }
- EXPECT_EQ(1, run_count);
-}
-
-TEST(TaskTest, TestScopedClosureRunnerRelease) {
- int run_count = 0;
- base::Closure c;
- {
- base::ScopedClosureRunner runner(base::Bind(&Increment, &run_count));
- c = runner.Release();
- EXPECT_EQ(0, run_count);
- }
- EXPECT_EQ(0, run_count);
- c.Run();
- EXPECT_EQ(1, run_count);
-}
-
-} // namespace
« no previous file with comments | « base/task.cc ('k') | base/threading/worker_pool_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698