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 "base/debug/leak_annotations.h" | 6 #include "base/debug/leak_annotations.h" |
7 #include "content/common/frame_messages.h" | 7 #include "content/common/frame_messages.h" |
8 #include "content/common/view_messages.h" | 8 #include "content/common/view_messages.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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 widget_params.hidden = false; | 43 widget_params.hidden = false; |
44 | 44 |
45 IsolateAllSitesForTesting(base::CommandLine::ForCurrentProcess()); | 45 IsolateAllSitesForTesting(base::CommandLine::ForCurrentProcess()); |
46 | 46 |
47 LoadHTML("Parent frame <iframe name='frame'></iframe>"); | 47 LoadHTML("Parent frame <iframe name='frame'></iframe>"); |
48 | 48 |
49 RenderFrameImpl::FromWebFrame( | 49 RenderFrameImpl::FromWebFrame( |
50 view_->GetMainRenderFrame()->GetWebFrame()->firstChild()) | 50 view_->GetMainRenderFrame()->GetWebFrame()->firstChild()) |
51 ->OnSwapOut(kFrameProxyRouteId, false, FrameReplicationState()); | 51 ->OnSwapOut(kFrameProxyRouteId, false, FrameReplicationState()); |
52 | 52 |
53 RenderFrameImpl::CreateFrame(kSubframeRouteId, kFrameProxyRouteId, | 53 RenderFrameImpl::CreateFrame(kSubframeRouteId, MSG_ROUTING_NONE, |
54 MSG_ROUTING_NONE, MSG_ROUTING_NONE, | 54 MSG_ROUTING_NONE, kFrameProxyRouteId, |
55 FrameReplicationState(), &compositor_deps_, | 55 MSG_ROUTING_NONE, FrameReplicationState(), |
56 widget_params); | 56 &compositor_deps_, widget_params); |
57 | 57 |
58 frame_ = RenderFrameImpl::FromRoutingID(kSubframeRouteId); | 58 frame_ = RenderFrameImpl::FromRoutingID(kSubframeRouteId); |
59 EXPECT_TRUE(frame_->is_subframe_); | 59 EXPECT_TRUE(frame_->is_subframe_); |
60 } | 60 } |
61 | 61 |
62 void TearDown() override { | 62 void TearDown() override { |
63 #if defined(LEAK_SANITIZER) | 63 #if defined(LEAK_SANITIZER) |
64 // Do this before shutting down V8 in RenderViewTest::TearDown(). | 64 // Do this before shutting down V8 in RenderViewTest::TearDown(). |
65 // http://crbug.com/328552 | 65 // http://crbug.com/328552 |
66 __lsan_do_leak_check(); | 66 __lsan_do_leak_check(); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 RenderFrameTestObserver observer(frame()); | 150 RenderFrameTestObserver observer(frame()); |
151 | 151 |
152 ViewMsg_WasShown was_shown_message(0, true, ui::LatencyInfo()); | 152 ViewMsg_WasShown was_shown_message(0, true, ui::LatencyInfo()); |
153 frame_widget()->OnMessageReceived(was_shown_message); | 153 frame_widget()->OnMessageReceived(was_shown_message); |
154 | 154 |
155 EXPECT_FALSE(frame_widget()->is_hidden()); | 155 EXPECT_FALSE(frame_widget()->is_hidden()); |
156 EXPECT_TRUE(observer.visible()); | 156 EXPECT_TRUE(observer.visible()); |
157 } | 157 } |
158 | 158 |
159 } // namespace | 159 } // namespace |
OLD | NEW |