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

Unified Diff: content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc

Issue 1469153006: Treat '...' as a non-parent path component outside of Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DLOG(WARNING) Created 5 years, 1 month 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_path_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc
diff --git a/content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc b/content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc
index fd25aa7f93774d865f2a5b127e06aa0b9ad98481..3031968d502e4c45e6ada693e61195e0f60633b9 100644
--- a/content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc
+++ b/content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc
@@ -9,6 +9,7 @@
#include "base/files/scoped_temp_dir.h"
#include "base/memory/scoped_ptr.h"
#include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
#include "content/public/test/test_file_system_options.h"
#include "storage/browser/fileapi/file_system_url.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -66,6 +67,7 @@ TEST_F(SandboxFileSystemBackendDelegateTest, IsAccessValid) {
EXPECT_FALSE(IsAccessValid(CreateFileSystemURL(".")));
EXPECT_FALSE(IsAccessValid(CreateFileSystemURL("..")));
+#if defined(OS_WIN)
// This is also disallowed due to Windows XP parent path handling.
EXPECT_FALSE(IsAccessValid(CreateFileSystemURL("...")));
@@ -73,6 +75,11 @@ TEST_F(SandboxFileSystemBackendDelegateTest, IsAccessValid) {
// on Windows.
EXPECT_FALSE(IsAccessValid(CreateFileSystemURL(" ..")));
EXPECT_FALSE(IsAccessValid(CreateFileSystemURL(".. ")));
+#else
+ EXPECT_TRUE(IsAccessValid(CreateFileSystemURL("...")));
+ EXPECT_TRUE(IsAccessValid(CreateFileSystemURL(" ..")));
+ EXPECT_TRUE(IsAccessValid(CreateFileSystemURL(".. ")));
+#endif
// Similar but safe cases.
EXPECT_TRUE(IsAccessValid(CreateFileSystemURL(" .")));
« no previous file with comments | « base/files/file_path_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698