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

Unified Diff: google_apis/drive/gdata_wapi_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: Fix the cause of the regression. 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
« no previous file with comments | « google_apis/drive/gdata_wapi_requests.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/drive/gdata_wapi_requests_unittest.cc
diff --git a/google_apis/drive/gdata_wapi_requests_unittest.cc b/google_apis/drive/gdata_wapi_requests_unittest.cc
index 2c39745184a0ccaa10b50fea9eb540111d919480..c99290926aa70811ce4fe62277b9fe8e5691004e 100644
--- a/google_apis/drive/gdata_wapi_requests_unittest.cc
+++ b/google_apis/drive/gdata_wapi_requests_unittest.cc
@@ -5,7 +5,6 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
-#include "base/values.h"
#include "google_apis/drive/dummy_auth_service.h"
#include "google_apis/drive/gdata_wapi_parser.h"
#include "google_apis/drive/gdata_wapi_requests.h"
@@ -99,7 +98,7 @@ class GDataWapiRequestsTest : public testing::Test {
TEST_F(GDataWapiRequestsTest, GetResourceEntryRequest_ValidResourceId) {
GDataErrorCode result_code = GDATA_OTHER_ERROR;
- scoped_ptr<base::Value> result_data;
+ scoped_ptr<ResourceEntry> result_data;
{
base::RunLoop run_loop;
@@ -120,16 +119,14 @@ TEST_F(GDataWapiRequestsTest, GetResourceEntryRequest_ValidResourceId) {
EXPECT_EQ("/feeds/default/private/full/file%3A2_file_resource_id"
"?v=3&alt=json&showroot=true",
http_request_.relative_url);
- scoped_ptr<base::Value> expected_json =
- test_util::LoadJSONFile("gdata/file_entry.json");
- ASSERT_TRUE(expected_json);
EXPECT_TRUE(result_data);
- EXPECT_TRUE(base::Value::Equals(expected_json.get(), result_data.get()));
+ EXPECT_EQ("File 1.mp3", result_data->filename());
+ EXPECT_EQ("3b4382ebefec6e743578c76bbd0575ce", result_data->file_md5());
}
TEST_F(GDataWapiRequestsTest, GetResourceEntryRequest_InvalidResourceId) {
GDataErrorCode result_code = GDATA_OTHER_ERROR;
- scoped_ptr<base::Value> result_data;
+ scoped_ptr<ResourceEntry> result_data;
{
base::RunLoop run_loop;
« no previous file with comments | « google_apis/drive/gdata_wapi_requests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698