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

Unified Diff: net/url_request/view_cache_helper_unittest.cc

Issue 8680015: base::Bind: Convert view_http_cache_job_factory.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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: net/url_request/view_cache_helper_unittest.cc
diff --git a/net/url_request/view_cache_helper_unittest.cc b/net/url_request/view_cache_helper_unittest.cc
index a0c3d1eb50dabf5263ae5bf87c6923f073e803f7..17bad618e92681fecdf44838e19ac10d71306b98 100644
--- a/net/url_request/view_cache_helper_unittest.cc
+++ b/net/url_request/view_cache_helper_unittest.cc
@@ -103,9 +103,9 @@ TEST(ViewCacheHelper, EmptyCache) {
scoped_refptr<TestURLRequestContext> context(new TestURLRequestContext());
ViewCacheHelper helper;
- TestOldCompletionCallback cb;
+ TestCompletionCallback cb;
std::string prefix, data;
- int rv = helper.GetContentsHTML(context, prefix, &data, &cb);
+ int rv = helper.GetContentsHTML(context, prefix, &data, cb.callback());
EXPECT_EQ(OK, cb.GetResult(rv));
EXPECT_FALSE(data.empty());
}
@@ -117,8 +117,8 @@ TEST(ViewCacheHelper, ListContents) {
FillCache(context);
std::string prefix, data;
- TestOldCompletionCallback cb;
- int rv = helper.GetContentsHTML(context, prefix, &data, &cb);
+ TestCompletionCallback cb;
+ int rv = helper.GetContentsHTML(context, prefix, &data, cb.callback());
EXPECT_EQ(OK, cb.GetResult(rv));
EXPECT_EQ(0U, data.find("<html>"));
@@ -139,8 +139,8 @@ TEST(ViewCacheHelper, DumpEntry) {
FillCache(context);
std::string data;
- TestOldCompletionCallback cb;
- int rv = helper.GetEntryInfoHTML("second", context, &data, &cb);
+ TestCompletionCallback cb;
+ int rv = helper.GetEntryInfoHTML("second", context, &data, cb.callback());
EXPECT_EQ(OK, cb.GetResult(rv));
EXPECT_EQ(0U, data.find("<html>"));
@@ -165,8 +165,8 @@ TEST(ViewCacheHelper, Prefix) {
std::string key, data;
std::string prefix("prefix:");
- TestOldCompletionCallback cb;
- int rv = helper.GetContentsHTML(context, prefix, &data, &cb);
+ TestCompletionCallback cb;
+ int rv = helper.GetContentsHTML(context, prefix, &data, cb.callback());
EXPECT_EQ(OK, cb.GetResult(rv));
EXPECT_EQ(0U, data.find("<html>"));
@@ -197,8 +197,9 @@ TEST(ViewCacheHelper, TruncatedFlag) {
entry->Close();
std::string data;
- rv = helper.GetEntryInfoHTML(key, context, &data, &cb);
- EXPECT_EQ(OK, cb.GetResult(rv));
+ TestCompletionCallback cb1;
+ rv = helper.GetEntryInfoHTML(key, context, &data, cb1.callback());
+ EXPECT_EQ(OK, cb1.GetResult(rv));
EXPECT_NE(std::string::npos, data.find("RESPONSE_INFO_TRUNCATED"));
}
« chrome/browser/net/view_http_cache_job_factory.cc ('K') | « net/url_request/view_cache_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698