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 "content/public/browser/web_contents.h" | 7 #include "content/public/browser/web_contents.h" |
8 #include "content/public/browser/web_contents_delegate.h" | 8 #include "content/public/browser/web_contents_delegate.h" |
9 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
10 #include "content/public/test/browser_test_utils.h" | 10 #include "content/public/test/browser_test_utils.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 GURL url3 = test_server()->GetURL("files/site_isolation/blank.html?3"); | 107 GURL url3 = test_server()->GetURL("files/site_isolation/blank.html?3"); |
108 NavigateToURL(shell(), url1); | 108 NavigateToURL(shell(), url1); |
109 | 109 |
110 Shell* popup = OpenWindowFromJavaScript(shell(), url2); | 110 Shell* popup = OpenWindowFromJavaScript(shell(), url2); |
111 NavigateToURL(popup, url3); | 111 NavigateToURL(popup, url3); |
112 EXPECT_TRUE(AttemptCloseFromJavaScript(popup->web_contents())); | 112 EXPECT_TRUE(AttemptCloseFromJavaScript(popup->web_contents())); |
113 } | 113 } |
114 | 114 |
115 // Tests that window.close() works in a popup window that has navigated a few | 115 // Tests that window.close() works in a popup window that has navigated a few |
116 // times and swapped processes. | 116 // times and swapped processes. |
117 IN_PROC_BROWSER_TEST_F(OpenedByDOMTest, CrossProcessPopup) { | 117 // Crashes on all platforms. http://crbug.com/399709 |
| 118 IN_PROC_BROWSER_TEST_F(OpenedByDOMTest, DISABLED_CrossProcessPopup) { |
118 host_resolver()->AddRule("*", "127.0.0.1"); | 119 host_resolver()->AddRule("*", "127.0.0.1"); |
119 ASSERT_TRUE(test_server()->Start()); | 120 ASSERT_TRUE(test_server()->Start()); |
120 | 121 |
121 GURL url1 = test_server()->GetURL("files/site_isolation/blank.html?1"); | 122 GURL url1 = test_server()->GetURL("files/site_isolation/blank.html?1"); |
122 | 123 |
123 GURL url2 = test_server()->GetURL("files/site_isolation/blank.html?2"); | 124 GURL url2 = test_server()->GetURL("files/site_isolation/blank.html?2"); |
124 GURL::Replacements replace_host; | 125 GURL::Replacements replace_host; |
125 std::string foo_com("foo.com"); | 126 std::string foo_com("foo.com"); |
126 replace_host.SetHostStr(foo_com); | 127 replace_host.SetHostStr(foo_com); |
127 url2 = url2.ReplaceComponents(replace_host); | 128 url2 = url2.ReplaceComponents(replace_host); |
128 | 129 |
129 GURL url3 = test_server()->GetURL("files/site_isolation/blank.html?3"); | 130 GURL url3 = test_server()->GetURL("files/site_isolation/blank.html?3"); |
130 url3 = url3.ReplaceComponents(replace_host); | 131 url3 = url3.ReplaceComponents(replace_host); |
131 | 132 |
132 NavigateToURL(shell(), url1); | 133 NavigateToURL(shell(), url1); |
133 | 134 |
134 Shell* popup = OpenWindowFromJavaScript(shell(), url2); | 135 Shell* popup = OpenWindowFromJavaScript(shell(), url2); |
135 NavigateToURL(popup, url3); | 136 NavigateToURL(popup, url3); |
136 EXPECT_TRUE(AttemptCloseFromJavaScript(popup->web_contents())); | 137 EXPECT_TRUE(AttemptCloseFromJavaScript(popup->web_contents())); |
137 } | 138 } |
138 | 139 |
139 } // namespace content | 140 } // namespace content |
OLD | NEW |