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) { |