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

Unified Diff: device/bluetooth/bluetooth_adapter_win_unittest.cc

Issue 2331423002: Replace TestSimpleTaskRunner::GetPendingTasks with TakePendingTasks (Closed)
Patch Set: split test 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_adapter_win_unittest.cc
diff --git a/device/bluetooth/bluetooth_adapter_win_unittest.cc b/device/bluetooth/bluetooth_adapter_win_unittest.cc
index b88efef2215d91f89d4871abd4dff13422d9315c..e5126e8cf59344ae43ae4c002095060ea4386ff2 100644
--- a/device/bluetooth/bluetooth_adapter_win_unittest.cc
+++ b/device/bluetooth/bluetooth_adapter_win_unittest.cc
@@ -248,7 +248,7 @@ TEST_F(BluetoothAdapterWinTest, MultipleStartDiscoveriesAfterDiscovering) {
base::Unretained(this)),
DiscoverySessionErrorCallback());
EXPECT_TRUE(adapter_->IsDiscovering());
- EXPECT_TRUE(bluetooth_task_runner_->GetPendingTasks().empty());
+ EXPECT_FALSE(bluetooth_task_runner_->HasPendingTask());
EXPECT_FALSE(ui_task_runner_->HasPendingTask());
EXPECT_EQ(num_start_discovery_callbacks + 1,
num_start_discovery_callbacks_);
@@ -292,7 +292,7 @@ TEST_F(BluetoothAdapterWinTest, SingleStopDiscovery) {
ui_task_runner_->RunPendingTasks();
EXPECT_FALSE(adapter_->IsDiscovering());
EXPECT_EQ(1, num_stop_discovery_callbacks_);
- EXPECT_TRUE(bluetooth_task_runner_->GetPendingTasks().empty());
+ EXPECT_FALSE(bluetooth_task_runner_->HasPendingTask());
EXPECT_EQ(2, observer_.discovering_changed_count());
}
@@ -309,7 +309,7 @@ TEST_F(BluetoothAdapterWinTest, MultipleStopDiscoveries) {
base::Bind(&BluetoothAdapterWinTest::IncrementNumStopDiscoveryCallbacks,
base::Unretained(this)),
DiscoverySessionErrorCallback());
- EXPECT_TRUE(bluetooth_task_runner_->GetPendingTasks().empty());
+ EXPECT_FALSE(bluetooth_task_runner_->HasPendingTask());
ui_task_runner_->RunPendingTasks();
EXPECT_EQ(i + 1, num_stop_discovery_callbacks_);
}
@@ -343,7 +343,7 @@ TEST_F(BluetoothAdapterWinTest,
base::Bind(&BluetoothAdapterWinTest::IncrementNumStopDiscoveryCallbacks,
base::Unretained(this)),
DiscoverySessionErrorCallback());
- EXPECT_TRUE(bluetooth_task_runner_->GetPendingTasks().empty());
+ EXPECT_FALSE(bluetooth_task_runner_->HasPendingTask());
CallRemoveDiscoverySession(
base::Bind(&BluetoothAdapterWinTest::IncrementNumStopDiscoveryCallbacks,
base::Unretained(this)),
@@ -409,7 +409,7 @@ TEST_F(BluetoothAdapterWinTest, StartAndStopBeforeDiscoveryStarted) {
}
bluetooth_task_runner_->ClearPendingTasks();
adapter_win_->DiscoveryStarted(true);
- EXPECT_TRUE(bluetooth_task_runner_->GetPendingTasks().empty());
+ EXPECT_FALSE(bluetooth_task_runner_->HasPendingTask());
ui_task_runner_->RunPendingTasks();
EXPECT_EQ(num_expected_start_discoveries, num_start_discovery_callbacks_);
EXPECT_EQ(num_expected_stop_discoveries, num_stop_discovery_callbacks_);
« no previous file with comments | « components/policy/core/common/policy_statistics_collector_unittest.cc ('k') | device/bluetooth/test/bluetooth_test_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698