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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest_unittest.cc

Issue 2112923002: Fix crash when destroying a RenderWidgetHost that holds the pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 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 24 matching lines...) Expand all
35 public: 35 public:
36 MockRenderWidgetHostDelegate() {} 36 MockRenderWidgetHostDelegate() {}
37 ~MockRenderWidgetHostDelegate() override {} 37 ~MockRenderWidgetHostDelegate() override {}
38 38
39 private: 39 private:
40 // RenderWidgetHostDelegate: 40 // RenderWidgetHostDelegate:
41 void Cut() override {} 41 void Cut() override {}
42 void Copy() override {} 42 void Copy() override {}
43 void Paste() override {} 43 void Paste() override {}
44 void SelectAll() override {} 44 void SelectAll() override {}
45 bool HasMouseLock(RenderWidgetHostImpl*) override { return false; }
45 }; 46 };
46 47
47 class RenderWidgetHostViewGuestTest : public testing::Test { 48 class RenderWidgetHostViewGuestTest : public testing::Test {
48 public: 49 public:
49 RenderWidgetHostViewGuestTest() {} 50 RenderWidgetHostViewGuestTest() {}
50 51
51 void SetUp() override { 52 void SetUp() override {
52 #if !defined(OS_ANDROID) 53 #if !defined(OS_ANDROID)
53 ImageTransportFactory::InitializeForUnitTests( 54 ImageTransportFactory::InitializeForUnitTests(
54 std::unique_ptr<ImageTransportFactory>( 55 std::unique_ptr<ImageTransportFactory>(
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 283
283 browser_plugin_guest_->set_attached(false); 284 browser_plugin_guest_->set_attached(false);
284 browser_plugin_guest_->ResetTestData(); 285 browser_plugin_guest_->ResetTestData();
285 286
286 view_->OnSwapCompositorFrame( 287 view_->OnSwapCompositorFrame(
287 0, CreateDelegatedFrame(scale_factor, view_size, view_rect)); 288 0, CreateDelegatedFrame(scale_factor, view_size, view_rect));
288 EXPECT_TRUE(surface_id().is_null()); 289 EXPECT_TRUE(surface_id().is_null());
289 } 290 }
290 291
291 } // namespace content 292 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698