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

Unified Diff: sandbox/win/src/address_sanitizer_test.cc

Issue 2094913002: Make base::Environment::Create() return unique_ptrs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit, rebase Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/linux/suid/client/setuid_sandbox_host.cc ('k') | ui/base/l10n/l10n_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/address_sanitizer_test.cc
diff --git a/sandbox/win/src/address_sanitizer_test.cc b/sandbox/win/src/address_sanitizer_test.cc
index f845ad8b3256dcd39c26c23ffb5318d432ff86bf..75fb0eb64319f9d46401963cdddc3bc3fb121db0 100644
--- a/sandbox/win/src/address_sanitizer_test.cc
+++ b/sandbox/win/src/address_sanitizer_test.cc
@@ -21,7 +21,7 @@ namespace sandbox {
class AddressSanitizerTests : public ::testing::Test {
public:
void SetUp() override {
- env_.reset(base::Environment::Create());
+ env_ = base::Environment::Create();
had_asan_options_ = env_->GetVar("ASAN_OPTIONS", &old_asan_options_);
}
@@ -42,7 +42,7 @@ SBOX_TESTS_COMMAND int AddressSanitizerTests_Report(int argc, wchar_t** argv) {
// AddressSanitizer should detect an out of bounds write (heap buffer
// overflow) in this code.
volatile int idx = 42;
- int *volatile blah = new int[42];
+ int* volatile blah = new int[42];
blah[idx] = 42;
delete [] blah;
return SBOX_TEST_FAILED;
@@ -79,7 +79,7 @@ TEST_F(AddressSanitizerTests, TestAddressSanitizer) {
base::FilePath exe;
ASSERT_TRUE(PathService::Get(base::FILE_EXE, &exe));
base::FilePath pdb_path = exe.DirName().Append(L"*.pdb");
- ASSERT_TRUE(runner.AddFsRule(sandbox::TargetPolicy::FILES_ALLOW_READONLY,
+ ASSERT_TRUE(runner.AddFsRule(TargetPolicy::FILES_ALLOW_READONLY,
pdb_path.value().c_str()));
env_->SetVar("ASAN_OPTIONS", "exitcode=123");
@@ -105,4 +105,4 @@ TEST_F(AddressSanitizerTests, TestAddressSanitizer) {
}
}
-}
+} // namespace sandbox
« no previous file with comments | « sandbox/linux/suid/client/setuid_sandbox_host.cc ('k') | ui/base/l10n/l10n_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698