chrome/browser/chromeos/drive/drive_file_system_unittest.cc
// Create a directory through the document service
Create a directory through the document service
Create a directory through the document service
TEST_F(DriveFileSystemTest, CreateDirectoryWithService) {
  ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
  EXPECT_CALL(*mock_drive_service_,
              AddNewDirectory(_, "Sample Directory Title", _)).Times(1);
  EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
      Eq(FilePath(FILE_PATH_LITERAL("drive"))))).Times(1);
  callback_helper_->last_error_ = static_cast<DriveFileError>(1);
  file_system_->CreateDirectory(
      FilePath(FILE_PATH_LITERAL("drive/Sample Directory Title")),
      false,  
      true,  
      base::Bind(&CallbackHelper::FileOperationCallback,
                 callback_helper_.get()));
  google_apis::test_util::RunBlockingPoolTask();
}
TEST_F ( DriveFileSystemTest , CreateDirectoryWithService ) { ASSERT_TRUE ( LoadRootFeedDocument ( " " ) ) ; EXPECT_CALL ( * mock_drive_service_ , AddNewDirectory ( _ , " " , _ ) ) . Times ( 1 ) ; EXPECT_CALL ( * mock_directory_observer_ , OnDirectoryChanged ( Eq ( FilePath ( FILE_PATH_LITERAL ( " " ) ) ) ) ) . Times ( 1 ) ; callback_helper_ -> last_error_ = static_cast < DriveFileError > ( 1 ) ; file_system_ -> CreateDirectory ( FilePath ( FILE_PATH_LITERAL ( " " ) ) , false , true , base :: Bind ( & CallbackHelper :: FileOperationCallback , callback_helper_ . get ( ) ) ) ; google_apis :: test_util :: RunBlockingPoolTask ( ) ; }
Create a directory through the document service
Create a directory through the document service
// Set last error so it's not a valid error code. // is_exclusive // is_recursive // TODO(gspencer): Uncomment this when we get a blob that // works that can be returned from the mock. // EXPECT_EQ(DRIVE_FILE_OK, callback_helper_->last_error_);