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

Side by Side Diff: webkit/browser/chromeos/fileapi/file_access_permissions_unittest.cc

Issue 16010006: Move webkit/chromeos into webkit/browser/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/fileapi/file_access_permissions.h"
6 #include "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 #include "webkit/browser/chromeos/fileapi/file_access_permissions.h"
7 7
8 8
9 class FileAccessPermissionsTest : public testing::Test { 9 class FileAccessPermissionsTest : public testing::Test {
10 }; 10 };
11 11
12 TEST_F(FileAccessPermissionsTest, FileAccessChecks) { 12 TEST_F(FileAccessPermissionsTest, FileAccessChecks) {
13 #if defined(OS_WIN) 13 #if defined(OS_WIN)
14 base::FilePath good_dir(FILE_PATH_LITERAL("c:\\root\\dir")); 14 base::FilePath good_dir(FILE_PATH_LITERAL("c:\\root\\dir"));
15 base::FilePath bad_dir(FILE_PATH_LITERAL("c:\\root")); 15 base::FilePath bad_dir(FILE_PATH_LITERAL("c:\\root"));
16 base::FilePath good_file(FILE_PATH_LITERAL("c:\\root\\dir\\good_file.txt")); 16 base::FilePath good_file(FILE_PATH_LITERAL("c:\\root\\dir\\good_file.txt"));
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // any file system element anymore. 58 // any file system element anymore.
59 permissions.RevokePermissions(extension1); 59 permissions.RevokePermissions(extension1);
60 permissions.RevokePermissions(extension2); 60 permissions.RevokePermissions(extension2);
61 EXPECT_FALSE(permissions.HasAccessPermission(extension1, good_dir)); 61 EXPECT_FALSE(permissions.HasAccessPermission(extension1, good_dir));
62 EXPECT_FALSE(permissions.HasAccessPermission(extension1, good_file)); 62 EXPECT_FALSE(permissions.HasAccessPermission(extension1, good_file));
63 EXPECT_FALSE(permissions.HasAccessPermission(extension1, bad_file)); 63 EXPECT_FALSE(permissions.HasAccessPermission(extension1, bad_file));
64 EXPECT_FALSE(permissions.HasAccessPermission(extension2, good_dir)); 64 EXPECT_FALSE(permissions.HasAccessPermission(extension2, good_dir));
65 EXPECT_FALSE(permissions.HasAccessPermission(extension2, good_file)); 65 EXPECT_FALSE(permissions.HasAccessPermission(extension2, good_file));
66 EXPECT_FALSE(permissions.HasAccessPermission(extension2, bad_file)); 66 EXPECT_FALSE(permissions.HasAccessPermission(extension2, bad_file));
67 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698