| 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 "content/browser/site_per_process_browsertest.h" | 5 #include "content/browser/site_per_process_browsertest.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "content/browser/frame_host/cross_process_frame_connector.h" | 9 #include "content/browser/frame_host/cross_process_frame_connector.h" |
| 10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 } | 188 } |
| 189 | 189 |
| 190 void SitePerProcessBrowserTest::SetUpCommandLine(CommandLine* command_line) { | 190 void SitePerProcessBrowserTest::SetUpCommandLine(CommandLine* command_line) { |
| 191 command_line->AppendSwitch(switches::kSitePerProcess); | 191 command_line->AppendSwitch(switches::kSitePerProcess); |
| 192 }; | 192 }; |
| 193 | 193 |
| 194 void SitePerProcessBrowserTest::SetUpOnMainThread() { | 194 void SitePerProcessBrowserTest::SetUpOnMainThread() { |
| 195 host_resolver()->AddRule("*", "127.0.0.1"); | 195 host_resolver()->AddRule("*", "127.0.0.1"); |
| 196 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 196 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 197 SetupCrossSiteRedirector(embedded_test_server()); | 197 SetupCrossSiteRedirector(embedded_test_server()); |
| 198 embedded_test_server()->ServeFilesFromDirectory(GetTestFilePath("files", "")); | |
| 199 } | 198 } |
| 200 | 199 |
| 201 // It fails on ChromeOS and Android, so disabled while investigating. | 200 // It fails on ChromeOS and Android, so disabled while investigating. |
| 202 // http://crbug.com/399775 | 201 // http://crbug.com/399775 |
| 203 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 202 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
| 204 #define MAYBE_CrossSiteIframe DISABLED_CrossSiteIframe | 203 #define MAYBE_CrossSiteIframe DISABLED_CrossSiteIframe |
| 205 #else | 204 #else |
| 206 #define MAYBE_CrossSiteIframe CrossSiteIframe | 205 #define MAYBE_CrossSiteIframe CrossSiteIframe |
| 207 #endif | 206 #endif |
| 208 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, MAYBE_CrossSiteIframe) { | 207 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, MAYBE_CrossSiteIframe) { |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 } | 763 } |
| 765 | 764 |
| 766 navigation_observer.Wait(); | 765 navigation_observer.Wait(); |
| 767 EXPECT_EQ(cross_site_url, observer.navigation_url()); | 766 EXPECT_EQ(cross_site_url, observer.navigation_url()); |
| 768 EXPECT_TRUE(observer.navigation_succeeded()); | 767 EXPECT_TRUE(observer.navigation_succeeded()); |
| 769 EXPECT_EQ(0U, child->child_count()); | 768 EXPECT_EQ(0U, child->child_count()); |
| 770 } | 769 } |
| 771 } | 770 } |
| 772 | 771 |
| 773 } // namespace content | 772 } // namespace content |
| OLD | NEW |