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

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

Issue 1814863004: Cleanup/Remove Windows XP/Vista version checks from Windows sandbox code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert disabled reparse point check Created 4 years, 9 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
« no previous file with comments | « sandbox/win/src/file_policy_test.cc ('k') | sandbox/win/src/integrity_level_test.cc » ('j') | 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) 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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/win/scoped_handle.h" 9 #include "base/win/scoped_handle.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 24 matching lines...) Expand all
35 ASSERT_TRUE(tmp_handle.IsValid()); 35 ASSERT_TRUE(tmp_handle.IsValid());
36 36
37 TestRunner runner; 37 TestRunner runner;
38 ASSERT_EQ(SBOX_ALL_OK, runner.GetPolicy()->SetStdoutHandle(tmp_handle.Get())); 38 ASSERT_EQ(SBOX_ALL_OK, runner.GetPolicy()->SetStdoutHandle(tmp_handle.Get()));
39 int result = runner.RunTest(L"HandleInheritanceTests_PrintToStdout"); 39 int result = runner.RunTest(L"HandleInheritanceTests_PrintToStdout");
40 ASSERT_EQ(SBOX_TEST_SUCCEEDED, result); 40 ASSERT_EQ(SBOX_TEST_SUCCEEDED, result);
41 41
42 std::string data; 42 std::string data;
43 ASSERT_TRUE(base::ReadFileToString(base::FilePath(temp_file_name), &data)); 43 ASSERT_TRUE(base::ReadFileToString(base::FilePath(temp_file_name), &data));
44 // Redirection uses a feature that was added in Windows Vista. 44 // Redirection uses a feature that was added in Windows Vista.
45 if (base::win::GetVersion() >= base::win::VERSION_VISTA) { 45 ASSERT_EQ("Example output to stdout\r\n", data);
46 ASSERT_EQ("Example output to stdout\r\n", data);
47 } else {
48 ASSERT_EQ("", data);
49 }
50 } 46 }
51 47
52 } // namespace sandbox 48 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/file_policy_test.cc ('k') | sandbox/win/src/integrity_level_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698