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

Unified Diff: base/files/file_util_unittest.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 | « base/environment.cc ('k') | base/nix/xdg_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_util_unittest.cc
diff --git a/base/files/file_util_unittest.cc b/base/files/file_util_unittest.cc
index 09c91566264dc45bdfedbe24ddeffcd805e6889b..153cd9cbd49122d9b328a95ea527cda0bd6858d0 100644
--- a/base/files/file_util_unittest.cc
+++ b/base/files/file_util_unittest.cc
@@ -34,7 +34,6 @@
#include <shlobj.h>
#include <tchar.h>
#include <winioctl.h>
-#include "base/environment.h"
#include "base/win/scoped_handle.h"
#include "base/win/windows_version.h"
#endif
@@ -1407,7 +1406,7 @@ TEST_F(FileUtilTest, CopyDirectoryWithTrailingSeparators) {
#if defined(OS_WIN)
FilePath from_path =
temp_dir_.path().Append(FILE_PATH_LITERAL("Copy_From_Subdir\\\\\\"));
-#elif defined (OS_POSIX)
+#elif defined(OS_POSIX)
FilePath from_path =
temp_dir_.path().Append(FILE_PATH_LITERAL("Copy_From_Subdir///"));
#endif
@@ -1725,9 +1724,7 @@ TEST_F(FileUtilTest, IsOnNetworkDrive) {
EXPECT_EQ(test_case.expected, observed) << " input: " << input.value();
}
- Environment* env = Environment::Create();
- ASSERT_TRUE(!!env);
-
+ std::unique_ptr<Environment> env(Environment::Create());
// To test IsOnNetworkDrive() for remote cases, set up a file server
// and place a file called file.txt on the server e.g.
// \\DC01\TESTSHARE\file.txt
« no previous file with comments | « base/environment.cc ('k') | base/nix/xdg_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698