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 #include <string> | 4 #include <string> |
5 #include <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/json/json_file_value_serializer.h" | 9 #include "base/json/json_file_value_serializer.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
431 | 431 |
432 // Existing folder. | 432 // Existing folder. |
433 EXPECT_EQ( | 433 EXPECT_EQ( |
434 file_system_->FindFirstMissingParentDirectory( | 434 file_system_->FindFirstMissingParentDirectory( |
435 FilePath("gdata/Directory 1"), | 435 FilePath("gdata/Directory 1"), |
436 &last_dir_content_url, | 436 &last_dir_content_url, |
437 &first_missing_parent_path), | 437 &first_missing_parent_path), |
438 GDataFileSystem::DIRECTORY_ALREADY_PRESENT); | 438 GDataFileSystem::DIRECTORY_ALREADY_PRESENT); |
439 } | 439 } |
440 | 440 |
441 TEST_F(GDataFileSystemTest, GetFile) { | |
442 // TODO(satorux): Write a test once DocumentsService is mockable. | |
zel
2012/03/02 23:44:04
maybe remove this test for now and just leave the
satorux1
2012/03/03 00:39:10
Done.
| |
443 } | |
444 | |
445 TEST_F(GDataFileSystemTest, GetGDataFileInfoFromPath) { | |
446 LoadRootFeedDocument("root_feed.json"); | |
447 | |
448 GDataFileBase* file_info = file_system_->GetGDataFileInfoFromPath( | |
449 FilePath(FILE_PATH_LITERAL("gdata/File 1.txt"))); | |
450 ASSERT_TRUE(file_info != NULL); | |
451 EXPECT_EQ("https://file_link_self/", file_info->self_url().spec()); | |
452 EXPECT_EQ("https://file_content_url/", file_info->content_url().spec()); | |
453 | |
454 GDataFileBase* non_existent = file_system_->GetGDataFileInfoFromPath( | |
455 FilePath(FILE_PATH_LITERAL("gdata/Nonexistent.txt"))); | |
456 ASSERT_TRUE(non_existent == NULL); | |
457 } | |
458 | |
441 } // namespace gdata | 459 } // namespace gdata |
OLD | NEW |