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

Side by Side Diff: google_apis/drive/drive_api_requests_unittest.cc

Issue 548343004: Move chrome/test/data/gdata/testfile.txt to chrome/test/data/drive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 ASSERT_TRUE(about_resource.get()); 562 ASSERT_TRUE(about_resource.get());
563 EXPECT_EQ(expected->largest_change_id(), about_resource->largest_change_id()); 563 EXPECT_EQ(expected->largest_change_id(), about_resource->largest_change_id());
564 EXPECT_EQ(expected->quota_bytes_total(), about_resource->quota_bytes_total()); 564 EXPECT_EQ(expected->quota_bytes_total(), about_resource->quota_bytes_total());
565 EXPECT_EQ(expected->quota_bytes_used(), about_resource->quota_bytes_used()); 565 EXPECT_EQ(expected->quota_bytes_used(), about_resource->quota_bytes_used());
566 EXPECT_EQ(expected->root_folder_id(), about_resource->root_folder_id()); 566 EXPECT_EQ(expected->root_folder_id(), about_resource->root_folder_id());
567 } 567 }
568 568
569 TEST_F(DriveApiRequestsTest, AboutGetRequest_InvalidJson) { 569 TEST_F(DriveApiRequestsTest, AboutGetRequest_InvalidJson) {
570 // Set an expected data file containing invalid result. 570 // Set an expected data file containing invalid result.
571 expected_data_file_path_ = test_util::GetTestFilePath( 571 expected_data_file_path_ = test_util::GetTestFilePath(
572 "gdata/testfile.txt"); 572 "drive/testfile.txt");
573 573
574 GDataErrorCode error = GDATA_OTHER_ERROR; 574 GDataErrorCode error = GDATA_OTHER_ERROR;
575 scoped_ptr<AboutResource> about_resource; 575 scoped_ptr<AboutResource> about_resource;
576 576
577 { 577 {
578 base::RunLoop run_loop; 578 base::RunLoop run_loop;
579 drive::AboutGetRequest* request = new drive::AboutGetRequest( 579 drive::AboutGetRequest* request = new drive::AboutGetRequest(
580 request_sender_.get(), 580 request_sender_.get(),
581 *url_generator_, 581 *url_generator_,
582 test_util::CreateQuitCallback( 582 test_util::CreateQuitCallback(
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1846 expected.reset(base::JSONReader::Read( 1846 expected.reset(base::JSONReader::Read(
1847 "{\"role\":\"writer\", \"type\":\"domain\",\"value\":\"example.com\"}")); 1847 "{\"role\":\"writer\", \"type\":\"domain\",\"value\":\"example.com\"}"));
1848 ASSERT_TRUE(expected); 1848 ASSERT_TRUE(expected);
1849 1849
1850 result.reset(base::JSONReader::Read(http_request_.content)); 1850 result.reset(base::JSONReader::Read(http_request_.content));
1851 EXPECT_TRUE(http_request_.has_content); 1851 EXPECT_TRUE(http_request_.has_content);
1852 EXPECT_TRUE(base::Value::Equals(expected.get(), result.get())); 1852 EXPECT_TRUE(base::Value::Equals(expected.get(), result.get()));
1853 } 1853 }
1854 1854
1855 } // namespace google_apis 1855 } // namespace google_apis
OLDNEW
« no previous file with comments | « google_apis/drive/base_requests_server_unittest.cc ('k') | google_apis/drive/gdata_wapi_requests_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698