| 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, MSG_ROUTING_NONE, | 56 MSG_ROUTING_NONE, FrameReplicationState(), |
| 57 FrameReplicationState(), | |
| 58 compositor_deps_.get(), widget_params); | 57 compositor_deps_.get(), widget_params); |
| 59 | 58 |
| 60 frame_ = RenderFrameImpl::FromRoutingID(kSubframeRouteId); | 59 frame_ = RenderFrameImpl::FromRoutingID(kSubframeRouteId); |
| 61 } | 60 } |
| 62 | 61 |
| 63 // Loads the given HTML into the frame as a data: URL and blocks until | 62 // Loads the given HTML into the frame as a data: URL and blocks until |
| 64 // the navigation is committed. | 63 // the navigation is committed. |
| 65 void LoadHTMLInFrame(const char* html) { | 64 void LoadHTMLInFrame(const char* html) { |
| 66 std::string url_str = "data:text/html;charset=utf-8,"; | 65 std::string url_str = "data:text/html;charset=utf-8,"; |
| 67 url_str.append(html); | 66 url_str.append(html); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 139 |
| 141 scoped_ptr<IPC::Message> was_shown_message( | 140 scoped_ptr<IPC::Message> was_shown_message( |
| 142 new ViewMsg_WasShown(0, true, ui::LatencyInfo())); | 141 new ViewMsg_WasShown(0, true, ui::LatencyInfo())); |
| 143 FrameWidget()->OnMessageReceived(*was_shown_message); | 142 FrameWidget()->OnMessageReceived(*was_shown_message); |
| 144 | 143 |
| 145 EXPECT_FALSE(FrameWidget()->is_hidden()); | 144 EXPECT_FALSE(FrameWidget()->is_hidden()); |
| 146 EXPECT_TRUE(observer.visible()); | 145 EXPECT_TRUE(observer.visible()); |
| 147 } | 146 } |
| 148 | 147 |
| 149 } // namespace | 148 } // namespace |
| OLD | NEW |