OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 | 932 |
933 // This postMessage should have created a swapped out RVH for the new | 933 // This postMessage should have created a swapped out RVH for the new |
934 // SiteInstance in the target=_blank window. | 934 // SiteInstance in the target=_blank window. |
935 EXPECT_TRUE( | 935 EXPECT_TRUE( |
936 new_manager->GetSwappedOutRenderViewHost(foo_site_instance.get())); | 936 new_manager->GetSwappedOutRenderViewHost(foo_site_instance.get())); |
937 | 937 |
938 // TODO(nasko): Test subframe targeting of postMessage once | 938 // TODO(nasko): Test subframe targeting of postMessage once |
939 // http://crbug.com/153701 is fixed. | 939 // http://crbug.com/153701 is fixed. |
940 } | 940 } |
941 | 941 |
942 // Test for crbug.com/278336. MessagePorts should work cross-process. I.e., | 942 // Test for crbug.com/278336. MessagePorts should work cross-process. Messages |
943 // messages which contain Transferables and get intercepted by | 943 // which contain Transferables that need to be forwarded between processes via |
944 // RenderViewImpl::willCheckAndDispatchMessageEvent (because the RenderView is | 944 // RenderFrameProxy::willCheckAndDispatchMessageEvent should work. |
945 // swapped out) should work. | |
946 // Specifically: | 945 // Specifically: |
947 // 1) Create 2 windows (opener and "foo") and send "foo" cross-process. | 946 // 1) Create 2 windows (opener and "foo") and send "foo" cross-process. |
948 // 2) Post a message containing a message port from opener to "foo". | 947 // 2) Post a message containing a message port from opener to "foo". |
949 // 3) Post a message from "foo" back to opener via the passed message port. | 948 // 3) Post a message from "foo" back to opener via the passed message port. |
950 // The test will be enabled when the feature implementation lands. | 949 // The test will be enabled when the feature implementation lands. |
951 IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, | 950 IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, |
952 SupportCrossProcessPostMessageWithMessagePort) { | 951 SupportCrossProcessPostMessageWithMessagePort) { |
953 StartEmbeddedServer(); | 952 StartEmbeddedServer(); |
954 | 953 |
955 // Load a page with links that open in a new window. | 954 // Load a page with links that open in a new window. |
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2714 | 2713 |
2715 // Simulate a ctrl click on the link. This won't actually create a new Shell | 2714 // Simulate a ctrl click on the link. This won't actually create a new Shell |
2716 // because Shell::OpenURLFromTab only supports CURRENT_TAB, but it's enough to | 2715 // because Shell::OpenURLFromTab only supports CURRENT_TAB, but it's enough to |
2717 // trigger the crash from https://crbug.com/605055. | 2716 // trigger the crash from https://crbug.com/605055. |
2718 EXPECT_TRUE( | 2717 EXPECT_TRUE( |
2719 ExecuteScript(shell()->web_contents(), | 2718 ExecuteScript(shell()->web_contents(), |
2720 "window.domAutomationController.send(ctrlClickLink());")); | 2719 "window.domAutomationController.send(ctrlClickLink());")); |
2721 } | 2720 } |
2722 | 2721 |
2723 } // namespace content | 2722 } // namespace content |
OLD | NEW |