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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7916 // Now go forward three entries from the child1 frame and check that the | 7918 // Now go forward three entries from the child1 frame and check that the |
7917 // history length and offset are not stale in b.com. | 7919 // history length and offset are not stale in b.com. |
7918 EXPECT_TRUE(ExecuteScript(child1, "history.go(3);")); | 7920 EXPECT_TRUE(ExecuteScript(child1, "history.go(3);")); |
7919 EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); | 7921 EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); |
7920 EXPECT_EQ(main_url, root->current_url()); | 7922 EXPECT_EQ(main_url, root->current_url()); |
7921 EXPECT_EQ(child1_last_url, child1->current_url()); | 7923 EXPECT_EQ(child1_last_url, child1->current_url()); |
7922 EXPECT_EQ(child2_last_url, child2->current_url()); | 7924 EXPECT_EQ(child2_last_url, child2->current_url()); |
7923 } | 7925 } |
7924 | 7926 |
7925 } // namespace content | 7927 } // namespace content |
OLD | NEW |