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

Side by Side Diff: webkit/fileapi/file_system_url_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 "webkit/fileapi/file_system_url.h" 5 #include "webkit/fileapi/file_system_url.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "webkit/fileapi/external_mount_points.h"
10 #include "webkit/fileapi/file_system_types.h" 11 #include "webkit/fileapi/file_system_types.h"
11 #include "webkit/fileapi/file_system_util.h" 12 #include "webkit/fileapi/file_system_util.h"
12 #include "webkit/fileapi/isolated_context.h" 13 #include "webkit/fileapi/isolated_context.h"
13 #include "webkit/fileapi/syncable/syncable_file_system_util.h" 14 #include "webkit/fileapi/syncable/syncable_file_system_util.h"
14 15
15 #define FPL FILE_PATH_LITERAL 16 #define FPL FILE_PATH_LITERAL
16 17
17 namespace fileapi { 18 namespace fileapi {
18 19
19 namespace { 20 namespace {
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 208
208 TEST(FileSystemURLTest, DebugString) { 209 TEST(FileSystemURLTest, DebugString) {
209 const GURL kOrigin("http://example.com"); 210 const GURL kOrigin("http://example.com");
210 const FilePath kPath(FPL("dir/file")); 211 const FilePath kPath(FPL("dir/file"));
211 212
212 const FileSystemURL kURL1(kOrigin, kFileSystemTypeTemporary, kPath); 213 const FileSystemURL kURL1(kOrigin, kFileSystemTypeTemporary, kPath);
213 EXPECT_EQ("filesystem:http://example.com/temporary/" + 214 EXPECT_EQ("filesystem:http://example.com/temporary/" +
214 NormalizedUTF8Path(kPath), 215 NormalizedUTF8Path(kPath),
215 kURL1.DebugString()); 216 kURL1.DebugString());
216 217
217 const FilePath kRoot(FPL("root")); 218 const FilePath kRoot(FPL("/root"));
218 ScopedExternalFileSystem scoped_fs("foo", kFileSystemTypeNativeLocal, kRoot); 219 ScopedExternalFileSystem scoped_fs("foo", kFileSystemTypeNativeLocal, kRoot);
219 const FileSystemURL kURL2(kOrigin, kFileSystemTypeExternal, 220 const FileSystemURL kURL2(kOrigin, kFileSystemTypeExternal,
220 scoped_fs.GetVirtualRootPath().Append(kPath)); 221 scoped_fs.GetVirtualRootPath().Append(kPath));
221 EXPECT_EQ("filesystem:http://example.com/external/" + 222 EXPECT_EQ("filesystem:http://example.com/external/" +
222 NormalizedUTF8Path(scoped_fs.GetVirtualRootPath().Append(kPath)) + 223 NormalizedUTF8Path(scoped_fs.GetVirtualRootPath().Append(kPath)) +
223 " (NativeLocal@foo:" + 224 " (NativeLocal@foo:" +
224 NormalizedUTF8Path(kRoot.Append(kPath)) + ")", 225 NormalizedUTF8Path(kRoot.Append(kPath)) + ")",
225 kURL2.DebugString()); 226 kURL2.DebugString());
226 } 227 }
227 228
228 } // namespace fileapi 229 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698