OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame_host/render_widget_host_view_guest.h" | 5 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 void TearDown() override { | 76 void TearDown() override { |
77 if (view_) | 77 if (view_) |
78 view_->Destroy(); | 78 view_->Destroy(); |
79 delete widget_host_; | 79 delete widget_host_; |
80 | 80 |
81 browser_context_.reset(); | 81 browser_context_.reset(); |
82 | 82 |
83 message_loop_.task_runner()->DeleteSoon(FROM_HERE, | 83 message_loop_.task_runner()->DeleteSoon(FROM_HERE, |
84 browser_context_.release()); | 84 browser_context_.release()); |
85 message_loop_.RunUntilIdle(); | 85 base::RunLoop().RunUntilIdle(); |
86 #if !defined(OS_ANDROID) | 86 #if !defined(OS_ANDROID) |
87 ImageTransportFactory::Terminate(); | 87 ImageTransportFactory::Terminate(); |
88 #else | 88 #else |
89 ui::ContextProviderFactory::SetInstance(nullptr); | 89 ui::ContextProviderFactory::SetInstance(nullptr); |
90 #endif | 90 #endif |
91 } | 91 } |
92 | 92 |
93 protected: | 93 protected: |
94 base::MessageLoopForUI message_loop_; | 94 base::MessageLoopForUI message_loop_; |
95 std::unique_ptr<BrowserContext> browser_context_; | 95 std::unique_ptr<BrowserContext> browser_context_; |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 293 |
294 browser_plugin_guest_->set_attached(false); | 294 browser_plugin_guest_->set_attached(false); |
295 browser_plugin_guest_->ResetTestData(); | 295 browser_plugin_guest_->ResetTestData(); |
296 | 296 |
297 view_->OnSwapCompositorFrame( | 297 view_->OnSwapCompositorFrame( |
298 0, CreateDelegatedFrame(scale_factor, view_size, view_rect)); | 298 0, CreateDelegatedFrame(scale_factor, view_size, view_rect)); |
299 EXPECT_TRUE(surface_id().is_null()); | 299 EXPECT_TRUE(surface_id().is_null()); |
300 } | 300 } |
301 | 301 |
302 } // namespace content | 302 } // namespace content |
OLD | NEW |