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

Unified Diff: base/files/file_util_unittest.cc

Issue 2434103005: Do not replace up-to-date System Flash with Component Flash. (Closed)
Patch Set: Through #10 Created 4 years, 2 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/files/file_util.h ('k') | base/files/file_util_win.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 f189ce296ce27a723fc5950f25d48ec827acd74d..7ef60a4b29881d0016adf5564956f5d1c749bd0a 100644
--- a/base/files/file_util_unittest.cc
+++ b/base/files/file_util_unittest.cc
@@ -1709,61 +1709,6 @@ TEST_F(FileUtilTest, GetTempDirTest) {
::_tputenv_s(kTmpKey, _T(""));
}
}
-
-TEST_F(FileUtilTest, IsOnNetworkDrive) {
- struct LocalTestData {
- const FilePath::CharType* input;
- bool expected;
- };
-
- const LocalTestData local_cases[] = {
- { FPL(""), false },
- { FPL("c:\\"), false },
- { FPL("c:"), false },
- { FPL("c:\\windows\\notepad.exe"), false }
- };
-
- for (const auto& test_case : local_cases) {
- FilePath input(test_case.input);
- bool observed = IsOnNetworkDrive(input);
- EXPECT_EQ(test_case.expected, observed) << " input: " << input.value();
- }
-
- 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
- // then set the two environment variables:
- // set BASE_TEST_FILE_SERVER=DC01
- // set BASE_TEST_FILE_SHARE=TESTSHARE
- if (!env->HasVar("BASE_TEST_FILE_SERVER") ||
- !env->HasVar("BASE_TEST_FILE_SHARE")) {
- return;
- }
-
- struct NetworkTestData {
- const wchar_t* input;
- bool expected;
- };
-
- const NetworkTestData network_cases[] = {
- { L"\\\\%BASE_TEST_FILE_SERVER%", false },
- { L"\\\\%BASE_TEST_FILE_SERVER%\\", false },
- { L"\\\\%BASE_TEST_FILE_SERVER%\\file.txt", false },
- { L"\\\\%BASE_TEST_FILE_SERVER%\\%BASE_TEST_FILE_SHARE%", true },
- { L"\\\\%BASE_TEST_FILE_SERVER%\\%BASE_TEST_FILE_SHARE%\\", true },
- { L"\\\\%BASE_TEST_FILE_SERVER%\\%BASE_TEST_FILE_SHARE%\\file.txt", true },
- { L"\\\\%BASE_TEST_FILE_SERVER%\\%BASE_TEST_FILE_SHARE%\\no.txt", false }
- };
-
- for (const auto& test_case : network_cases) {
- wchar_t path[MAX_PATH] = {0};
- ::ExpandEnvironmentStringsW(test_case.input, path, arraysize(path));
- FilePath input(path);
- EXPECT_EQ(test_case.expected, IsOnNetworkDrive(input)) << " input : "
- << input.value();
- }
-}
#endif // OS_WIN
TEST_F(FileUtilTest, CreateTemporaryFileTest) {
« no previous file with comments | « base/files/file_util.h ('k') | base/files/file_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698