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

Unified Diff: webkit/fileapi/isolated_file_util_unittest.cc

Issue 10825316: Invalid FileSystemURL should not be given to FileUtils (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 4 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 | « webkit/fileapi/isolated_file_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/isolated_file_util_unittest.cc
diff --git a/webkit/fileapi/isolated_file_util_unittest.cc b/webkit/fileapi/isolated_file_util_unittest.cc
index d3e6303aab73e8323ce15579644f4036de4e4f23..03953c87dcb83fc5f11c395967ec694134c5a12b 100644
--- a/webkit/fileapi/isolated_file_util_unittest.cc
+++ b/webkit/fileapi/isolated_file_util_unittest.cc
@@ -20,6 +20,7 @@
#include "webkit/fileapi/file_util_helper.h"
#include "webkit/fileapi/isolated_context.h"
#include "webkit/fileapi/isolated_file_util.h"
+#include "webkit/fileapi/local_file_system_operation.h"
#include "webkit/fileapi/local_file_system_test_helper.h"
#include "webkit/fileapi/local_file_util.h"
#include "webkit/fileapi/mock_file_system_options.h"
@@ -299,13 +300,11 @@ TEST_F(IsolatedFileUtilTest, UnregisteredPathsTest) {
const test::TestCaseRecord& test_case = kUnregisteredCases[i];
FileSystemURL url = GetFileSystemURL(FilePath(test_case.path));
- // This should fail as the paths in kUnregisteredCases are not included
- // in the dropped files (i.e. the regular test cases).
- base::PlatformFileInfo info;
- FilePath platform_path;
- FileSystemOperationContext context(file_system_context());
- ASSERT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND,
- file_util()->GetFileInfo(&context, url, &info, &platform_path));
+ // We should not be able to get the valid URL for unregistered files.
+ ASSERT_FALSE(url.is_valid());
+
+ // We should not be able to create a new operation for an invalid URL.
+ ASSERT_EQ(NULL, file_system_context()->CreateFileSystemOperation(url));
}
}
« no previous file with comments | « webkit/fileapi/isolated_file_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698