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

Side by Side Diff: chrome/browser/chromeos/fileapi/file_system_backend_unittest.cc

Issue 1301563003: Revert of Allow url::SchemeHostPort to hold non-file scheme without port (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/common/chrome_content_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/chromeos/fileapi/file_system_backend.h" 5 #include "chrome/browser/chromeos/fileapi/file_system_backend.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "chromeos/dbus/cros_disks_client.h" 10 #include "chromeos/dbus/cros_disks_client.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 std::vector<base::FilePath> root_dirs = backend.GetRootDirectories(); 94 std::vector<base::FilePath> root_dirs = backend.GetRootDirectories();
95 std::set<base::FilePath> root_dirs_set(root_dirs.begin(), root_dirs.end()); 95 std::set<base::FilePath> root_dirs_set(root_dirs.begin(), root_dirs.end());
96 EXPECT_EQ(initial_root_dirs_size + 4, root_dirs.size()); 96 EXPECT_EQ(initial_root_dirs_size + 4, root_dirs.size());
97 EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/a/b/c")))); 97 EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/a/b/c"))));
98 EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/b/c/d")))); 98 EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/b/c/d"))));
99 EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/g/c/d")))); 99 EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/g/c/d"))));
100 EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/g/d/e")))); 100 EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/g/d/e"))));
101 } 101 }
102 102
103 TEST(ChromeOSFileSystemBackendTest, AccessPermissions) { 103 TEST(ChromeOSFileSystemBackendTest, AccessPermissions) {
104 url::AddStandardScheme("chrome-extension", url::SCHEME_WITHOUT_PORT); 104 url::AddStandardScheme("chrome-extension");
105 105
106 scoped_refptr<storage::ExternalMountPoints> mount_points( 106 scoped_refptr<storage::ExternalMountPoints> mount_points(
107 storage::ExternalMountPoints::CreateRefCounted()); 107 storage::ExternalMountPoints::CreateRefCounted());
108 scoped_refptr<storage::ExternalMountPoints> system_mount_points( 108 scoped_refptr<storage::ExternalMountPoints> system_mount_points(
109 storage::ExternalMountPoints::CreateRefCounted()); 109 storage::ExternalMountPoints::CreateRefCounted());
110 chromeos::FileSystemBackend backend(NULL, // drive_delegate 110 chromeos::FileSystemBackend backend(NULL, // drive_delegate
111 NULL, // file_system_provider_delegate 111 NULL, // file_system_provider_delegate
112 NULL, // mtp_delegate 112 NULL, // mtp_delegate
113 mount_points.get(), 113 mount_points.get(),
114 system_mount_points.get()); 114 system_mount_points.get());
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 if (!kTestCases[i].success) 234 if (!kTestCases[i].success)
235 continue; 235 continue;
236 236
237 base::FilePath expected_virtual_path(kTestCases[i].virtual_path); 237 base::FilePath expected_virtual_path(kTestCases[i].virtual_path);
238 EXPECT_EQ(expected_virtual_path, virtual_path) 238 EXPECT_EQ(expected_virtual_path, virtual_path)
239 << "Resolving " << kTestCases[i].local_path; 239 << "Resolving " << kTestCases[i].local_path;
240 } 240 }
241 } 241 }
242 242
243 } // namespace 243 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_content_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698