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

Unified Diff: trunk/src/google_apis/drive/gdata_wapi_requests_unittest.cc

Issue 449323002: Revert 288017 "Parse Drive API responses all at once in the bloc..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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
« no previous file with comments | « trunk/src/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: trunk/src/google_apis/drive/gdata_wapi_requests_unittest.cc
===================================================================
--- trunk/src/google_apis/drive/gdata_wapi_requests_unittest.cc (revision 288215)
+++ trunk/src/google_apis/drive/gdata_wapi_requests_unittest.cc (working copy)
@@ -5,6 +5,7 @@
#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"
@@ -98,7 +99,7 @@
TEST_F(GDataWapiRequestsTest, GetResourceEntryRequest_ValidResourceId) {
GDataErrorCode result_code = GDATA_OTHER_ERROR;
- scoped_ptr<ResourceEntry> result_data;
+ scoped_ptr<base::Value> result_data;
{
base::RunLoop run_loop;
@@ -119,14 +120,16 @@
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_EQ("File 1.mp3", result_data->filename());
- EXPECT_EQ("3b4382ebefec6e743578c76bbd0575ce", result_data->file_md5());
+ EXPECT_TRUE(base::Value::Equals(expected_json.get(), result_data.get()));
}
TEST_F(GDataWapiRequestsTest, GetResourceEntryRequest_InvalidResourceId) {
GDataErrorCode result_code = GDATA_OTHER_ERROR;
- scoped_ptr<ResourceEntry> result_data;
+ scoped_ptr<base::Value> result_data;
{
base::RunLoop run_loop;
« no previous file with comments | « trunk/src/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