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

Side by Side Diff: chrome/browser/chromeos/extensions/external_filesystem_apitest.cc

Issue 9741002: Adding file access permissions to fileBrowserHandler manifest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unit_tests Created 8 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_handler_util.cc » ('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 (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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/platform_file.h" 6 #include "base/platform_file.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/scoped_temp_dir.h" 8 #include "base/scoped_temp_dir.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "chrome/browser/chromeos/gdata/gdata_file_system_proxy.h" 10 #include "chrome/browser/chromeos/gdata/gdata_file_system_proxy.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 192 }
193 193
194 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTestWrite) { 194 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTestWrite) {
195 AddTmpMountPoint(); 195 AddTmpMountPoint();
196 ASSERT_TRUE(RunExtensionTest("filesystem_handler_write")) << message_; 196 ASSERT_TRUE(RunExtensionTest("filesystem_handler_write")) << message_;
197 ASSERT_TRUE(RunExtensionSubtest( 197 ASSERT_TRUE(RunExtensionSubtest(
198 "filebrowser_component", "write.html", kComponentFlags)) << message_; 198 "filebrowser_component", "write.html", kComponentFlags)) << message_;
199 } 199 }
200 200
201 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, 201 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest,
202 FileBrowserTestWriteReadOnly) {
203 AddTmpMountPoint();
204 ASSERT_TRUE(RunExtensionTest("filesystem_handler_write")) << message_;
205 ASSERT_FALSE(RunExtensionSubtest(
206 "filebrowser_component", "write.html#def", kComponentFlags)) << message_;
207 }
208
209 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest,
202 FileBrowserTestWriteComponent) { 210 FileBrowserTestWriteComponent) {
203 AddTmpMountPoint(); 211 AddTmpMountPoint();
204 ASSERT_TRUE(RunComponentExtensionTest("filesystem_handler_write")) 212 ASSERT_TRUE(RunComponentExtensionTest("filesystem_handler_write"))
205 << message_; 213 << message_;
206 ASSERT_TRUE(RunExtensionSubtest( 214 ASSERT_TRUE(RunExtensionSubtest(
207 "filebrowser_component", "write.html", kComponentFlags)) << message_; 215 "filebrowser_component", "write.html", kComponentFlags)) << message_;
208 } 216 }
209 217
210 IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest, RemoteMountPoint) { 218 IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest, RemoteMountPoint) {
211 AddTmpMountPoint(); 219 AddTmpMountPoint();
(...skipping 20 matching lines...) Expand all
232 .WillOnce(MockCreateSnapshotFile( 240 .WillOnce(MockCreateSnapshotFile(
233 base::PLATFORM_FILE_OK, 241 base::PLATFORM_FILE_OK,
234 test_file_info_, 242 test_file_info_,
235 // Returns the path to the temporary file on the local drive. 243 // Returns the path to the temporary file on the local drive.
236 test_file_path_, 244 test_file_path_,
237 scoped_refptr<webkit_blob::ShareableFileReference>(NULL))); 245 scoped_refptr<webkit_blob::ShareableFileReference>(NULL)));
238 ASSERT_TRUE(RunExtensionSubtest( 246 ASSERT_TRUE(RunExtensionSubtest(
239 "filebrowser_component", "remote.html#" + GetPathOnMountPoint(""), 247 "filebrowser_component", "remote.html#" + GetPathOnMountPoint(""),
240 kComponentFlags)) << message_; 248 kComponentFlags)) << message_;
241 } 249 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_handler_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698