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

Unified Diff: chrome/browser/google_apis/gdata_wapi_operations_unittest.cc

Issue 12861002: drive: Remove "/-/mine" from WAPI resource list urls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modified the test feed to include an not-mine entry. Created 7 years, 9 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: chrome/browser/google_apis/gdata_wapi_operations_unittest.cc
diff --git a/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc b/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc
index 43252b1b292b642818b42772d83d84a87c4c12e5..11a8e3ebdaadf7929a16c99965530a45946774da 100644
--- a/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc
+++ b/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc
@@ -102,19 +102,19 @@ class GDataWapiOperationsTest : public testing::Test {
}
if (!test_util::RemovePrefix(absolute_url.path(),
- "/feeds/default/private/full/",
+ "/feeds/default/private/full",
&remaining_path)) {
return scoped_ptr<test_server::HttpResponse>();
}
- if (remaining_path == "-/mine") {
+ if (remaining_path.empty()) {
// Process the default feed.
return test_util::CreateHttpResponseFromFile(
test_util::GetTestFilePath("chromeos/gdata/root_feed.json"));
} else {
// Process a feed for a single resource ID.
const std::string resource_id = net::UnescapeURLComponent(
- remaining_path, net::UnescapeRule::URL_SPECIAL_CHARS);
+ remaining_path.substr(1), net::UnescapeRule::URL_SPECIAL_CHARS);
if (resource_id == "file:2_file_resource_id") {
// Check if this is an authorization request for an app.
if (request.method == test_server::METHOD_PUT &&
@@ -337,7 +337,7 @@ TEST_F(GDataWapiOperationsTest, GetResourceListOperation_DefaultFeed) {
EXPECT_EQ(HTTP_SUCCESS, result_code);
EXPECT_EQ(test_server::METHOD_GET, http_request_.method);
- EXPECT_EQ("/feeds/default/private/full/-/mine?v=3&alt=json&showroot=true&"
+ EXPECT_EQ("/feeds/default/private/full?v=3&alt=json&showroot=true&"
"showfolders=true&max-results=500&include-installed-apps=true",
http_request_.relative_url);
EXPECT_TRUE(test_util::VerifyJsonData(
« no previous file with comments | « chrome/browser/google_apis/fake_drive_service_unittest.cc ('k') | chrome/browser/google_apis/gdata_wapi_url_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698