Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Side by Side Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 647613002: Fix RenderWidgetHostViewGuest leak. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bring back mac delegate() Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 // Reset the view so we can exit the test cleanly. 755 // Reset the view so we can exit the test cleanly.
756 host_->SetView(view_.get()); 756 host_->SetView(view_.get());
757 } 757 }
758 758
759 // Unable to include render_widget_host_view_mac.h and compile. 759 // Unable to include render_widget_host_view_mac.h and compile.
760 #if !defined(OS_MACOSX) 760 #if !defined(OS_MACOSX)
761 // Tests setting background transparency. 761 // Tests setting background transparency.
762 TEST_F(RenderWidgetHostTest, Background) { 762 TEST_F(RenderWidgetHostTest, Background) {
763 scoped_ptr<RenderWidgetHostViewBase> view; 763 scoped_ptr<RenderWidgetHostViewBase> view;
764 #if defined(USE_AURA) 764 #if defined(USE_AURA)
765 view.reset(new RenderWidgetHostViewAura(host_.get())); 765 view.reset(new RenderWidgetHostViewAura(host_.get(), false));
766 // TODO(derat): Call this on all platforms: http://crbug.com/102450. 766 // TODO(derat): Call this on all platforms: http://crbug.com/102450.
767 view->InitAsChild(NULL); 767 view->InitAsChild(NULL);
768 #elif defined(OS_ANDROID) 768 #elif defined(OS_ANDROID)
769 view.reset(new RenderWidgetHostViewAndroid(host_.get(), NULL)); 769 view.reset(new RenderWidgetHostViewAndroid(host_.get(), NULL));
770 #endif 770 #endif
771 host_->SetView(view.get()); 771 host_->SetView(view.get());
772 772
773 EXPECT_TRUE(view->GetBackgroundOpaque()); 773 EXPECT_TRUE(view->GetBackgroundOpaque());
774 view->SetBackgroundOpaque(false); 774 view->SetBackgroundOpaque(false);
775 EXPECT_FALSE(view->GetBackgroundOpaque()); 775 EXPECT_FALSE(view->GetBackgroundOpaque());
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 1500
1501 ASSERT_TRUE(host_->is_hidden()); 1501 ASSERT_TRUE(host_->is_hidden());
1502 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1); 1502 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1);
1503 ASSERT_FALSE(host_->is_hidden()); 1503 ASSERT_FALSE(host_->is_hidden());
1504 1504
1505 // Make sure the input router is in a fresh state. 1505 // Make sure the input router is in a fresh state.
1506 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); 1506 ASSERT_FALSE(host_->input_router()->HasPendingEvents());
1507 } 1507 }
1508 1508
1509 } // namespace content 1509 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/DEPS ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698