| OLD | NEW |
| 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 <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "content/browser/child_process_security_policy_impl.h" | 10 #include "content/browser/child_process_security_policy_impl.h" |
| 11 #include "content/public/common/url_constants.h" | 11 #include "content/public/common/url_constants.h" |
| 12 #include "content/test/test_content_browser_client.h" | 12 #include "content/test/test_content_browser_client.h" |
| 13 #include "storage/common/fileapi/file_system_types.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 14 #include "url/gurl.h" | 15 #include "url/gurl.h" |
| 15 #include "webkit/browser/fileapi/file_permission_policy.h" | 16 #include "webkit/browser/fileapi/file_permission_policy.h" |
| 16 #include "webkit/browser/fileapi/file_system_url.h" | 17 #include "webkit/browser/fileapi/file_system_url.h" |
| 17 #include "webkit/browser/fileapi/isolated_context.h" | 18 #include "webkit/browser/fileapi/isolated_context.h" |
| 18 #include "webkit/common/fileapi/file_system_types.h" | |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 const int kRendererID = 42; | 23 const int kRendererID = 42; |
| 24 const int kWorkerRendererID = kRendererID + 1; | 24 const int kWorkerRendererID = kRendererID + 1; |
| 25 | 25 |
| 26 #if defined(FILE_PATH_USES_DRIVE_LETTERS) | 26 #if defined(FILE_PATH_USES_DRIVE_LETTERS) |
| 27 #define TEST_PATH(x) FILE_PATH_LITERAL("c:") FILE_PATH_LITERAL(x) | 27 #define TEST_PATH(x) FILE_PATH_LITERAL("c:") FILE_PATH_LITERAL(x) |
| 28 #else | 28 #else |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 // queried on the IO thread. The ChildProcessSecurityPolicy needs to be | 635 // queried on the IO thread. The ChildProcessSecurityPolicy needs to be |
| 636 // prepared to answer policy questions about renderers who no longer exist. | 636 // prepared to answer policy questions about renderers who no longer exist. |
| 637 | 637 |
| 638 // In this case, we default to secure behavior. | 638 // In this case, we default to secure behavior. |
| 639 EXPECT_FALSE(p->CanRequestURL(kRendererID, url)); | 639 EXPECT_FALSE(p->CanRequestURL(kRendererID, url)); |
| 640 EXPECT_FALSE(p->CanReadFile(kRendererID, file)); | 640 EXPECT_FALSE(p->CanReadFile(kRendererID, file)); |
| 641 EXPECT_FALSE(p->HasWebUIBindings(kRendererID)); | 641 EXPECT_FALSE(p->HasWebUIBindings(kRendererID)); |
| 642 } | 642 } |
| 643 | 643 |
| 644 } // namespace content | 644 } // namespace content |
| OLD | NEW |