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

Side by Side Diff: content/child/site_isolation_policy_browsertest.cc

Issue 630743005: Replace OVERRIDE and FINAL with override and final in content/child/[a-s]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/command_line.h" 5 #include "base/command_line.h"
6 #include "content/public/common/content_switches.h" 6 #include "content/public/common/content_switches.h"
7 #include "content/public/test/browser_test_utils.h" 7 #include "content/public/test/browser_test_utils.h"
8 #include "content/public/test/content_browser_test.h" 8 #include "content/public/test/content_browser_test.h"
9 #include "content/public/test/content_browser_test_utils.h" 9 #include "content/public/test/content_browser_test_utils.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 // These tests simulate exploited renderer processes, which can fetch arbitrary 13 // These tests simulate exploited renderer processes, which can fetch arbitrary
14 // resources from other websites, not constrained by the Same Origin Policy. We 14 // resources from other websites, not constrained by the Same Origin Policy. We
15 // are trying to verify that the renderer cannot fetch any cross-site document 15 // are trying to verify that the renderer cannot fetch any cross-site document
16 // responses even when the Same Origin Policy is turned off inside the renderer. 16 // responses even when the Same Origin Policy is turned off inside the renderer.
17 class SiteIsolationPolicyBrowserTest : public ContentBrowserTest { 17 class SiteIsolationPolicyBrowserTest : public ContentBrowserTest {
18 public: 18 public:
19 SiteIsolationPolicyBrowserTest() {} 19 SiteIsolationPolicyBrowserTest() {}
20 virtual ~SiteIsolationPolicyBrowserTest() {} 20 virtual ~SiteIsolationPolicyBrowserTest() {}
21 21
22 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 22 virtual void SetUpCommandLine(CommandLine* command_line) override {
23 ASSERT_TRUE(test_server()->Start()); 23 ASSERT_TRUE(test_server()->Start());
24 net::SpawnedTestServer https_server( 24 net::SpawnedTestServer https_server(
25 net::SpawnedTestServer::TYPE_HTTPS, 25 net::SpawnedTestServer::TYPE_HTTPS,
26 net::SpawnedTestServer::kLocalhost, 26 net::SpawnedTestServer::kLocalhost,
27 base::FilePath(FILE_PATH_LITERAL("content/test/data"))); 27 base::FilePath(FILE_PATH_LITERAL("content/test/data")));
28 ASSERT_TRUE(https_server.Start()); 28 ASSERT_TRUE(https_server.Start());
29 29
30 // Add a host resolver rule to map all outgoing requests to the test server. 30 // Add a host resolver rule to map all outgoing requests to the test server.
31 // This allows us to use "real" hostnames in URLs, which we can use to 31 // This allows us to use "real" hostnames in URLs, which we can use to
32 // create arbitrary SiteInstances. 32 // create arbitrary SiteInstances.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // <img>,<link>,<embed>, etc. Since the requested document is blocked, and one 97 // <img>,<link>,<embed>, etc. Since the requested document is blocked, and one
98 // character string (' ') is returned instead, this tests that the renderer 98 // character string (' ') is returned instead, this tests that the renderer
99 // does not crash even when it receives a response body which is " ", whose 99 // does not crash even when it receives a response body which is " ", whose
100 // length is different from what's described in "content-length" for such 100 // length is different from what's described in "content-length" for such
101 // different targets. 101 // different targets.
102 GURL foo("http://foo.com/files/cross_site_document_request_target.html"); 102 GURL foo("http://foo.com/files/cross_site_document_request_target.html");
103 NavigateToURL(shell(), foo); 103 NavigateToURL(shell(), foo);
104 } 104 }
105 105
106 } 106 }
OLDNEW
« no previous file with comments | « content/child/service_worker/service_worker_message_filter.h ('k') | content/child/socket_stream_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698