Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: chrome/browser/extensions/api/file_system/file_system_apitest.cc

Issue 11359217: Move scoped_temp_dir from base to base/files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "chrome/browser/extensions/api/file_system/file_system_api.h" 7 #include "chrome/browser/extensions/api/file_system/file_system_api.h"
8 #include "chrome/browser/extensions/platform_app_browsertest_util.h" 8 #include "chrome/browser/extensions/platform_app_browsertest_util.h"
9 9
10 using extensions::FileSystemChooseEntryFunction; 10 using extensions::FileSystemChooseEntryFunction;
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 FilePath destination = temp_dir_.path().AppendASCII(destination_name); 31 FilePath destination = temp_dir_.path().AppendASCII(destination_name);
32 if (copy_gold) { 32 if (copy_gold) {
33 FilePath source = test_root_folder_.AppendASCII("gold.txt"); 33 FilePath source = test_root_folder_.AppendASCII("gold.txt");
34 EXPECT_TRUE(file_util::CopyFile(source, destination)); 34 EXPECT_TRUE(file_util::CopyFile(source, destination));
35 } 35 }
36 return destination; 36 return destination;
37 } 37 }
38 38
39 FilePath test_root_folder_; 39 FilePath test_root_folder_;
40 ScopedTempDir temp_dir_; 40 base::ScopedTempDir temp_dir_;
41 }; 41 };
42 42
43 IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetDisplayPath) { 43 IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetDisplayPath) {
44 FilePath test_file = test_root_folder_.AppendASCII("gold.txt"); 44 FilePath test_file = test_root_folder_.AppendASCII("gold.txt");
45 FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest( 45 FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
46 &test_file); 46 &test_file);
47 ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/get_display_path")) 47 ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/get_display_path"))
48 << message_; 48 << message_;
49 } 49 }
50 50
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } 213 }
214 214
215 IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiIsWritableTest) { 215 IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiIsWritableTest) {
216 FilePath test_file = TempFilePath("writable.txt", true); 216 FilePath test_file = TempFilePath("writable.txt", true);
217 ASSERT_FALSE(test_file.empty()); 217 ASSERT_FALSE(test_file.empty());
218 FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest( 218 FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
219 &test_file); 219 &test_file);
220 ASSERT_TRUE(RunPlatformAppTest( 220 ASSERT_TRUE(RunPlatformAppTest(
221 "api_test/file_system/is_writable_file_entry")) << message_; 221 "api_test/file_system/is_writable_file_entry")) << message_;
222 } 222 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698