| Index: chrome/browser/extensions/api/file_system/file_system_apitest.cc | 
| diff --git a/chrome/browser/extensions/api/file_system/file_system_apitest.cc b/chrome/browser/extensions/api/file_system/file_system_apitest.cc | 
| index ab7c4d5e32d4d93a6b3c5159a19a894cbee1d537..3127b4ae62c30aa8b53e31c2fd77cb9627830b49 100644 | 
| --- a/chrome/browser/extensions/api/file_system/file_system_apitest.cc | 
| +++ b/chrome/browser/extensions/api/file_system/file_system_apitest.cc | 
| @@ -97,6 +97,30 @@ class FileSystemApiTest : public PlatformAppBrowserTest { | 
| return destination; | 
| } | 
|  | 
| +  std::vector<base::FilePath> TempFilePaths( | 
| +      const std::vector<std::string>& destination_names, | 
| +      bool copy_gold) { | 
| +    if (!temp_dir_.CreateUniqueTempDir()) { | 
| +      ADD_FAILURE() << "CreateUniqueTempDir failed"; | 
| +      return std::vector<base::FilePath>(); | 
| +    } | 
| +    FileSystemChooseEntryFunction::RegisterTempExternalFileSystemForTest( | 
| +        "test_temp", temp_dir_.path()); | 
| + | 
| +    std::vector<base::FilePath> result; | 
| +    for (std::vector<std::string>::const_iterator it = | 
| +             destination_names.begin(); | 
| +         it != destination_names.end(); ++it) { | 
| +      base::FilePath destination = temp_dir_.path().AppendASCII(*it); | 
| +      if (copy_gold) { | 
| +        base::FilePath source = test_root_folder_.AppendASCII("gold.txt"); | 
| +        EXPECT_TRUE(file_util::CopyFile(source, destination)); | 
| +      } | 
| +      result.push_back(destination); | 
| +    } | 
| +    return result; | 
| +  } | 
| + | 
| void CheckStoredDirectoryMatches(const base::FilePath& filename) { | 
| const Extension* extension = GetSingleLoadedExtension(); | 
| ASSERT_TRUE(extension); | 
| @@ -223,6 +247,19 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, | 
| } | 
|  | 
| IN_PROC_BROWSER_TEST_F(FileSystemApiTest, | 
| +                       FileSystemApiOpenMultipleExistingFilesTest) { | 
| +  std::vector<std::string> names; | 
| +  names.push_back("open_existing1.txt"); | 
| +  names.push_back("open_existing2.txt"); | 
| +  std::vector<base::FilePath> test_files = TempFilePaths(names, true); | 
| +  ASSERT_EQ(2u, test_files.size()); | 
| +  FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathsForTest( | 
| +      &test_files); | 
| +  ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/open_multiple_existing")) | 
| +      << message_; | 
| +} | 
| + | 
| +IN_PROC_BROWSER_TEST_F(FileSystemApiTest, | 
| FileSystemApiInvalidChooseEntryTypeTest) { | 
| base::FilePath test_file = TempFilePath("open_existing.txt", true); | 
| ASSERT_FALSE(test_file.empty()); | 
| @@ -272,6 +309,20 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, | 
| CheckStoredDirectoryMatches(test_file); | 
| } | 
|  | 
| +IN_PROC_BROWSER_TEST_F(FileSystemApiTest, | 
| +                       FileSystemApiOpenMultipleWritableExistingFilesTest) { | 
| +  std::vector<std::string> names; | 
| +  names.push_back("open_existing1.txt"); | 
| +  names.push_back("open_existing2.txt"); | 
| +  std::vector<base::FilePath> test_files = TempFilePaths(names, true); | 
| +  ASSERT_EQ(2u, test_files.size()); | 
| +  FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathsForTest( | 
| +      &test_files); | 
| +  ASSERT_TRUE(RunPlatformAppTest( | 
| +      "api_test/file_system/open_multiple_writable_existing_with_write")) | 
| +      << message_; | 
| +} | 
| + | 
| IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiOpenCancelTest) { | 
| FileSystemChooseEntryFunction::SkipPickerAndAlwaysCancelForTest(); | 
| ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/open_cancel")) | 
| @@ -326,6 +377,18 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, | 
| CheckStoredDirectoryMatches(test_file); | 
| } | 
|  | 
| +IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiSaveMultipleFilesTest) { | 
| +  std::vector<std::string> names; | 
| +  names.push_back("save1.txt"); | 
| +  names.push_back("save2.txt"); | 
| +  std::vector<base::FilePath> test_files = TempFilePaths(names, false); | 
| +  ASSERT_EQ(2u, test_files.size()); | 
| +  FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathsForTest( | 
| +      &test_files); | 
| +  ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/save_multiple")) | 
| +      << message_; | 
| +} | 
| + | 
| IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiSaveCancelTest) { | 
| FileSystemChooseEntryFunction::SkipPickerAndAlwaysCancelForTest(); | 
| ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/save_cancel")) | 
|  |