| Index: content/common/sandbox_mac_diraccess_unittest.mm
|
| diff --git a/content/common/sandbox_mac_diraccess_unittest.mm b/content/common/sandbox_mac_diraccess_unittest.mm
|
| index 302147bbf2772f4adc82a9a8aa2399d5a69f18bc..d4b0dd16b614d3e982e248ee466493a2bd6a97c3 100644
|
| --- a/content/common/sandbox_mac_diraccess_unittest.mm
|
| +++ b/content/common/sandbox_mac_diraccess_unittest.mm
|
| @@ -130,18 +130,6 @@ TEST_F(MacDirAccessSandboxTest, RegexEscape) {
|
| }
|
| }
|
|
|
| -// A class to handle auto-deleting a directory.
|
| -class ScopedDirectoryDelete {
|
| - public:
|
| - inline void operator()(FilePath* x) const {
|
| - if (x) {
|
| - file_util::Delete(*x, true);
|
| - }
|
| - }
|
| -};
|
| -
|
| -typedef scoped_ptr_malloc<FilePath, ScopedDirectoryDelete> ScopedDirectory;
|
| -
|
| // Disabled as times out, taking out remaining tests: 89170.
|
| TEST_F(MacDirAccessSandboxTest, DISABLED_SandboxAccess) {
|
| using file_util::CreateDirectory;
|
| @@ -152,7 +140,7 @@ TEST_F(MacDirAccessSandboxTest, DISABLED_SandboxAccess) {
|
| // paths and the paths CreateNewTempDirectory() returns are empirically in
|
| // /var which is a symlink to /private/var .
|
| Sandbox::GetCanonicalSandboxPath(&tmp_dir);
|
| - ScopedDirectory cleanup(&tmp_dir);
|
| + file_util::ScopedDirectory cleanup(&tmp_dir);
|
|
|
| const char* sandbox_dir_cases[] = {
|
| "simple_dir_name",
|
| @@ -164,7 +152,7 @@ TEST_F(MacDirAccessSandboxTest, DISABLED_SandboxAccess) {
|
| const char* sandbox_dir_name = sandbox_dir_cases[i];
|
| FilePath sandbox_dir = tmp_dir.Append(sandbox_dir_name);
|
| ASSERT_TRUE(CreateDirectory(sandbox_dir));
|
| - ScopedDirectory cleanup_sandbox(&sandbox_dir);
|
| + file_util::ScopedDirectory cleanup_sandbox(&sandbox_dir);
|
|
|
| // Create a sibling directory of the sandbox dir, whose name has sandbox dir
|
| // as a substring but to which access is denied.
|
| @@ -173,7 +161,7 @@ TEST_F(MacDirAccessSandboxTest, DISABLED_SandboxAccess) {
|
| FilePath sibling_sandbox_dir = tmp_dir.Append(
|
| sibling_sandbox_dir_name_denied.c_str());
|
| ASSERT_TRUE(CreateDirectory(sibling_sandbox_dir));
|
| - ScopedDirectory cleanup_sandbox_sibling(&sibling_sandbox_dir);
|
| + file_util::ScopedDirectory cleanup_sandbox_sibling(&sibling_sandbox_dir);
|
|
|
| EXPECT_TRUE(CheckSandbox(sandbox_dir.value()));
|
| }
|
|
|