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

Side by Side Diff: content/browser/bluetooth/frame_connected_bluetooth_devices_unittest.cc

Issue 2038843003: bluetooth: Don't call methods of WebContentsImpl while it's being destroyed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove test Created 4 years, 6 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
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/bluetooth/frame_connected_bluetooth_devices.h" 5 #include "content/browser/bluetooth/frame_connected_bluetooth_devices.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "content/test/test_render_view_host.h" 9 #include "content/test/test_render_view_host.h"
10 #include "content/test/test_web_contents.h" 10 #include "content/test/test_web_contents.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 map0_.reset(); 347 map0_.reset();
348 348
349 // WebContents should still be connected because of map1_. 349 // WebContents should still be connected because of map1_.
350 EXPECT_TRUE(contents()->IsConnectedToBluetoothDevice()); 350 EXPECT_TRUE(contents()->IsConnectedToBluetoothDevice());
351 351
352 map1_.reset(); 352 map1_.reset();
353 353
354 EXPECT_FALSE(contents()->IsConnectedToBluetoothDevice()); 354 EXPECT_FALSE(contents()->IsConnectedToBluetoothDevice());
355 } 355 }
356 356
357 TEST_F(FrameConnectedBluetoothDevicesTest,
358 DestroyedByWebContentsImplDestruction) {
359 // Tests that we don't crash when FrameConnectedBluetoothDevices contains
360 // at least one device, and it is destroyed while WebContentsImpl is being
361 // destroyed.
362
363 // TODO(ortuno): Write test.
364 // http://crbug.com/615319
365 }
366
357 } // namespace content 367 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698