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

Unified Diff: device/bluetooth/bluetooth_task_manager_win_unittest.cc

Issue 2296923003: Make TestSimpleTaskRunner thread-safe. (Closed)
Patch Set: fix asan error Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_task_manager_win_unittest.cc
diff --git a/device/bluetooth/bluetooth_task_manager_win_unittest.cc b/device/bluetooth/bluetooth_task_manager_win_unittest.cc
index 5071dffb7b972ecb15606157ac6c1c47f0346631..9ffd07ec6935565c74017145e2c20d8e62fd6086 100644
--- a/device/bluetooth/bluetooth_task_manager_win_unittest.cc
+++ b/device/bluetooth/bluetooth_task_manager_win_unittest.cc
@@ -82,14 +82,14 @@ class BluetoothTaskManagerWinTest : public testing::Test {
};
TEST_F(BluetoothTaskManagerWinTest, StartPolling) {
- EXPECT_EQ(1u, bluetooth_task_runner_->GetPendingTasks().size());
+ EXPECT_EQ(1u, bluetooth_task_runner_->NumPendingTasks());
}
TEST_F(BluetoothTaskManagerWinTest, PollAdapterIfBluetoothStackIsAvailable) {
bluetooth_task_runner_->RunPendingTasks();
size_t num_expected_pending_tasks = has_bluetooth_stack_ ? 1 : 0;
EXPECT_EQ(num_expected_pending_tasks,
- bluetooth_task_runner_->GetPendingTasks().size());
+ bluetooth_task_runner_->NumPendingTasks());
}
TEST_F(BluetoothTaskManagerWinTest, Polling) {
@@ -114,9 +114,9 @@ TEST_F(BluetoothTaskManagerWinTest, SetPowered) {
base::Closure closure;
task_manager_->PostSetPoweredBluetoothTask(true, closure, closure);
- EXPECT_EQ(1u, bluetooth_task_runner_->GetPendingTasks().size());
+ EXPECT_EQ(1u, bluetooth_task_runner_->NumPendingTasks());
bluetooth_task_runner_->RunPendingTasks();
- EXPECT_TRUE(ui_task_runner_->GetPendingTasks().size() >= 1);
+ EXPECT_TRUE(ui_task_runner_->NumPendingTasks() >= 1);
}
TEST_F(BluetoothTaskManagerWinTest, Discovery) {
« base/test/test_simple_task_runner.h ('K') | « device/bluetooth/bluetooth_adapter_win_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698