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

Side by Side Diff: components/drive/file_system_unittest.cc

Issue 2059143002: "up-to-date" should only use hyphens when used as compound modifier of a noun (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 unified diff | Download patch
OLDNEW
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 "components/drive/chromeos/file_system.h" 5 #include "components/drive/chromeos/file_system.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 EXPECT_EQ(3U, entries->size()); 718 EXPECT_EQ(3U, entries->size());
719 } 719 }
720 720
721 TEST_F(FileSystemTest, LoadFileSystemFromUpToDateCache) { 721 TEST_F(FileSystemTest, LoadFileSystemFromUpToDateCache) {
722 ASSERT_NO_FATAL_FAILURE(SetUpTestFileSystem(USE_SERVER_TIMESTAMP)); 722 ASSERT_NO_FATAL_FAILURE(SetUpTestFileSystem(USE_SERVER_TIMESTAMP));
723 723
724 // Kicks loading of cached file system and query for server update. 724 // Kicks loading of cached file system and query for server update.
725 EXPECT_TRUE(ReadDirectorySync(util::GetDriveMyDriveRootPath())); 725 EXPECT_TRUE(ReadDirectorySync(util::GetDriveMyDriveRootPath()));
726 726
727 // SetUpTestFileSystem and FakeDriveService have the same 727 // SetUpTestFileSystem and FakeDriveService have the same
728 // changestamp (i.e. the local metadata is up-to-date), so no request for 728 // changestamp (i.e. the local metadata is up to date), so no request for
729 // new resource list (i.e., call to GetResourceList) should happen. 729 // new resource list (i.e., call to GetResourceList) should happen.
730 EXPECT_EQ(0, fake_drive_service_->file_list_load_count()); 730 EXPECT_EQ(0, fake_drive_service_->file_list_load_count());
731 731
732 // Since the file system has verified that it holds the latest snapshot, 732 // Since the file system has verified that it holds the latest snapshot,
733 // it should change its state to "loaded", which admits periodic refresh. 733 // it should change its state to "loaded", which admits periodic refresh.
734 // To test it, call CheckForUpdates and verify it does try to check updates. 734 // To test it, call CheckForUpdates and verify it does try to check updates.
735 const int about_resource_load_count_before = 735 const int about_resource_load_count_before =
736 fake_drive_service_->about_resource_load_count(); 736 fake_drive_service_->about_resource_load_count();
737 file_system_->CheckForUpdates(); 737 file_system_->CheckForUpdates();
738 content::RunAllBlockingPoolTasksUntilIdle(); 738 content::RunAllBlockingPoolTasksUntilIdle();
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 google_apis::test_util::CreateCopyResultCallback(&available)); 1064 google_apis::test_util::CreateCopyResultCallback(&available));
1065 content::RunAllBlockingPoolTasksUntilIdle(); 1065 content::RunAllBlockingPoolTasksUntilIdle();
1066 ASSERT_FALSE(available); 1066 ASSERT_FALSE(available);
1067 1067
1068 entry = GetResourceEntrySync(file_in_root); 1068 entry = GetResourceEntrySync(file_in_root);
1069 ASSERT_TRUE(entry); 1069 ASSERT_TRUE(entry);
1070 EXPECT_FALSE(entry->file_specific_info().cache_state().is_present()); 1070 EXPECT_FALSE(entry->file_specific_info().cache_state().is_present());
1071 } 1071 }
1072 1072
1073 } // namespace drive 1073 } // namespace drive
OLDNEW
« no previous file with comments | « components/drive/chromeos/sync_client.h ('k') | components/history/core/browser/history_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698