OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/browser/renderer_host/render_widget_host_view_guest.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_guest.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 9 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
10 #include "content/browser/renderer_host/render_widget_host_impl.h" | 10 #include "content/browser/renderer_host/render_widget_host_impl.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 class RenderWidgetHostViewGuestTest : public testing::Test { | 26 class RenderWidgetHostViewGuestTest : public testing::Test { |
27 public: | 27 public: |
28 RenderWidgetHostViewGuestTest() {} | 28 RenderWidgetHostViewGuestTest() {} |
29 | 29 |
30 virtual void SetUp() { | 30 virtual void SetUp() { |
31 browser_context_.reset(new TestBrowserContext); | 31 browser_context_.reset(new TestBrowserContext); |
32 MockRenderProcessHost* process_host = | 32 MockRenderProcessHost* process_host = |
33 new MockRenderProcessHost(browser_context_.get()); | 33 new MockRenderProcessHost(browser_context_.get()); |
34 widget_host_ = new RenderWidgetHostImpl( | 34 widget_host_ = new RenderWidgetHostImpl( |
35 &delegate_, process_host, MSG_ROUTING_NONE); | 35 &delegate_, process_host, MSG_ROUTING_NONE, false); |
36 view_ = new RenderWidgetHostViewGuest( | 36 view_ = new RenderWidgetHostViewGuest( |
37 widget_host_, NULL, new TestRenderWidgetHostView(widget_host_)); | 37 widget_host_, NULL, new TestRenderWidgetHostView(widget_host_)); |
38 } | 38 } |
39 | 39 |
40 virtual void TearDown() { | 40 virtual void TearDown() { |
41 if (view_) | 41 if (view_) |
42 view_->Destroy(); | 42 view_->Destroy(); |
43 delete widget_host_; | 43 delete widget_host_; |
44 | 44 |
45 browser_context_.reset(); | 45 browser_context_.reset(); |
(...skipping 26 matching lines...) Expand all Loading... |
72 ASSERT_FALSE(view_->IsShowing()); | 72 ASSERT_FALSE(view_->IsShowing()); |
73 | 73 |
74 view_->WasShown(); | 74 view_->WasShown(); |
75 ASSERT_TRUE(view_->IsShowing()); | 75 ASSERT_TRUE(view_->IsShowing()); |
76 | 76 |
77 view_->WasHidden(); | 77 view_->WasHidden(); |
78 ASSERT_FALSE(view_->IsShowing()); | 78 ASSERT_FALSE(view_->IsShowing()); |
79 } | 79 } |
80 | 80 |
81 } // namespace content | 81 } // namespace content |
OLD | NEW |