OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/google_apis/gdata_wapi_url_util.h" | 5 #include "chrome/browser/google_apis/gdata_wapi_url_util.h" |
6 | 6 |
7 #include "googleurl/src/gurl.h" | 7 #include "googleurl/src/gurl.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
10 namespace google_apis { | 10 namespace google_apis { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 "?v=3&alt=json&showfolders=true&max-results=500" | 123 "?v=3&alt=json&showfolders=true&max-results=500" |
124 "&include-installed-apps=true", | 124 "&include-installed-apps=true", |
125 GenerateDocumentListUrl(GURL(), // override_url, | 125 GenerateDocumentListUrl(GURL(), // override_url, |
126 0, // start_changestamp, | 126 0, // start_changestamp, |
127 "", // search_string, | 127 "", // search_string, |
128 false, // shared_with_me, | 128 false, // shared_with_me, |
129 "XXX" // directory resource ID | 129 "XXX" // directory resource ID |
130 ).spec()); | 130 ).spec()); |
131 } | 131 } |
132 | 132 |
| 133 TEST(GDataWapiUrlUtilTest, GenerateDocumentEntryUrl) { |
| 134 EXPECT_EQ( |
| 135 "https://docs.google.com/feeds/default/private/full/XXX?v=3&alt=json", |
| 136 GenerateDocumentEntryUrl("XXX").spec()); |
| 137 } |
| 138 |
| 139 TEST(GDataWapiUrlUtilTest, GenerateDocumentListRootUrl) { |
| 140 EXPECT_EQ( |
| 141 "https://docs.google.com/feeds/default/private/full?v=3&alt=json", |
| 142 GenerateDocumentListRootUrl().spec()); |
| 143 } |
| 144 |
| 145 TEST(GDataWapiUrlUtilTest, GenerateAccountMetadataUrl) { |
| 146 EXPECT_EQ( |
| 147 "https://docs.google.com/feeds/metadata/default" |
| 148 "?v=3&alt=json&include-installed-apps=true", |
| 149 GenerateAccountMetadataUrl().spec()); |
| 150 } |
| 151 |
| 152 |
133 } // namespace gdata_wapi_url_util | 153 } // namespace gdata_wapi_url_util |
134 } // namespace google_apis | 154 } // namespace google_apis |
OLD | NEW |