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

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

Issue 12210030: Linux/ChromeOS Chromium style checker cleanup, content/ edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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) 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/file_path.h" 9 #include "base/file_path.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 13 matching lines...) Expand all
24 #define TEST_PATH(x) FILE_PATH_LITERAL("c:") FILE_PATH_LITERAL(x) 24 #define TEST_PATH(x) FILE_PATH_LITERAL("c:") FILE_PATH_LITERAL(x)
25 #else 25 #else
26 #define TEST_PATH(x) FILE_PATH_LITERAL(x) 26 #define TEST_PATH(x) FILE_PATH_LITERAL(x)
27 #endif 27 #endif
28 28
29 class ChildProcessSecurityPolicyTestBrowserClient 29 class ChildProcessSecurityPolicyTestBrowserClient
30 : public TestContentBrowserClient { 30 : public TestContentBrowserClient {
31 public: 31 public:
32 ChildProcessSecurityPolicyTestBrowserClient() {} 32 ChildProcessSecurityPolicyTestBrowserClient() {}
33 33
34 virtual bool IsHandledURL(const GURL& url) { 34 virtual bool IsHandledURL(const GURL& url) OVERRIDE {
35 return schemes_.find(url.scheme()) != schemes_.end(); 35 return schemes_.find(url.scheme()) != schemes_.end();
36 } 36 }
37 37
38 void ClearSchemes() { 38 void ClearSchemes() {
39 schemes_.clear(); 39 schemes_.clear();
40 } 40 }
41 41
42 void AddScheme(const std::string& scheme) { 42 void AddScheme(const std::string& scheme) {
43 schemes_.insert(scheme); 43 schemes_.insert(scheme);
44 } 44 }
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 // queried on the IO thread. The ChildProcessSecurityPolicy needs to be 542 // queried on the IO thread. The ChildProcessSecurityPolicy needs to be
543 // prepared to answer policy questions about renderers who no longer exist. 543 // prepared to answer policy questions about renderers who no longer exist.
544 544
545 // In this case, we default to secure behavior. 545 // In this case, we default to secure behavior.
546 EXPECT_FALSE(p->CanRequestURL(kRendererID, url)); 546 EXPECT_FALSE(p->CanRequestURL(kRendererID, url));
547 EXPECT_FALSE(p->CanReadFile(kRendererID, file)); 547 EXPECT_FALSE(p->CanReadFile(kRendererID, file));
548 EXPECT_FALSE(p->HasWebUIBindings(kRendererID)); 548 EXPECT_FALSE(p->HasWebUIBindings(kRendererID));
549 } 549 }
550 550
551 } // namespace content 551 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_runner.cc ('k') | content/browser/device_orientation/device_orientation_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698