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 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2751 TestNavigationObserver commit_observer(web_contents); | 2750 TestNavigationObserver commit_observer(web_contents); |
2752 shell()->LoadURL(embedded_test_server()->GetURL("b.com", "/title1.html")); | 2751 shell()->LoadURL(embedded_test_server()->GetURL("b.com", "/title1.html")); |
2753 commit_observer.Wait(); | 2752 commit_observer.Wait(); |
2754 exit_observer.Wait(); | 2753 exit_observer.Wait(); |
2755 | 2754 |
2756 // Ensure the entry's title hasn't changed after the ignored commit. | 2755 // Ensure the entry's title hasn't changed after the ignored commit. |
2757 EXPECT_EQ(title, entry->GetTitle()); | 2756 EXPECT_EQ(title, entry->GetTitle()); |
2758 } | 2757 } |
2759 | 2758 |
2760 } // namespace content | 2759 } // namespace content |
OLD | NEW |