Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / api / file_system / file_system_apitest_chromeos.cc
index 400b27e..b6e67fa 100644 (file)
@@ -61,16 +61,13 @@ class FileSystemApiTestForDrive : public PlatformAppBrowserTest {
   drive::DriveIntegrationService* CreateDriveIntegrationService(
       Profile* profile) {
     fake_drive_service_ = new drive::FakeDriveService;
-    fake_drive_service_->LoadResourceListForWapi(
-        "gdata/empty_feed.json");
-    fake_drive_service_->LoadAccountMetadataForWapi(
-        "gdata/account_metadata.json");
     fake_drive_service_->LoadAppListForDriveApi("drive/applist.json");
 
     SetUpTestFileHierarchy();
 
     integration_service_ = new drive::DriveIntegrationService(
-        profile, NULL, fake_drive_service_, test_cache_root_.path(), NULL);
+        profile, NULL, fake_drive_service_, std::string(),
+        test_cache_root_.path(), NULL);
     return integration_service_;
   }
 
@@ -101,6 +98,7 @@ class FileSystemApiTestForDrive : public PlatformAppBrowserTest {
     google_apis::GDataErrorCode error = google_apis::GDATA_OTHER_ERROR;
     fake_drive_service_->AddNewDirectory(
         parent_id, title,
+        drive::DriveServiceInterface::AddNewDirectoryOptions(),
         google_apis::test_util::CreateCopyResultCallback(&error,
                                                          &resource_entry));
     content::RunAllPendingInMessageLoop();
@@ -119,8 +117,8 @@ class FileSystemApiTestForDrive : public PlatformAppBrowserTest {
 
 IN_PROC_BROWSER_TEST_F(FileSystemApiTestForDrive,
                        FileSystemApiOpenExistingFileTest) {
-  base::FilePath test_file = drive::util::GetDriveMountPointPath().AppendASCII(
-      "root/open_existing.txt");
+  base::FilePath test_file = drive::util::GetDriveMountPointPath(
+      browser()->profile()).AppendASCII("root/open_existing.txt");
   FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
       &test_file);
   ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/open_existing"))
@@ -129,8 +127,8 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTestForDrive,
 
 IN_PROC_BROWSER_TEST_F(FileSystemApiTestForDrive,
                        FileSystemApiOpenExistingFileWithWriteTest) {
-  base::FilePath test_file = drive::util::GetDriveMountPointPath().AppendASCII(
-      "root/open_existing.txt");
+  base::FilePath test_file = drive::util::GetDriveMountPointPath(
+      browser()->profile()).AppendASCII("root/open_existing.txt");
   FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
       &test_file);
   ASSERT_TRUE(RunPlatformAppTest(
@@ -140,7 +138,8 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTestForDrive,
 IN_PROC_BROWSER_TEST_F(FileSystemApiTestForDrive,
                        FileSystemApiOpenDirectoryTest) {
   base::FilePath test_directory =
-      drive::util::GetDriveMountPointPath().AppendASCII("root/subdir");
+      drive::util::GetDriveMountPointPath(browser()->profile()).AppendASCII(
+          "root/subdir");
   FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
       &test_directory);
   ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/open_directory"))
@@ -150,7 +149,8 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTestForDrive,
 IN_PROC_BROWSER_TEST_F(FileSystemApiTestForDrive,
                        FileSystemApiOpenDirectoryWithWriteTest) {
   base::FilePath test_directory =
-      drive::util::GetDriveMountPointPath().AppendASCII("root/subdir");
+      drive::util::GetDriveMountPointPath(browser()->profile()).AppendASCII(
+          "root/subdir");
   FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
       &test_directory);
   ASSERT_TRUE(
@@ -161,7 +161,8 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTestForDrive,
 IN_PROC_BROWSER_TEST_F(FileSystemApiTestForDrive,
                        FileSystemApiOpenDirectoryWithoutPermissionTest) {
   base::FilePath test_directory =
-      drive::util::GetDriveMountPointPath().AppendASCII("root/subdir");
+      drive::util::GetDriveMountPointPath(browser()->profile()).AppendASCII(
+          "root/subdir");
   FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
       &test_directory);
   ASSERT_TRUE(RunPlatformAppTest(
@@ -172,7 +173,8 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTestForDrive,
 IN_PROC_BROWSER_TEST_F(FileSystemApiTestForDrive,
                        FileSystemApiOpenDirectoryWithOnlyWritePermissionTest) {
   base::FilePath test_directory =
-      drive::util::GetDriveMountPointPath().AppendASCII("root/subdir");
+      drive::util::GetDriveMountPointPath(browser()->profile()).AppendASCII(
+          "root/subdir");
   FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
       &test_directory);
   ASSERT_TRUE(RunPlatformAppTest(