| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |