Commit 9d6307e3 authored by Giovanni Ortuño Urquidi's avatar Giovanni Ortuño Urquidi Committed by Commit Bot

bluetooth: Small test improvement

Changes two tests to reset the received events before continuing the
test. This makes it more consistent with other tests and makes it
clearer how the state changes at each point in the tests.

Bug: 896113
Change-Id: I06b963fa0cab0f0a1bf8bb72145711636c77ddae
Reviewed-on: https://chromium-review.googlesource.com/c/1292663Reviewed-by: default avatarOvidio Henriquez <odejesush@chromium.org>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601747}
parent 58a6294a
......@@ -610,14 +610,14 @@ TEST_F(BluetoothSystemTest, SetPoweredOff_SucceedsAdapterInitiallyOn) {
GetStateAndWait(system));
EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kTransitioning}),
on_state_changed_states_);
ResetResults();
test_bluetooth_adapter_client_->SimulateSetPoweredCompleted(
kFooObjectPathStr);
EXPECT_EQ(mojom::BluetoothSystem::State::kPoweredOff,
GetStateAndWait(system));
EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kTransitioning,
mojom::BluetoothSystem::State::kPoweredOff}),
EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kPoweredOff}),
on_state_changed_states_);
}
......@@ -638,13 +638,13 @@ TEST_F(BluetoothSystemTest, SetPoweredOn_SucceedsAdapterInitiallyOff) {
GetStateAndWait(system));
EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kTransitioning}),
on_state_changed_states_);
ResetResults();
test_bluetooth_adapter_client_->SimulateSetPoweredCompleted(
kFooObjectPathStr);
EXPECT_EQ(mojom::BluetoothSystem::State::kPoweredOn, GetStateAndWait(system));
EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kTransitioning,
mojom::BluetoothSystem::State::kPoweredOn}),
EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kPoweredOn}),
on_state_changed_states_);
}
......
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