OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
10 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 public: | 25 public: |
26 ChromeSitePerProcessTest() {} | 26 ChromeSitePerProcessTest() {} |
27 ~ChromeSitePerProcessTest() override {} | 27 ~ChromeSitePerProcessTest() override {} |
28 | 28 |
29 void SetUpCommandLine(base::CommandLine* command_line) override { | 29 void SetUpCommandLine(base::CommandLine* command_line) override { |
30 content::IsolateAllSitesForTesting(command_line); | 30 content::IsolateAllSitesForTesting(command_line); |
31 } | 31 } |
32 | 32 |
33 void SetUpOnMainThread() override { | 33 void SetUpOnMainThread() override { |
34 host_resolver()->AddRule("*", "127.0.0.1"); | 34 host_resolver()->AddRule("*", "127.0.0.1"); |
35 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 35 ASSERT_TRUE(embedded_test_server()->Start()); |
36 content::SetupCrossSiteRedirector(embedded_test_server()); | 36 content::SetupCrossSiteRedirector(embedded_test_server()); |
37 } | 37 } |
38 | 38 |
39 private: | 39 private: |
40 DISALLOW_COPY_AND_ASSIGN(ChromeSitePerProcessTest); | 40 DISALLOW_COPY_AND_ASSIGN(ChromeSitePerProcessTest); |
41 }; | 41 }; |
42 | 42 |
43 // Verify that browser shutdown path works correctly when there's a | 43 // Verify that browser shutdown path works correctly when there's a |
44 // RenderFrameProxyHost for a child frame. | 44 // RenderFrameProxyHost for a child frame. |
45 IN_PROC_BROWSER_TEST_F(ChromeSitePerProcessTest, RenderFrameProxyHostShutdown) { | 45 IN_PROC_BROWSER_TEST_F(ChromeSitePerProcessTest, RenderFrameProxyHostShutdown) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 content::DOMMessageQueue msg_queue; | 113 content::DOMMessageQueue msg_queue; |
114 EXPECT_TRUE(NavigateIframeToURL(active_web_contents, "test", frame_url)); | 114 EXPECT_TRUE(NavigateIframeToURL(active_web_contents, "test", frame_url)); |
115 | 115 |
116 // Ensure the page finishes loading without crashing. | 116 // Ensure the page finishes loading without crashing. |
117 std::string status; | 117 std::string status; |
118 while (msg_queue.WaitForMessage(&status)) { | 118 while (msg_queue.WaitForMessage(&status)) { |
119 if (status == "\"DONE\"") | 119 if (status == "\"DONE\"") |
120 break; | 120 break; |
121 } | 121 } |
122 } | 122 } |
OLD | NEW |