OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "content/common/frame_messages.h" | 6 #include "content/common/frame_messages.h" |
7 #include "content/common/view_messages.h" | 7 #include "content/common/view_messages.h" |
8 #include "content/public/common/content_switches.h" | 8 #include "content/public/common/content_switches.h" |
9 #include "content/public/test/frame_load_waiter.h" | 9 #include "content/public/test/frame_load_waiter.h" |
10 #include "content/public/test/render_view_test.h" | 10 #include "content/public/test/render_view_test.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 LoadHTML("Parent frame <iframe name='frame'></iframe>"); | 47 LoadHTML("Parent frame <iframe name='frame'></iframe>"); |
48 | 48 |
49 FrameReplicationState replicationState("frame"); | 49 FrameReplicationState replicationState("frame"); |
50 | 50 |
51 RenderFrameImpl::FromWebFrame( | 51 RenderFrameImpl::FromWebFrame( |
52 view_->GetMainRenderFrame()->GetWebFrame()->firstChild()) | 52 view_->GetMainRenderFrame()->GetWebFrame()->firstChild()) |
53 ->OnSwapOut(kFrameProxyRouteId, false, FrameReplicationState()); | 53 ->OnSwapOut(kFrameProxyRouteId, false, FrameReplicationState()); |
54 | 54 |
55 RenderFrameImpl::CreateFrame(kSubframeRouteId, kFrameProxyRouteId, | 55 RenderFrameImpl::CreateFrame(kSubframeRouteId, kFrameProxyRouteId, |
56 MSG_ROUTING_NONE, FrameReplicationState(), | 56 MSG_ROUTING_NONE, MSG_ROUTING_NONE, |
| 57 FrameReplicationState(), |
57 compositor_deps_.get(), widget_params); | 58 compositor_deps_.get(), widget_params); |
58 | 59 |
59 frame_ = RenderFrameImpl::FromRoutingID(kSubframeRouteId); | 60 frame_ = RenderFrameImpl::FromRoutingID(kSubframeRouteId); |
60 } | 61 } |
61 | 62 |
62 // Loads the given HTML into the frame as a data: URL and blocks until | 63 // Loads the given HTML into the frame as a data: URL and blocks until |
63 // the navigation is committed. | 64 // the navigation is committed. |
64 void LoadHTMLInFrame(const char* html) { | 65 void LoadHTMLInFrame(const char* html) { |
65 std::string url_str = "data:text/html;charset=utf-8,"; | 66 std::string url_str = "data:text/html;charset=utf-8,"; |
66 url_str.append(html); | 67 url_str.append(html); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 140 |
140 scoped_ptr<IPC::Message> was_shown_message( | 141 scoped_ptr<IPC::Message> was_shown_message( |
141 new ViewMsg_WasShown(0, true, ui::LatencyInfo())); | 142 new ViewMsg_WasShown(0, true, ui::LatencyInfo())); |
142 FrameWidget()->OnMessageReceived(*was_shown_message); | 143 FrameWidget()->OnMessageReceived(*was_shown_message); |
143 | 144 |
144 EXPECT_FALSE(FrameWidget()->is_hidden()); | 145 EXPECT_FALSE(FrameWidget()->is_hidden()); |
145 EXPECT_TRUE(observer.visible()); | 146 EXPECT_TRUE(observer.visible()); |
146 } | 147 } |
147 | 148 |
148 } // namespace | 149 } // namespace |
OLD | NEW |