Commit 5613eb86 authored by juncai's avatar juncai Committed by Commit bot

Add unit test for BluetoothChooserController

With more functionalities added to BluetoothChooserController,
it is necessary to add unit test to it.

BUG=639163

Review-Url: https://codereview.chromium.org/2275173002
Cr-Commit-Position: refs/heads/master@{#416408}
parent 1e332ed5
......@@ -239,6 +239,7 @@ void BluetoothChooserController::RemoveDevice(const std::string& device_id) {
});
if (device_it != devices_.end()) {
size_t index = device_it - devices_.begin();
devices_.erase(device_it);
const auto& it = device_name_counts_.find(name_it->second);
......@@ -251,7 +252,7 @@ void BluetoothChooserController::RemoveDevice(const std::string& device_id) {
device_id_to_name_map_.erase(name_it);
if (view())
view()->OnOptionRemoved(device_it - devices_.begin());
view()->OnOptionRemoved(index);
}
}
......
......@@ -379,6 +379,7 @@
'browser/renderer_context_menu/render_view_context_menu_test_util.h',
'browser/ui/autofill/country_combobox_model_unittest.cc',
'browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc',
'browser/ui/bluetooth/bluetooth_chooser_controller_unittest.cc',
'browser/ui/passwords/manage_passwords_ui_controller_unittest.cc',
],
'chrome_unit_tests_spellchecker_sources': [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment