chrome/browser/chromeos/drive/drive_file_system_unittest.cc
// TODO(satorux): Testing if WebAppsRegistry is loaded here is awkward. We
// should move this to drive_feed_loader_unittest.cc. crbug.com/161703
Testing if WebAppsRegistry is loaded here is awkward. We
should move this to drive_feed_loader_unittest.cc.
Testing if WebAppsRegistry is loaded here is awkward . We should move this to drive_feed_loader_unittest . cc .
TEST_F(DriveFileSystemTest, WebAppsRegistryIsLoaded) {
  SaveTestFileSystem(USE_SERVER_TIMESTAMP);
  ScopedVector<DriveWebAppInfo> apps;
  drive_webapps_registry_->GetWebAppsForFile(
      FilePath::FromUTF8Unsafe("foo.ext_1"),
      "" ,
      &apps);
  EXPECT_TRUE(apps.empty());
  EXPECT_CALL(*mock_drive_service_, GetAccountMetadata(_)).Times(1);
  EXPECT_TRUE(EntryExists(FilePath(FILE_PATH_LITERAL("drive/File1"))));
  drive_webapps_registry_->GetWebAppsForFile(
      FilePath(FILE_PATH_LITERAL("foo.ext_1")),
      "" ,
      &apps);
  EXPECT_EQ(1U, apps.size());
}
TEST_F ( DriveFileSystemTest , WebAppsRegistryIsLoaded ) { SaveTestFileSystem ( USE_SERVER_TIMESTAMP ) ; ScopedVector < DriveWebAppInfo > apps ; drive_webapps_registry_ -> GetWebAppsForFile ( FilePath :: FromUTF8Unsafe ( " " ) , " " , & apps ) ; EXPECT_TRUE ( apps . empty ( ) ) ; EXPECT_CALL ( * mock_drive_service_ , GetAccountMetadata ( _ ) ) . Times ( 1 ) ; EXPECT_TRUE ( EntryExists ( FilePath ( FILE_PATH_LITERAL ( " " ) ) ) ) ; drive_webapps_registry_ -> GetWebAppsForFile ( FilePath ( FILE_PATH_LITERAL ( " " ) ) , " " , & apps ) ; EXPECT_EQ ( 1U , apps . size ( ) ) ; }
TODO(satorux): Testing if WebAppsRegistry is loaded here is awkward.
TODO ( satorux ) : Testing if WebAppsRegistry is loaded here is awkward .
// No apps should be found as the webapps registry is empty. /* mime_type */ // Kicks loading of cached file system and query for server update. This // will cause GetAccountMetadata() to be called, to check the server-side // changestamp, and the webapps registry will be loaded at the same time. // An app for foo.ext_1 should now be found, as the registry was loaded. /* mime_type */