| Index: content/browser/frame_host/render_frame_host_manager_browsertest.cc
|
| diff --git a/content/browser/frame_host/render_frame_host_manager_browsertest.cc b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
|
| index 4036409c32792ddbd70603fec143d4f4628fc067..a5539722afe411fc1817a59b00bcc9cf2df4620f 100644
|
| --- a/content/browser/frame_host/render_frame_host_manager_browsertest.cc
|
| +++ b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
|
| @@ -798,12 +798,14 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, DisownSubframeOpener) {
|
| ->GetFrameTree()
|
| ->root();
|
| EXPECT_EQ(root, root->child_at(0)->opener());
|
| + EXPECT_EQ(nullptr, root->child_at(0)->original_opener());
|
|
|
| // Now disown the frame's opener. Shouldn't crash.
|
| EXPECT_TRUE(ExecuteScript(shell(), "window.frames[0].opener = null;"));
|
|
|
| // Check that the subframe's opener in the browser process is disowned.
|
| EXPECT_EQ(nullptr, root->child_at(0)->opener());
|
| + EXPECT_EQ(nullptr, root->child_at(0)->original_opener());
|
| }
|
|
|
| // Check that window.name is preserved for top frames when they navigate
|
| @@ -2273,7 +2275,9 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, UpdateOpener) {
|
| ->GetFrameTree()
|
| ->root();
|
| EXPECT_EQ(root, foo_root->opener());
|
| + EXPECT_EQ(root, foo_root->original_opener());
|
| EXPECT_EQ(root, bar_root->opener());
|
| + EXPECT_EQ(root, bar_root->original_opener());
|
|
|
| // From the bar process, use window.open to update foo's opener to point to
|
| // bar. This is allowed since bar is same-origin with foo's opener. Use
|
| @@ -2290,6 +2294,7 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, UpdateOpener) {
|
|
|
| // Check that updated opener propagated to the browser process.
|
| EXPECT_EQ(bar_root, foo_root->opener());
|
| + EXPECT_EQ(root, foo_root->original_opener());
|
|
|
| // Check that foo's opener was updated in foo's process. Send a postMessage
|
| // to the opener and check that the right window (bar_shell) receives it.
|
| @@ -2307,6 +2312,7 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, UpdateOpener) {
|
| // in the browser process.
|
| EXPECT_TRUE(ExecuteScript(foo_shell, "window.opener = window;"));
|
| EXPECT_EQ(bar_root, foo_root->opener());
|
| + EXPECT_EQ(root, foo_root->original_opener());
|
| }
|
|
|
| // Tests that when a popup is opened, which is then navigated cross-process and
|
|
|