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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 #include <tuple> | 7 #include <tuple> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/json/json_reader.h" | 12 #include "base/json/json_reader.h" |
13 #include "base/json/json_writer.h" | 13 #include "base/json/json_writer.h" |
14 #include "base/location.h" | 14 #include "base/location.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
19 #include "base/threading/thread_task_runner_handle.h" | 19 #include "base/threading/thread_task_runner_handle.h" |
20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
21 #include "base/values.h" | 21 #include "base/values.h" |
22 #include "base/win/windows_version.h" | 22 #include "base/win/windows_version.h" |
23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
24 #include "cc/trees/layer_tree_host.h" | 24 #include "cc/trees/layer_tree_host.h" |
25 #include "content/child/request_extra_data.h" | 25 #include "content/child/request_extra_data.h" |
26 #include "content/child/service_worker/service_worker_network_provider.h" | 26 #include "content/child/service_worker/service_worker_network_provider.h" |
27 #include "content/common/content_switches_internal.h" | 27 #include "content/common/content_switches_internal.h" |
28 #include "content/common/frame_messages.h" | 28 #include "content/common/frame_messages.h" |
| 29 #include "content/common/frame_owner_properties.h" |
29 #include "content/common/frame_replication_state.h" | 30 #include "content/common/frame_replication_state.h" |
30 #include "content/common/site_isolation_policy.h" | 31 #include "content/common/site_isolation_policy.h" |
31 #include "content/common/ssl_status_serialization.h" | 32 #include "content/common/ssl_status_serialization.h" |
32 #include "content/common/view_messages.h" | 33 #include "content/common/view_messages.h" |
33 #include "content/public/browser/browser_context.h" | 34 #include "content/public/browser/browser_context.h" |
34 #include "content/public/browser/native_web_keyboard_event.h" | 35 #include "content/public/browser/native_web_keyboard_event.h" |
35 #include "content/public/browser/web_ui_controller_factory.h" | 36 #include "content/public/browser/web_ui_controller_factory.h" |
36 #include "content/public/common/bindings_policy.h" | 37 #include "content/public/common/bindings_policy.h" |
37 #include "content/public/common/browser_side_navigation_policy.h" | 38 #include "content/public/common/browser_side_navigation_policy.h" |
38 #include "content/public/common/content_switches.h" | 39 #include "content/public/common/content_switches.h" |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 | 891 |
891 // Do the first step of a remote-to-local transition for the child proxy, | 892 // Do the first step of a remote-to-local transition for the child proxy, |
892 // which is to create a provisional local frame. | 893 // which is to create a provisional local frame. |
893 int routing_id = kProxyRoutingId + 1; | 894 int routing_id = kProxyRoutingId + 1; |
894 FrameMsg_NewFrame_WidgetParams widget_params; | 895 FrameMsg_NewFrame_WidgetParams widget_params; |
895 widget_params.routing_id = MSG_ROUTING_NONE; | 896 widget_params.routing_id = MSG_ROUTING_NONE; |
896 widget_params.hidden = false; | 897 widget_params.hidden = false; |
897 RenderFrameImpl::CreateFrame(routing_id, kProxyRoutingId, MSG_ROUTING_NONE, | 898 RenderFrameImpl::CreateFrame(routing_id, kProxyRoutingId, MSG_ROUTING_NONE, |
898 frame()->GetRoutingID(), MSG_ROUTING_NONE, | 899 frame()->GetRoutingID(), MSG_ROUTING_NONE, |
899 replication_state, nullptr, widget_params, | 900 replication_state, nullptr, widget_params, |
900 blink::WebFrameOwnerProperties()); | 901 FrameOwnerProperties()); |
901 TestRenderFrame* provisional_frame = | 902 TestRenderFrame* provisional_frame = |
902 static_cast<TestRenderFrame*>(RenderFrameImpl::FromRoutingID(routing_id)); | 903 static_cast<TestRenderFrame*>(RenderFrameImpl::FromRoutingID(routing_id)); |
903 EXPECT_TRUE(provisional_frame); | 904 EXPECT_TRUE(provisional_frame); |
904 | 905 |
905 // Detach the child frame (currently remote) in the main frame. | 906 // Detach the child frame (currently remote) in the main frame. |
906 ExecuteJavaScriptForTests( | 907 ExecuteJavaScriptForTests( |
907 "document.body.removeChild(document.querySelector('iframe'));"); | 908 "document.body.removeChild(document.querySelector('iframe'));"); |
908 RenderFrameProxy* child_proxy = | 909 RenderFrameProxy* child_proxy = |
909 RenderFrameProxy::FromRoutingID(kProxyRoutingId); | 910 RenderFrameProxy::FromRoutingID(kProxyRoutingId); |
910 EXPECT_FALSE(child_proxy); | 911 EXPECT_FALSE(child_proxy); |
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2495 ExpectPauseAndResume(3); | 2496 ExpectPauseAndResume(3); |
2496 blink::WebScriptSource source2( | 2497 blink::WebScriptSource source2( |
2497 WebString::fromUTF8("function func2() { func1(); }; func2();")); | 2498 WebString::fromUTF8("function func2() { func1(); }; func2();")); |
2498 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); | 2499 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); |
2499 | 2500 |
2500 EXPECT_FALSE(IsPaused()); | 2501 EXPECT_FALSE(IsPaused()); |
2501 Detach(); | 2502 Detach(); |
2502 } | 2503 } |
2503 | 2504 |
2504 } // namespace content | 2505 } // namespace content |
OLD | NEW |