| OLD | NEW |
| 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 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 #if defined(OS_ANDROID) | 86 #if defined(OS_ANDROID) |
| 87 #define MAYBE_CrossSiteDocumentBlockingForDifferentTargets \ | 87 #define MAYBE_CrossSiteDocumentBlockingForDifferentTargets \ |
| 88 DISABLED_CrossSiteDocumentBlockingForDifferentTargets | 88 DISABLED_CrossSiteDocumentBlockingForDifferentTargets |
| 89 #else | 89 #else |
| 90 #define MAYBE_CrossSiteDocumentBlockingForDifferentTargets \ | 90 #define MAYBE_CrossSiteDocumentBlockingForDifferentTargets \ |
| 91 CrossSiteDocumentBlockingForDifferentTargets | 91 CrossSiteDocumentBlockingForDifferentTargets |
| 92 #endif | 92 #endif |
| 93 | 93 |
| 94 IN_PROC_BROWSER_TEST_F(SiteIsolationPolicyBrowserTest, | 94 IN_PROC_BROWSER_TEST_F(SiteIsolationPolicyBrowserTest, |
| 95 MAYBE_CrossSiteDocumentBlockingForDifferentTargets) { | 95 MAYBE_CrossSiteDocumentBlockingForDifferentTargets) { |
| 96 // TODO(creis): Re-enable this test in --site-per-process mode once we support |
| 97 // sibling frames from the same site with correct DidStopLoading behavior. |
| 98 // See http://crbug.com/419087 and http://crbug.com/436250. |
| 99 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 100 switches::kSitePerProcess)) |
| 101 return; |
| 102 |
| 96 // This webpage loads a cross-site HTML page in different targets such as | 103 // This webpage loads a cross-site HTML page in different targets such as |
| 97 // <img>,<link>,<embed>, etc. Since the requested document is blocked, and one | 104 // <img>,<link>,<embed>, etc. Since the requested document is blocked, and one |
| 98 // character string (' ') is returned instead, this tests that the renderer | 105 // character string (' ') is returned instead, this tests that the renderer |
| 99 // does not crash even when it receives a response body which is " ", whose | 106 // 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 | 107 // length is different from what's described in "content-length" for such |
| 101 // different targets. | 108 // different targets. |
| 102 GURL foo("http://foo.com/files/cross_site_document_request_target.html"); | 109 GURL foo("http://foo.com/files/cross_site_document_request_target.html"); |
| 103 NavigateToURL(shell(), foo); | 110 NavigateToURL(shell(), foo); |
| 104 } | 111 } |
| 105 | 112 |
| 106 } | 113 } |
| OLD | NEW |