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_parser.h" | 5 #include "chrome/browser/google_apis/gdata_wapi_parser.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 base::FilePath(FILE_PATH_LITERAL("Test.gdraw")))); | 317 base::FilePath(FILE_PATH_LITERAL("Test.gdraw")))); |
318 EXPECT_TRUE(ResourceEntry::HasHostedDocumentExtension( | 318 EXPECT_TRUE(ResourceEntry::HasHostedDocumentExtension( |
319 base::FilePath(FILE_PATH_LITERAL("Test.gtable")))); | 319 base::FilePath(FILE_PATH_LITERAL("Test.gtable")))); |
320 EXPECT_FALSE(ResourceEntry::HasHostedDocumentExtension( | 320 EXPECT_FALSE(ResourceEntry::HasHostedDocumentExtension( |
321 base::FilePath(FILE_PATH_LITERAL("Test.tar.gz")))); | 321 base::FilePath(FILE_PATH_LITERAL("Test.tar.gz")))); |
322 EXPECT_FALSE(ResourceEntry::HasHostedDocumentExtension( | 322 EXPECT_FALSE(ResourceEntry::HasHostedDocumentExtension( |
323 base::FilePath(FILE_PATH_LITERAL("Test.txt")))); | 323 base::FilePath(FILE_PATH_LITERAL("Test.txt")))); |
324 EXPECT_FALSE(ResourceEntry::HasHostedDocumentExtension( | 324 EXPECT_FALSE(ResourceEntry::HasHostedDocumentExtension( |
325 base::FilePath(FILE_PATH_LITERAL("Test")))); | 325 base::FilePath(FILE_PATH_LITERAL("Test")))); |
326 EXPECT_FALSE(ResourceEntry::HasHostedDocumentExtension( | 326 EXPECT_FALSE(ResourceEntry::HasHostedDocumentExtension( |
327 base::FilePath(FILE_PATH_LITERAL("")))); | 327 base::FilePath())); |
328 } | 328 } |
329 | 329 |
330 TEST(GDataWAPIParserTest, ResourceEntryClassifyEntryKind) { | 330 TEST(GDataWAPIParserTest, ResourceEntryClassifyEntryKind) { |
331 EXPECT_EQ(ResourceEntry::KIND_OF_NONE, | 331 EXPECT_EQ(ResourceEntry::KIND_OF_NONE, |
332 ResourceEntry::ClassifyEntryKind(ENTRY_KIND_UNKNOWN)); | 332 ResourceEntry::ClassifyEntryKind(ENTRY_KIND_UNKNOWN)); |
333 EXPECT_EQ(ResourceEntry::KIND_OF_NONE, | 333 EXPECT_EQ(ResourceEntry::KIND_OF_NONE, |
334 ResourceEntry::ClassifyEntryKind(ENTRY_KIND_ITEM)); | 334 ResourceEntry::ClassifyEntryKind(ENTRY_KIND_ITEM)); |
335 EXPECT_EQ(ResourceEntry::KIND_OF_NONE, | 335 EXPECT_EQ(ResourceEntry::KIND_OF_NONE, |
336 ResourceEntry::ClassifyEntryKind(ENTRY_KIND_SITE)); | 336 ResourceEntry::ClassifyEntryKind(ENTRY_KIND_SITE)); |
337 EXPECT_EQ(ResourceEntry::KIND_OF_GOOGLE_DOCUMENT | | 337 EXPECT_EQ(ResourceEntry::KIND_OF_GOOGLE_DOCUMENT | |
(...skipping 16 matching lines...) Expand all Loading... |
354 ResourceEntry::ClassifyEntryKind(ENTRY_KIND_EXTERNAL_APP)); | 354 ResourceEntry::ClassifyEntryKind(ENTRY_KIND_EXTERNAL_APP)); |
355 EXPECT_EQ(ResourceEntry::KIND_OF_FOLDER, | 355 EXPECT_EQ(ResourceEntry::KIND_OF_FOLDER, |
356 ResourceEntry::ClassifyEntryKind(ENTRY_KIND_FOLDER)); | 356 ResourceEntry::ClassifyEntryKind(ENTRY_KIND_FOLDER)); |
357 EXPECT_EQ(ResourceEntry::KIND_OF_FILE, | 357 EXPECT_EQ(ResourceEntry::KIND_OF_FILE, |
358 ResourceEntry::ClassifyEntryKind(ENTRY_KIND_FILE)); | 358 ResourceEntry::ClassifyEntryKind(ENTRY_KIND_FILE)); |
359 EXPECT_EQ(ResourceEntry::KIND_OF_FILE, | 359 EXPECT_EQ(ResourceEntry::KIND_OF_FILE, |
360 ResourceEntry::ClassifyEntryKind(ENTRY_KIND_PDF)); | 360 ResourceEntry::ClassifyEntryKind(ENTRY_KIND_PDF)); |
361 } | 361 } |
362 | 362 |
363 } // namespace google_apis | 363 } // namespace google_apis |
OLD | NEW |