Commit 34817d28 authored by nancylingwang's avatar nancylingwang Committed by Commit Bot

Fix the flaky tests AppContextMenuTest.*

When the test exist, the data_decode process has't finished yet, so it
might cause fatal error:
data_decoder::ServiceProvider::Set() must be called before any
instances of DataDecoder can be used.

Call app_service_test().WaitForAppService() to add RunLoop to wait the
decode process finish to fix the flaky tests.

BUG=1115763

Change-Id: Ic03dd66eca615096b2e51b90b6d3a590fe7c5e8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2383593
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802991}
parent 4b7ce32e
......@@ -177,6 +177,9 @@ class AppContextMenuTest : public AppListTestBase,
}
void TearDown() override {
// Let any in-flight tasks finish, otherwise the test might flake
// (crbug.com/1115763).
app_service_test().WaitForAppService();
menu_delegate_.reset();
controller_.reset();
menu_manager_.reset();
......
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