Chromium Code Reviews| 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 8844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8855 EXPECT_TRUE(child->current_frame_host()->IsRenderFrameLive()); | 8855 EXPECT_TRUE(child->current_frame_host()->IsRenderFrameLive()); |
| 8856 | 8856 |
| 8857 // The RenderWidgetHostView for the child should be recreated and set to be | 8857 // The RenderWidgetHostView for the child should be recreated and set to be |
| 8858 // used in the CrossProcessFrameConnector. Without this, the frame won't be | 8858 // used in the CrossProcessFrameConnector. Without this, the frame won't be |
| 8859 // rendered properly. | 8859 // rendered properly. |
| 8860 EXPECT_TRUE(child->current_frame_host()->GetView()); | 8860 EXPECT_TRUE(child->current_frame_host()->GetView()); |
| 8861 EXPECT_EQ( | 8861 EXPECT_EQ( |
| 8862 child->current_frame_host()->GetView(), | 8862 child->current_frame_host()->GetView(), |
| 8863 proxy_to_parent->cross_process_frame_connector()->get_view_for_testing()); | 8863 proxy_to_parent->cross_process_frame_connector()->get_view_for_testing()); |
| 8864 | 8864 |
| 8865 // Make sure that the child frame has submitted at least one frame. | |
|
nasko
2017/05/05 18:42:55
nit: This talks about compositor frames, right? Ma
lfg
2017/05/05 18:53:02
Done.
| |
| 8866 WaitForChildFrameSurfaceReady(child->current_frame_host()); | |
| 8867 | |
| 8865 // Send a postMessage from the child to its parent. This verifies that the | 8868 // Send a postMessage from the child to its parent. This verifies that the |
| 8866 // parent's proxy in the child's SiteInstance was also restored. | 8869 // parent's proxy in the child's SiteInstance was also restored. |
| 8867 base::string16 expected_title(base::UTF8ToUTF16("I am alive!")); | 8870 base::string16 expected_title(base::UTF8ToUTF16("I am alive!")); |
| 8868 TitleWatcher title_watcher(shell()->web_contents(), expected_title); | 8871 TitleWatcher title_watcher(shell()->web_contents(), expected_title); |
| 8869 EXPECT_TRUE(ExecuteScript(child->current_frame_host(), | 8872 EXPECT_TRUE(ExecuteScript(child->current_frame_host(), |
| 8870 "parent.postMessage('I am alive!', '*');")); | 8873 "parent.postMessage('I am alive!', '*');")); |
| 8871 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 8874 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
| 8872 } | 8875 } |
| 8873 | 8876 |
| 8874 // Test that session history length and offset are replicated to all renderer | 8877 // Test that session history length and offset are replicated to all renderer |
| (...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10113 names.insert(root->children[0]->frame_entry->frame_unique_name()); | 10116 names.insert(root->children[0]->frame_entry->frame_unique_name()); |
| 10114 } | 10117 } |
| 10115 | 10118 |
| 10116 // More than one entry in the set means that the subframe frame navigation | 10119 // More than one entry in the set means that the subframe frame navigation |
| 10117 // entries didn't have a consistent unique name. This will break history | 10120 // entries didn't have a consistent unique name. This will break history |
| 10118 // navigations =( | 10121 // navigations =( |
| 10119 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; | 10122 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; |
| 10120 } | 10123 } |
| 10121 | 10124 |
| 10122 } // namespace content | 10125 } // namespace content |
| OLD | NEW |