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.h" | 8 #include "base/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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 view_->Destroy(); | 44 view_->Destroy(); |
45 delete widget_host_; | 45 delete widget_host_; |
46 | 46 |
47 browser_context_.reset(); | 47 browser_context_.reset(); |
48 | 48 |
49 message_loop_.DeleteSoon(FROM_HERE, browser_context_.release()); | 49 message_loop_.DeleteSoon(FROM_HERE, browser_context_.release()); |
50 message_loop_.RunUntilIdle(); | 50 message_loop_.RunUntilIdle(); |
51 } | 51 } |
52 | 52 |
53 protected: | 53 protected: |
54 MessageLoopForUI message_loop_; | 54 base::MessageLoopForUI message_loop_; |
55 scoped_ptr<BrowserContext> browser_context_; | 55 scoped_ptr<BrowserContext> browser_context_; |
56 MockRenderWidgetHostDelegate delegate_; | 56 MockRenderWidgetHostDelegate delegate_; |
57 | 57 |
58 // Tests should set these to NULL if they've already triggered their | 58 // Tests should set these to NULL if they've already triggered their |
59 // destruction. | 59 // destruction. |
60 RenderWidgetHostImpl* widget_host_; | 60 RenderWidgetHostImpl* widget_host_; |
61 RenderWidgetHostViewGuest* view_; | 61 RenderWidgetHostViewGuest* view_; |
62 | 62 |
63 scoped_ptr<TestRenderWidgetHostView> test_platform_view_; | 63 scoped_ptr<TestRenderWidgetHostView> test_platform_view_; |
64 | 64 |
(...skipping 11 matching lines...) Expand all Loading... |
76 ASSERT_FALSE(view_->IsShowing()); | 76 ASSERT_FALSE(view_->IsShowing()); |
77 | 77 |
78 view_->WasShown(); | 78 view_->WasShown(); |
79 ASSERT_TRUE(view_->IsShowing()); | 79 ASSERT_TRUE(view_->IsShowing()); |
80 | 80 |
81 view_->WasHidden(); | 81 view_->WasHidden(); |
82 ASSERT_FALSE(view_->IsShowing()); | 82 ASSERT_FALSE(view_->IsShowing()); |
83 } | 83 } |
84 | 84 |
85 } // namespace content | 85 } // namespace content |
OLD | NEW |