| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "base/file_path.h" | |
| 6 #include "base/file_util.h" | |
| 7 #include "base/json/json_file_value_serializer.h" | |
| 8 #include "base/path_service.h" | |
| 9 #include "base/string16.h" | |
| 10 #include "base/time.h" | |
| 11 #include "base/utf_string_conversions.h" | |
| 12 #include "base/values.h" | |
| 13 #include "chrome/browser/chromeos/gdata/gdata_parser.h" | |
| 14 #include "chrome/common/chrome_paths.h" | |
| 15 #include "testing/gtest/include/gtest/gtest.h" | |
| 16 #include "third_party/libxml/chromium/libxml_utils.h" | |
| 17 | |
| 18 using base::Value; | |
| 19 using base::DictionaryValue; | |
| 20 using base::ListValue; | |
| 21 | |
| 22 #define IF_EXPECT_EQ(arg1, arg2) \ | |
| 23 EXPECT_EQ(arg1, arg2); \ | |
| 24 if (arg1 == arg2) | |
| 25 | |
| 26 #define IF_EXPECT_TRUE(arg) \ | |
| 27 EXPECT_TRUE(arg); \ | |
| 28 if (arg) | |
| 29 | |
| 30 namespace gdata { | |
| 31 | |
| 32 class GDataParserTest : public testing::Test { | |
| 33 protected: | |
| 34 static Value* LoadJSONFile(const std::string& filename) { | |
| 35 FilePath path; | |
| 36 std::string error; | |
| 37 // Test files for this unit test are located in | |
| 38 // src/chrome/test/data/chromeos/gdata/* | |
| 39 PathService::Get(chrome::DIR_TEST_DATA, &path); | |
| 40 path = path.AppendASCII("chromeos") | |
| 41 .AppendASCII("gdata") | |
| 42 .AppendASCII(filename.c_str()); | |
| 43 EXPECT_TRUE(file_util::PathExists(path)) << | |
| 44 "Couldn't find " << path.value(); | |
| 45 | |
| 46 JSONFileValueSerializer serializer(path); | |
| 47 Value* value = serializer.Deserialize(NULL, &error); | |
| 48 EXPECT_TRUE(value) << | |
| 49 "Parse error " << path.value() << ": " << error; | |
| 50 return value; | |
| 51 } | |
| 52 | |
| 53 static DocumentEntry* LoadDocumentEntryFromXml(const std::string& filename) { | |
| 54 FilePath path; | |
| 55 std::string error; | |
| 56 PathService::Get(chrome::DIR_TEST_DATA, &path); | |
| 57 path = path.AppendASCII("chromeos") | |
| 58 .AppendASCII("gdata") | |
| 59 .AppendASCII(filename.c_str()); | |
| 60 EXPECT_TRUE(file_util::PathExists(path)) << | |
| 61 "Couldn't find " << path.value(); | |
| 62 std::string contents; | |
| 63 EXPECT_TRUE(file_util::ReadFileToString(path, &contents)); | |
| 64 XmlReader reader; | |
| 65 if (!reader.Load(contents)) { | |
| 66 NOTREACHED() << "Invalid xml:\n" << contents; | |
| 67 return NULL; | |
| 68 } | |
| 69 scoped_ptr<DocumentEntry> entry; | |
| 70 while (reader.Read()) { | |
| 71 if (reader.NodeName() == "entry") { | |
| 72 entry.reset(DocumentEntry::CreateFromXml(&reader)); | |
| 73 break; | |
| 74 } | |
| 75 } | |
| 76 return entry.release(); | |
| 77 } | |
| 78 }; | |
| 79 | |
| 80 // Test document feed parsing. | |
| 81 TEST_F(GDataParserTest, DocumentFeedJsonParser) { | |
| 82 std::string error; | |
| 83 scoped_ptr<Value> document(LoadJSONFile("basic_feed.json")); | |
| 84 ASSERT_TRUE(document.get()); | |
| 85 ASSERT_EQ(Value::TYPE_DICTIONARY, document->GetType()); | |
| 86 scoped_ptr<DocumentFeed> feed(DocumentFeed::ExtractAndParse(*document)); | |
| 87 ASSERT_TRUE(feed.get()); | |
| 88 | |
| 89 base::Time update_time; | |
| 90 ASSERT_TRUE(FeedEntry::GetTimeFromString("2011-12-14T01:03:21.151Z", | |
| 91 &update_time)); | |
| 92 | |
| 93 EXPECT_EQ(1, feed->start_index()); | |
| 94 EXPECT_EQ(1000, feed->items_per_page()); | |
| 95 EXPECT_EQ(update_time, feed->updated_time()); | |
| 96 | |
| 97 // Check authors. | |
| 98 IF_EXPECT_EQ(1U, feed->authors().size()) { | |
| 99 EXPECT_EQ(ASCIIToUTF16("tester"), feed->authors()[0]->name()); | |
| 100 EXPECT_EQ("tester@testing.com", feed->authors()[0]->email()); | |
| 101 } | |
| 102 | |
| 103 // Check links. | |
| 104 IF_EXPECT_EQ(6U, feed->links().size()) { | |
| 105 const Link* self_link = feed->GetLinkByType(Link::SELF); | |
| 106 IF_EXPECT_TRUE(self_link) { | |
| 107 EXPECT_EQ("https://self_link/", self_link->href().spec()); | |
| 108 EXPECT_EQ("application/atom+xml", self_link->mime_type()); | |
| 109 } | |
| 110 } | |
| 111 | |
| 112 const Link* resumable_link = | |
| 113 feed->GetLinkByType(Link::RESUMABLE_CREATE_MEDIA); | |
| 114 IF_EXPECT_TRUE(resumable_link) { | |
| 115 EXPECT_EQ("https://resumable_create_media_link/", | |
| 116 resumable_link->href().spec()); | |
| 117 EXPECT_EQ("application/atom+xml", resumable_link->mime_type()); | |
| 118 } | |
| 119 | |
| 120 // Check entries. | |
| 121 ASSERT_EQ(4U, feed->entries().size()); | |
| 122 | |
| 123 // Check a folder entry. | |
| 124 const DocumentEntry* folder_entry = feed->entries()[0]; | |
| 125 ASSERT_TRUE(folder_entry); | |
| 126 EXPECT_EQ(DocumentEntry::FOLDER, folder_entry->kind()); | |
| 127 EXPECT_EQ("\"HhMOFgcNHSt7ImBr\"", folder_entry->etag()); | |
| 128 EXPECT_EQ("folder:1_folder_resouce_id", folder_entry->resource_id()); | |
| 129 EXPECT_EQ("https://1_folder_id", folder_entry->id()); | |
| 130 EXPECT_EQ(ASCIIToUTF16("Entry 1 Title"), folder_entry->title()); | |
| 131 base::Time entry1_update_time; | |
| 132 base::Time entry1_publish_time; | |
| 133 ASSERT_TRUE(FeedEntry::GetTimeFromString("2011-04-01T18:34:08.234Z", | |
| 134 &entry1_update_time)); | |
| 135 ASSERT_TRUE(FeedEntry::GetTimeFromString("2010-11-07T05:03:54.719Z", | |
| 136 &entry1_publish_time)); | |
| 137 EXPECT_EQ(entry1_update_time, folder_entry->updated_time()); | |
| 138 EXPECT_EQ(entry1_publish_time, folder_entry->published_time()); | |
| 139 | |
| 140 IF_EXPECT_EQ(1U, folder_entry->authors().size()) { | |
| 141 EXPECT_EQ(ASCIIToUTF16("entry_tester"), folder_entry->authors()[0]->name()); | |
| 142 EXPECT_EQ("entry_tester@testing.com", folder_entry->authors()[0]->email()); | |
| 143 EXPECT_EQ("https://1_folder_content_url/", | |
| 144 folder_entry->content_url().spec()); | |
| 145 EXPECT_EQ("application/atom+xml;type=feed", | |
| 146 folder_entry->content_mime_type()); | |
| 147 } | |
| 148 | |
| 149 ASSERT_EQ(1U, folder_entry->feed_links().size()); | |
| 150 const FeedLink* feed_link = folder_entry->feed_links()[0]; | |
| 151 ASSERT_TRUE(feed_link); | |
| 152 ASSERT_EQ(FeedLink::ACL, feed_link->type()); | |
| 153 | |
| 154 const Link* entry1_alternate_link = | |
| 155 folder_entry->GetLinkByType(Link::ALTERNATE); | |
| 156 IF_EXPECT_TRUE(entry1_alternate_link) { | |
| 157 EXPECT_EQ("https://1_folder_alternate_link/", | |
| 158 entry1_alternate_link->href().spec()); | |
| 159 EXPECT_EQ("text/html", entry1_alternate_link->mime_type()); | |
| 160 } | |
| 161 | |
| 162 const Link* entry1_edit_link = folder_entry->GetLinkByType(Link::EDIT); | |
| 163 IF_EXPECT_TRUE(entry1_edit_link) { | |
| 164 EXPECT_EQ("https://1_edit_link/", entry1_edit_link->href().spec()); | |
| 165 EXPECT_EQ("application/atom+xml", entry1_edit_link->mime_type()); | |
| 166 } | |
| 167 | |
| 168 // Check a file entry. | |
| 169 const DocumentEntry* file_entry = feed->entries()[1]; | |
| 170 IF_EXPECT_TRUE(file_entry) { | |
| 171 EXPECT_EQ(DocumentEntry::FILE, file_entry->kind()); | |
| 172 EXPECT_EQ(ASCIIToUTF16("filename.m4a"), file_entry->filename()); | |
| 173 EXPECT_EQ(ASCIIToUTF16("sugg_file_name.m4a"), | |
| 174 file_entry->suggested_filename()); | |
| 175 EXPECT_EQ("3b4382ebefec6e743578c76bbd0575ce", file_entry->file_md5()); | |
| 176 EXPECT_EQ(892721, file_entry->file_size()); | |
| 177 const Link* file_parent_link = file_entry->GetLinkByType(Link::PARENT); | |
| 178 IF_EXPECT_TRUE(file_parent_link) { | |
| 179 EXPECT_EQ("https://file_link_parent/", file_parent_link->href().spec()); | |
| 180 EXPECT_EQ("application/atom+xml", file_parent_link->mime_type()); | |
| 181 EXPECT_EQ(ASCIIToUTF16("Medical"), file_parent_link->title()); | |
| 182 } | |
| 183 const Link* file_open_with_link = | |
| 184 file_entry->GetLinkByType(Link::OPEN_WITH); | |
| 185 IF_EXPECT_TRUE(file_open_with_link) { | |
| 186 EXPECT_EQ("https://xml_file_entry_open_with_link/", | |
| 187 file_open_with_link->href().spec()); | |
| 188 EXPECT_EQ("application/atom+xml", file_open_with_link->mime_type()); | |
| 189 EXPECT_EQ("the_app_id", file_open_with_link->app_id()); | |
| 190 } | |
| 191 | |
| 192 const Link* file_unknown_link = file_entry->GetLinkByType(Link::UNKNOWN); | |
| 193 IF_EXPECT_TRUE(file_unknown_link) { | |
| 194 EXPECT_EQ("https://xml_file_fake_entry_open_with_link/", | |
| 195 file_unknown_link->href().spec()); | |
| 196 EXPECT_EQ("application/atom+xml", file_unknown_link->mime_type()); | |
| 197 EXPECT_EQ("", file_unknown_link->app_id()); | |
| 198 } | |
| 199 | |
| 200 } | |
| 201 | |
| 202 // Check a file entry. | |
| 203 const DocumentEntry* document_entry = feed->entries()[2]; | |
| 204 IF_EXPECT_TRUE(document_entry) { | |
| 205 EXPECT_EQ(DocumentEntry::DOCUMENT, document_entry->kind()); | |
| 206 EXPECT_TRUE(document_entry->is_hosted_document()); | |
| 207 EXPECT_TRUE(document_entry->is_google_document()); | |
| 208 EXPECT_FALSE(document_entry->is_external_document()); | |
| 209 } | |
| 210 | |
| 211 // Check an external document entry. | |
| 212 const DocumentEntry* app_entry = feed->entries()[3]; | |
| 213 IF_EXPECT_TRUE(app_entry) { | |
| 214 EXPECT_EQ(DocumentEntry::EXTERNAL_APP, app_entry->kind()); | |
| 215 EXPECT_TRUE(app_entry->is_hosted_document()); | |
| 216 EXPECT_TRUE(app_entry->is_external_document()); | |
| 217 EXPECT_FALSE(app_entry->is_google_document()); | |
| 218 } | |
| 219 } | |
| 220 | |
| 221 | |
| 222 // Test document feed parsing. | |
| 223 TEST_F(GDataParserTest, DocumentEntryXmlParser) { | |
| 224 scoped_ptr<DocumentEntry> entry(LoadDocumentEntryFromXml("entry.xml")); | |
| 225 ASSERT_TRUE(entry.get()); | |
| 226 | |
| 227 EXPECT_EQ(DocumentEntry::FILE, entry->kind()); | |
| 228 EXPECT_EQ("\"HhMOFgcNHSt7ImBr\"", entry->etag()); | |
| 229 EXPECT_EQ("file:xml_file_resouce_id", entry->resource_id()); | |
| 230 EXPECT_EQ("https://xml_file_id", entry->id()); | |
| 231 EXPECT_EQ(ASCIIToUTF16("Xml Entry File Title.tar"), entry->title()); | |
| 232 base::Time entry1_update_time; | |
| 233 base::Time entry1_publish_time; | |
| 234 ASSERT_TRUE(FeedEntry::GetTimeFromString("2011-04-01T18:34:08.234Z", | |
| 235 &entry1_update_time)); | |
| 236 ASSERT_TRUE(FeedEntry::GetTimeFromString("2010-11-07T05:03:54.719Z", | |
| 237 &entry1_publish_time)); | |
| 238 EXPECT_EQ(entry1_update_time, entry->updated_time()); | |
| 239 EXPECT_EQ(entry1_publish_time, entry->published_time()); | |
| 240 | |
| 241 EXPECT_EQ(1U, entry->authors().size()); | |
| 242 EXPECT_EQ(ASCIIToUTF16("entry_tester"), entry->authors()[0]->name()); | |
| 243 EXPECT_EQ("entry_tester@testing.com", entry->authors()[0]->email()); | |
| 244 EXPECT_EQ("https://1_xml_file_entry_content_url/", | |
| 245 entry->content_url().spec()); | |
| 246 EXPECT_EQ("application/x-tar", | |
| 247 entry->content_mime_type()); | |
| 248 | |
| 249 // Check feed links. | |
| 250 IF_EXPECT_EQ(2U, entry->feed_links().size()) { | |
| 251 const FeedLink* feed_link_1 = entry->feed_links()[0]; | |
| 252 IF_EXPECT_TRUE(feed_link_1) { | |
| 253 EXPECT_EQ(FeedLink::ACL, feed_link_1->type()); | |
| 254 } | |
| 255 const FeedLink* feed_link_2 = entry->feed_links()[1]; | |
| 256 IF_EXPECT_TRUE(feed_link_2) { | |
| 257 EXPECT_EQ(FeedLink::REVISIONS, feed_link_2->type()); | |
| 258 } | |
| 259 } | |
| 260 | |
| 261 // Check links. | |
| 262 IF_EXPECT_EQ(9U, entry->links().size()) { | |
| 263 const Link* entry1_alternate_link = entry->GetLinkByType(Link::ALTERNATE); | |
| 264 IF_EXPECT_TRUE(entry1_alternate_link) { | |
| 265 EXPECT_EQ("https://xml_file_entry_id_alternate_link/", | |
| 266 entry1_alternate_link->href().spec()); | |
| 267 EXPECT_EQ("text/html", entry1_alternate_link->mime_type()); | |
| 268 } | |
| 269 | |
| 270 const Link* entry1_edit_link = entry->GetLinkByType(Link::EDIT_MEDIA); | |
| 271 IF_EXPECT_TRUE(entry1_edit_link) { | |
| 272 EXPECT_EQ("https://xml_file_entry_id_edit_media_link/", | |
| 273 entry1_edit_link->href().spec()); | |
| 274 EXPECT_EQ("application/x-tar", entry1_edit_link->mime_type()); | |
| 275 } | |
| 276 | |
| 277 const Link* entry1_self_link = entry->GetLinkByType(Link::SELF); | |
| 278 IF_EXPECT_TRUE(entry1_self_link) { | |
| 279 EXPECT_EQ("https://xml_file_entry_id_self_link/", | |
| 280 entry1_self_link->href().spec()); | |
| 281 EXPECT_EQ("application/atom+xml", entry1_self_link->mime_type()); | |
| 282 EXPECT_EQ("", entry1_self_link->app_id()); | |
| 283 } | |
| 284 | |
| 285 const Link* entry1_open_with_link = entry->GetLinkByType(Link::OPEN_WITH); | |
| 286 IF_EXPECT_TRUE(entry1_open_with_link) { | |
| 287 EXPECT_EQ("https://xml_file_entry_open_with_link/", | |
| 288 entry1_open_with_link->href().spec()); | |
| 289 EXPECT_EQ("application/atom+xml", entry1_open_with_link->mime_type()); | |
| 290 EXPECT_EQ("the_app_id", entry1_open_with_link->app_id()); | |
| 291 } | |
| 292 | |
| 293 const Link* entry1_unknown_link = entry->GetLinkByType(Link::UNKNOWN); | |
| 294 IF_EXPECT_TRUE(entry1_unknown_link) { | |
| 295 EXPECT_EQ("https://xml_file_fake_entry_open_with_link/", | |
| 296 entry1_unknown_link->href().spec()); | |
| 297 EXPECT_EQ("application/atom+xml", entry1_unknown_link->mime_type()); | |
| 298 EXPECT_EQ("", entry1_unknown_link->app_id()); | |
| 299 } | |
| 300 } | |
| 301 | |
| 302 // Check a file properties. | |
| 303 EXPECT_EQ(DocumentEntry::FILE, entry->kind()); | |
| 304 EXPECT_EQ(ASCIIToUTF16("Xml Entry File Name.tar"), entry->filename()); | |
| 305 EXPECT_EQ(ASCIIToUTF16("Xml Entry Suggested File Name.tar"), | |
| 306 entry->suggested_filename()); | |
| 307 EXPECT_EQ("e48f4d5c46a778de263e0e3f4b3d2a7d", entry->file_md5()); | |
| 308 EXPECT_EQ(26562560, entry->file_size()); | |
| 309 } | |
| 310 | |
| 311 TEST_F(GDataParserTest, AccountMetadataFeedParser) { | |
| 312 scoped_ptr<Value> document(LoadJSONFile("account_metadata.json")); | |
| 313 ASSERT_TRUE(document.get()); | |
| 314 ASSERT_EQ(Value::TYPE_DICTIONARY, document->GetType()); | |
| 315 DictionaryValue* entry_value = NULL; | |
| 316 ASSERT_TRUE(reinterpret_cast<DictionaryValue*>(document.get())->GetDictionary( | |
| 317 std::string("entry"), &entry_value)); | |
| 318 ASSERT_TRUE(entry_value); | |
| 319 | |
| 320 scoped_ptr<AccountMetadataFeed> feed( | |
| 321 AccountMetadataFeed::CreateFrom(*document)); | |
| 322 ASSERT_TRUE(feed.get()); | |
| 323 EXPECT_EQ(GG_LONGLONG(6789012345), feed->quota_bytes_used()); | |
| 324 EXPECT_EQ(GG_LONGLONG(9876543210), feed->quota_bytes_total()); | |
| 325 EXPECT_EQ(654321, feed->largest_changestamp()); | |
| 326 EXPECT_EQ(2U, feed->installed_apps().size()); | |
| 327 const InstalledApp* first_app = feed->installed_apps()[0]; | |
| 328 const InstalledApp* second_app = feed->installed_apps()[1]; | |
| 329 | |
| 330 IF_EXPECT_TRUE(first_app) { | |
| 331 EXPECT_EQ("Drive App 1", UTF16ToUTF8(first_app->app_name())); | |
| 332 EXPECT_EQ("Drive App Object 1", UTF16ToUTF8(first_app->object_type())); | |
| 333 EXPECT_TRUE(first_app->supports_create()); | |
| 334 EXPECT_EQ("https://chrome.google.com/webstore/detail/abcdefabcdef", | |
| 335 first_app->GetProductUrl().spec()); | |
| 336 IF_EXPECT_EQ(2U, first_app->primary_mimetypes().size()) { | |
| 337 EXPECT_EQ("application/test_type_1", | |
| 338 *first_app->primary_mimetypes()[0]); | |
| 339 EXPECT_EQ("application/vnd.google-apps.drive-sdk.11111111", | |
| 340 *first_app->primary_mimetypes()[1]); | |
| 341 } | |
| 342 IF_EXPECT_EQ(1U, first_app->secondary_mimetypes().size()) { | |
| 343 EXPECT_EQ("image/jpeg", *first_app->secondary_mimetypes()[0]); | |
| 344 } | |
| 345 IF_EXPECT_EQ(2U, first_app->primary_extensions().size()) { | |
| 346 EXPECT_EQ("ext_1", *first_app->primary_extensions()[0]); | |
| 347 EXPECT_EQ("ext_2", *first_app->primary_extensions()[1]); | |
| 348 } | |
| 349 IF_EXPECT_EQ(1U, first_app->secondary_extensions().size()) { | |
| 350 EXPECT_EQ("ext_3", *first_app->secondary_extensions()[0]); | |
| 351 } | |
| 352 IF_EXPECT_EQ(1U, first_app->app_icons().size()) { | |
| 353 EXPECT_EQ(AppIcon::DOCUMENT, first_app->app_icons()[0]->category()); | |
| 354 EXPECT_EQ(16, first_app->app_icons()[0]->icon_side_length()); | |
| 355 GURL icon_url = first_app->app_icons()[0]->GetIconURL(); | |
| 356 EXPECT_EQ("https://www.google.com/images/srpr/logo3w.png", | |
| 357 icon_url.spec()); | |
| 358 InstalledApp::IconList icons = | |
| 359 first_app->GetIconsForCategory(AppIcon::DOCUMENT); | |
| 360 EXPECT_EQ("https://www.google.com/images/srpr/logo3w.png", | |
| 361 icons[0].second.spec()); | |
| 362 icons = first_app->GetIconsForCategory(AppIcon::SHARED_DOCUMENT); | |
| 363 EXPECT_TRUE(icons.empty()); | |
| 364 } | |
| 365 } | |
| 366 | |
| 367 IF_EXPECT_TRUE(second_app) { | |
| 368 EXPECT_EQ("Drive App 2", UTF16ToUTF8(second_app->app_name())); | |
| 369 EXPECT_EQ("Drive App Object 2", UTF16ToUTF8(second_app->object_type())); | |
| 370 EXPECT_EQ("https://chrome.google.com/webstore/detail/deadbeefdeadbeef", | |
| 371 second_app->GetProductUrl().spec()); | |
| 372 EXPECT_FALSE(second_app->supports_create()); | |
| 373 EXPECT_EQ(2U, second_app->primary_mimetypes().size()); | |
| 374 EXPECT_EQ(0U, second_app->secondary_mimetypes().size()); | |
| 375 EXPECT_EQ(1U, second_app->primary_extensions().size()); | |
| 376 EXPECT_EQ(0U, second_app->secondary_extensions().size()); | |
| 377 } | |
| 378 } | |
| 379 | |
| 380 // Test file extension checking in DocumentEntry::HasDocumentExtension(). | |
| 381 TEST_F(GDataParserTest, DocumentEntryHasDocumentExtension) { | |
| 382 EXPECT_TRUE(DocumentEntry::HasHostedDocumentExtension( | |
| 383 FilePath(FILE_PATH_LITERAL("Test.gdoc")))); | |
| 384 EXPECT_TRUE(DocumentEntry::HasHostedDocumentExtension( | |
| 385 FilePath(FILE_PATH_LITERAL("Test.gsheet")))); | |
| 386 EXPECT_TRUE(DocumentEntry::HasHostedDocumentExtension( | |
| 387 FilePath(FILE_PATH_LITERAL("Test.gslides")))); | |
| 388 EXPECT_TRUE(DocumentEntry::HasHostedDocumentExtension( | |
| 389 FilePath(FILE_PATH_LITERAL("Test.gdraw")))); | |
| 390 EXPECT_TRUE(DocumentEntry::HasHostedDocumentExtension( | |
| 391 FilePath(FILE_PATH_LITERAL("Test.gtable")))); | |
| 392 EXPECT_FALSE(DocumentEntry::HasHostedDocumentExtension( | |
| 393 FilePath(FILE_PATH_LITERAL("Test.tar.gz")))); | |
| 394 EXPECT_FALSE(DocumentEntry::HasHostedDocumentExtension( | |
| 395 FilePath(FILE_PATH_LITERAL("Test.txt")))); | |
| 396 EXPECT_FALSE(DocumentEntry::HasHostedDocumentExtension( | |
| 397 FilePath(FILE_PATH_LITERAL("Test")))); | |
| 398 EXPECT_FALSE(DocumentEntry::HasHostedDocumentExtension( | |
| 399 FilePath(FILE_PATH_LITERAL("")))); | |
| 400 } | |
| 401 | |
| 402 } // namespace gdata | |
| OLD | NEW |