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

Side by Side Diff: webkit/fileapi/isolated_context_unittest.cc

Issue 11648027: Extract external file systems handling from isolated context. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "webkit/fileapi/isolated_context.h" 10 #include "webkit/fileapi/isolated_context.h"
11 11
12 #define FPL(x) FILE_PATH_LITERAL(x) 12 #define FPL(x) FILE_PATH_LITERAL(x)
13 13
14 #if defined(FILE_PATH_USES_DRIVE_LETTERS) 14 #if defined(FILE_PATH_USES_DRIVE_LETTERS)
15 #define DRIVE FPL("C:") 15 #define DRIVE FPL("C:")
16 #else 16 #else
17 #define DRIVE 17 #define DRIVE
18 #endif 18 #endif
19 19
20 namespace fileapi { 20 namespace fileapi {
21 21
22 typedef IsolatedContext::FileInfo FileInfo; 22 typedef IsolatedContext::MountPointInfo FileInfo;
23 23
24 namespace { 24 namespace {
25 25
26 const FilePath kTestPaths[] = { 26 const FilePath kTestPaths[] = {
27 FilePath(DRIVE FPL("/a/b.txt")), 27 FilePath(DRIVE FPL("/a/b.txt")),
28 FilePath(DRIVE FPL("/c/d/e")), 28 FilePath(DRIVE FPL("/c/d/e")),
29 FilePath(DRIVE FPL("/h/")), 29 FilePath(DRIVE FPL("/h/")),
30 FilePath(DRIVE FPL("/")), 30 FilePath(DRIVE FPL("/")),
31 #if defined(FILE_PATH_USES_WIN_SEPARATORS) 31 #if defined(FILE_PATH_USES_WIN_SEPARATORS)
32 FilePath(DRIVE FPL("\\foo\\bar")), 32 FilePath(DRIVE FPL("\\foo\\bar")),
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 // Trying to crack "/foo" should fail (because "foo" is not the one 222 // Trying to crack "/foo" should fail (because "foo" is not the one
223 // included in the kTestPaths). 223 // included in the kTestPaths).
224 virtual_path = isolated_context()->CreateVirtualRootPath( 224 virtual_path = isolated_context()->CreateVirtualRootPath(
225 id_).AppendASCII("foo"); 225 id_).AppendASCII("foo");
226 ASSERT_FALSE(isolated_context()->CrackIsolatedPath( 226 ASSERT_FALSE(isolated_context()->CrackIsolatedPath(
227 virtual_path, &cracked_id, NULL, &cracked_path)); 227 virtual_path, &cracked_id, NULL, &cracked_path));
228 } 228 }
229 229
230 } // namespace fileapi 230 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698