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

Side by Side Diff: content/browser/child_process_security_policy_unittest.cc

Issue 8276022: Move url_constants.h to content/public/common. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/platform_file.h" 9 #include "base/platform_file.h"
10 #include "content/browser/child_process_security_policy.h" 10 #include "content/browser/child_process_security_policy.h"
11 #include "content/common/test_url_constants.h" 11 #include "content/common/test_url_constants.h"
12 #include "content/common/url_constants.h" 12 #include "content/public/common/url_constants.h"
13 #include "net/url_request/url_request.h" 13 #include "net/url_request/url_request.h"
14 #include "net/url_request/url_request_test_job.h" 14 #include "net/url_request/url_request_test_job.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 class ChildProcessSecurityPolicyTest : public testing::Test { 17 class ChildProcessSecurityPolicyTest : public testing::Test {
18 protected: 18 protected:
19 // testing::Test 19 // testing::Test
20 virtual void SetUp() { 20 virtual void SetUp() {
21 // In the real world, "chrome:" is a handled scheme. 21 // In the real world, "chrome:" is a handled scheme.
22 RegisterProtocolFactory(chrome::kChromeUIScheme, 22 RegisterProtocolFactory(chrome::kChromeUIScheme,
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 430
431 // Renderers are added and removed on the UI thread, but the policy can be 431 // Renderers are added and removed on the UI thread, but the policy can be
432 // queried on the IO thread. The ChildProcessSecurityPolicy needs to be 432 // queried on the IO thread. The ChildProcessSecurityPolicy needs to be
433 // prepared to answer policy questions about renderers who no longer exist. 433 // prepared to answer policy questions about renderers who no longer exist.
434 434
435 // In this case, we default to secure behavior. 435 // In this case, we default to secure behavior.
436 EXPECT_FALSE(p->CanRequestURL(kRendererID, url)); 436 EXPECT_FALSE(p->CanRequestURL(kRendererID, url));
437 EXPECT_FALSE(p->CanReadFile(kRendererID, file)); 437 EXPECT_FALSE(p->CanReadFile(kRendererID, file));
438 EXPECT_FALSE(p->HasWebUIBindings(kRendererID)); 438 EXPECT_FALSE(p->HasWebUIBindings(kRendererID));
439 } 439 }
OLDNEW
« no previous file with comments | « content/browser/child_process_security_policy.cc ('k') | content/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698