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

Unified Diff: google_apis/drive/base_requests_unittest.cc

Issue 442193002: Parse Drive API responses all at once in the blocking pool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: google_apis/drive/base_requests_unittest.cc
diff --git a/google_apis/drive/base_requests_unittest.cc b/google_apis/drive/base_requests_unittest.cc
index f3a97c191562d848c86e51a7f75721aed2ec5fdd..21bd68a9735fc776d1ce69f5ead433987f369666 100644
--- a/google_apis/drive/base_requests_unittest.cc
+++ b/google_apis/drive/base_requests_unittest.cc
@@ -109,11 +109,7 @@ class BaseRequestsTest : public testing::Test {
};
TEST_F(BaseRequestsTest, ParseValidJson) {
- scoped_ptr<base::Value> json;
- ParseJson(message_loop_.message_loop_proxy(),
- kValidJsonString,
- base::Bind(test_util::CreateCopyResultCallback(&json)));
- base::RunLoop().RunUntilIdle();
+ scoped_ptr<base::Value> json(ParseJson(kValidJsonString));
base::DictionaryValue* root_dict = NULL;
ASSERT_TRUE(json);
@@ -125,14 +121,7 @@ TEST_F(BaseRequestsTest, ParseValidJson) {
}
TEST_F(BaseRequestsTest, ParseInvalidJson) {
- // Initialize with a valid pointer to verify that null is indeed assigned.
- scoped_ptr<base::Value> json(base::Value::CreateNullValue());
- ParseJson(message_loop_.message_loop_proxy(),
- kInvalidJsonString,
- base::Bind(test_util::CreateCopyResultCallback(&json)));
- base::RunLoop().RunUntilIdle();
-
- EXPECT_FALSE(json);
+ EXPECT_FALSE(ParseJson(kInvalidJsonString));
}
TEST_F(BaseRequestsTest, UrlFetchRequestBaseResponseCodeOverride) {

Powered by Google App Engine
This is Rietveld 408576698