| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 7235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7246 std::make_pair(process2->GetID(), filter2->routing_id()))); | 7246 std::make_pair(process2->GetID(), filter2->routing_id()))); |
| 7247 | 7247 |
| 7248 // Both subframes were set up in the same way, so the next routing ID for the | 7248 // Both subframes were set up in the same way, so the next routing ID for the |
| 7249 // new popup windows should match up (this led to the collision in the | 7249 // new popup windows should match up (this led to the collision in the |
| 7250 // pending contents map in the original bug). | 7250 // pending contents map in the original bug). |
| 7251 EXPECT_EQ(filter1->routing_id(), filter2->routing_id()); | 7251 EXPECT_EQ(filter1->routing_id(), filter2->routing_id()); |
| 7252 | 7252 |
| 7253 // Now, simulate that both ShowView messages arrive by showing both of the | 7253 // Now, simulate that both ShowView messages arrive by showing both of the |
| 7254 // pending WebContents. | 7254 // pending WebContents. |
| 7255 web_contents()->ShowCreatedWindow(process1->GetID(), filter1->routing_id(), | 7255 web_contents()->ShowCreatedWindow(process1->GetID(), filter1->routing_id(), |
| 7256 NEW_FOREGROUND_TAB, gfx::Rect(), true); | 7256 WindowOpenDisposition::NEW_FOREGROUND_TAB, |
| 7257 gfx::Rect(), true); |
| 7257 web_contents()->ShowCreatedWindow(process2->GetID(), filter2->routing_id(), | 7258 web_contents()->ShowCreatedWindow(process2->GetID(), filter2->routing_id(), |
| 7258 NEW_FOREGROUND_TAB, gfx::Rect(), true); | 7259 WindowOpenDisposition::NEW_FOREGROUND_TAB, |
| 7260 gfx::Rect(), true); |
| 7259 | 7261 |
| 7260 // Verify that both shells were properly created. | 7262 // Verify that both shells were properly created. |
| 7261 EXPECT_EQ(3u, Shell::windows().size()); | 7263 EXPECT_EQ(3u, Shell::windows().size()); |
| 7262 } | 7264 } |
| 7263 | 7265 |
| 7264 // Test for https://crbug.com/612276. Similar to | 7266 // Test for https://crbug.com/612276. Similar to |
| 7265 // TwoSubframesOpenWindowsSimultaneously, but use popup menu widgets instead of | 7267 // TwoSubframesOpenWindowsSimultaneously, but use popup menu widgets instead of |
| 7266 // windows. | 7268 // windows. |
| 7267 // | 7269 // |
| 7268 // The plumbing that this test is verifying is not utilized on Mac/Android, | 7270 // The plumbing that this test is verifying is not utilized on Mac/Android, |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7993 child_rfh->OnDispatchLoad(); | 7995 child_rfh->OnDispatchLoad(); |
| 7994 | 7996 |
| 7995 // In the bug, OnDispatchLoad killed the b.com renderer. Ensure that this is | 7997 // In the bug, OnDispatchLoad killed the b.com renderer. Ensure that this is |
| 7996 // not the case. Note that the process kill doesn't happen immediately, so | 7998 // not the case. Note that the process kill doesn't happen immediately, so |
| 7997 // IsRenderFrameLive() can't be checked here (yet). Instead, check that | 7999 // IsRenderFrameLive() can't be checked here (yet). Instead, check that |
| 7998 // JavaScript can still execute in b.com using the popup. | 8000 // JavaScript can still execute in b.com using the popup. |
| 7999 EXPECT_TRUE(ExecuteScript(popup_shell->web_contents(), "true")); | 8001 EXPECT_TRUE(ExecuteScript(popup_shell->web_contents(), "true")); |
| 8000 } | 8002 } |
| 8001 | 8003 |
| 8002 } // namespace content | 8004 } // namespace content |
| OLD | NEW |