OLD | NEW |
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 "apps/saved_files_service.h" | 5 #include "apps/saved_files_service.h" |
6 #include "base/files/file_util.h" | 6 #include "base/files/file_util.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/scoped_observer.h" | 8 #include "base/scoped_observer.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/apps/app_browsertest_util.h" | 10 #include "chrome/browser/apps/app_browsertest_util.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 service->RegisterFileEntry( | 57 service->RegisterFileEntry( |
58 extension->id(), "magic id", path_to_save, is_directory); | 58 extension->id(), "magic id", path_to_save, is_directory); |
59 } | 59 } |
60 | 60 |
61 const int kGraylistedPath = base::DIR_HOME; | 61 const int kGraylistedPath = base::DIR_HOME; |
62 | 62 |
63 } // namespace | 63 } // namespace |
64 | 64 |
65 class FileSystemApiTest : public PlatformAppBrowserTest { | 65 class FileSystemApiTest : public PlatformAppBrowserTest { |
66 public: | 66 public: |
67 void SetUpCommandLine(CommandLine* command_line) override { | 67 void SetUpCommandLine(base::CommandLine* command_line) override { |
68 PlatformAppBrowserTest::SetUpCommandLine(command_line); | 68 PlatformAppBrowserTest::SetUpCommandLine(command_line); |
69 test_root_folder_ = test_data_dir_.AppendASCII("api_test") | 69 test_root_folder_ = test_data_dir_.AppendASCII("api_test") |
70 .AppendASCII("file_system"); | 70 .AppendASCII("file_system"); |
71 FileSystemChooseEntryFunction::RegisterTempExternalFileSystemForTest( | 71 FileSystemChooseEntryFunction::RegisterTempExternalFileSystemForTest( |
72 "test_root", test_root_folder_); | 72 "test_root", test_root_folder_); |
73 } | 73 } |
74 | 74 |
75 void SetUpOnMainThread() override { ClearCommandLineArgs(); } | 75 void SetUpOnMainThread() override { ClearCommandLineArgs(); } |
76 | 76 |
77 void TearDown() override { | 77 void TearDown() override { |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 AppLoadObserver observer(profile(), | 626 AppLoadObserver observer(profile(), |
627 base::Bind(AddSavedEntry, | 627 base::Bind(AddSavedEntry, |
628 test_directory, | 628 test_directory, |
629 true, | 629 true, |
630 apps::SavedFilesService::Get(profile()))); | 630 apps::SavedFilesService::Get(profile()))); |
631 ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/restore_directory")) | 631 ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/restore_directory")) |
632 << message_; | 632 << message_; |
633 } | 633 } |
634 | 634 |
635 } // namespace extensions | 635 } // namespace extensions |
OLD | NEW |