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

Side by Side Diff: sandbox/win/src/file_policy_test.cc

Issue 10910125: Disable FilePolicyTest, DISABLED_TestReparsePoint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <algorithm> 5 #include <algorithm>
6 #include <cctype> 6 #include <cctype>
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <winioctl.h> 9 #include <winioctl.h>
10 10
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 // denied since there is no wild card in the rule. 511 // denied since there is no wild card in the rule.
512 EXPECT_TRUE(runner.AddRuleSys32(TargetPolicy::FILES_ALLOW_DIR_ANY, L"")); 512 EXPECT_TRUE(runner.AddRuleSys32(TargetPolicy::FILES_ALLOW_DIR_ANY, L""));
513 runner.SetTestState(BEFORE_REVERT); 513 runner.SetTestState(BEFORE_REVERT);
514 EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(L"File_GetDiskSpace")); 514 EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(L"File_GetDiskSpace"));
515 515
516 runner.SetTestState(AFTER_REVERT); 516 runner.SetTestState(AFTER_REVERT);
517 EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(L"File_GetDiskSpace")); 517 EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(L"File_GetDiskSpace"));
518 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"File_Win32Create notepad.exe")); 518 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"File_Win32Create notepad.exe"));
519 } 519 }
520 520
521 TEST(FilePolicyTest, TestReparsePoint) { 521 // http://crbug.com/146944
522 TEST(FilePolicyTest, DISABLED_TestReparsePoint) {
522 TestRunner runner; 523 TestRunner runner;
523 524
524 // Create a temp file because we need write access to it. 525 // Create a temp file because we need write access to it.
525 wchar_t temp_directory[MAX_PATH]; 526 wchar_t temp_directory[MAX_PATH];
526 wchar_t temp_file_name[MAX_PATH]; 527 wchar_t temp_file_name[MAX_PATH];
527 ASSERT_NE(::GetTempPath(MAX_PATH, temp_directory), 0u); 528 ASSERT_NE(::GetTempPath(MAX_PATH, temp_directory), 0u);
528 ASSERT_NE(::GetTempFileName(temp_directory, L"test", 0, temp_file_name), 0u); 529 ASSERT_NE(::GetTempFileName(temp_directory, L"test", 0, temp_file_name), 0u);
529 530
530 // Delete the file and create a directory instead. 531 // Delete the file and create a directory instead.
531 ASSERT_TRUE(::DeleteFile(temp_file_name)); 532 ASSERT_TRUE(::DeleteFile(temp_file_name));
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 EXPECT_TRUE(INVALID_HANDLE_VALUE != dir); 590 EXPECT_TRUE(INVALID_HANDLE_VALUE != dir);
590 EXPECT_TRUE(DeleteReparsePoint(dir)); 591 EXPECT_TRUE(DeleteReparsePoint(dir));
591 EXPECT_TRUE(::CloseHandle(dir)); 592 EXPECT_TRUE(::CloseHandle(dir));
592 593
593 // Cleanup. 594 // Cleanup.
594 EXPECT_TRUE(::DeleteFile(temp_file_in_temp.c_str())); 595 EXPECT_TRUE(::DeleteFile(temp_file_in_temp.c_str()));
595 EXPECT_TRUE(::RemoveDirectory(subfolder.c_str())); 596 EXPECT_TRUE(::RemoveDirectory(subfolder.c_str()));
596 } 597 }
597 598
598 } // namespace sandbox 599 } // namespace sandbox
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698