[MSan] Fix use-after-dtor errors in TestNetworkQualityEstimator

The estimator embeds an EmbeddedTestServer; destroying the test server
waits for shutdown to complete on the IO thread. While waiting, the
estimator may receive posted tasks with new observations and try to use
other fields of the TestNetworkQualityEsimator. Destroying
EmbeddedTestServer prevents these observation callbacks from using
already-destroyed fields.

Bug: 40222690
Change-Id: Id0589436ef7a7c47d2ac7c44cc266dd3938381a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5690686
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1326577}
NOKEYCHECK=True
GitOrigin-RevId: 813a3a3ee953c87c2346657db5d6103d91a5a134
2 files changed