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

Unified Diff: webkit/appcache/appcache_update_job_unittest.cc

Issue 8515019: base::Bind: Convert most of webkit/appcache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused include. Created 9 years, 1 month 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
Index: webkit/appcache/appcache_update_job_unittest.cc
diff --git a/webkit/appcache/appcache_update_job_unittest.cc b/webkit/appcache/appcache_update_job_unittest.cc
index 2f87651fd63323b95d2678d27306fe0b79e08604..45eea637fdb01feb27fa407fd6ff31b3ea0577be 100644
--- a/webkit/appcache/appcache_update_job_unittest.cc
+++ b/webkit/appcache/appcache_update_job_unittest.cc
@@ -4,6 +4,8 @@
#include "testing/gtest/include/gtest/gtest.h"
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/stl_util.h"
#include "base/threading/thread.h"
#include "base/synchronization/waitable_event.h"
@@ -568,7 +570,7 @@ class AppCacheUpdateJobTest : public testing::Test,
void RunTestOnIOThread(Method method) {
event_.reset(new base::WaitableEvent(false, false));
io_thread_->message_loop()->PostTask(
- FROM_HERE, NewRunnableMethod(this, method));
+ FROM_HERE, base::Bind(method, base::Unretained(this)));
// Wait until task is done before exiting the test.
event_->Wait();
@@ -2819,8 +2821,9 @@ class AppCacheUpdateJobTest : public testing::Test,
void UpdateFinished() {
// We unwind the stack prior to finishing up to let stack-based objects
// get deleted.
- MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
- this, &AppCacheUpdateJobTest::UpdateFinishedUnwound));
+ MessageLoop::current()->PostTask(
+ FROM_HERE, base::Bind(&AppCacheUpdateJobTest::UpdateFinishedUnwound,
+ base::Unretained(this)));
}
void UpdateFinishedUnwound() {
@@ -3451,7 +3454,3 @@ TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsDenied) {
}
} // namespace appcache
-
-// AppCacheUpdateJobTest is expected to always live longer than the
-// runnable methods. This lets us call NewRunnableMethod on its instances.
-DISABLE_RUNNABLE_METHOD_REFCOUNT(appcache::AppCacheUpdateJobTest);
« no previous file with comments | « webkit/appcache/appcache_storage_impl_unittest.cc ('k') | webkit/appcache/appcache_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698