Commit 04e7a032 authored by Kenichi Ishibashi's avatar Kenichi Ishibashi Committed by Commit Bot

Further attempt to deflate UkmBrowserTest on weblayer

Some tests are still flaky. Use content::RunAllTasksUntilIdle()
instead of RunLoop().RunUntilIdle() to try to run all scheduled
mojo callbacks.

Bug: 1115172
Change-Id: I0146698b9092b2aac48a357b69f4d2d7818d367c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2374187Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801283}
parent 600a5814
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "base/android/jni_android.h" #include "base/android/jni_android.h"
#include "base/android/jni_string.h" #include "base/android/jni_string.h"
#include "base/no_destructor.h" #include "base/no_destructor.h"
#include "base/run_loop.h" #include "content/public/test/test_utils.h"
#include "weblayer/browser/profile_impl.h" #include "weblayer/browser/profile_impl.h"
#include "weblayer/test/weblayer_browsertests_jni/MetricsTestHelper_jni.h" #include "weblayer/test/weblayer_browsertests_jni/MetricsTestHelper_jni.h"
...@@ -52,7 +52,7 @@ ProfileImpl* CreateProfile(const std::string& name) { ...@@ -52,7 +52,7 @@ ProfileImpl* CreateProfile(const std::string& name) {
ProfileImpl* profile = GetProfileByName(name); ProfileImpl* profile = GetProfileByName(name);
// Creating a profile may involve storage partition initialization. Wait for // Creating a profile may involve storage partition initialization. Wait for
// the initialization to be completed. // the initialization to be completed.
base::RunLoop().RunUntilIdle(); content::RunAllTasksUntilIdle();
return profile; return profile;
} }
void DestroyProfile(const std::string& name) { void DestroyProfile(const std::string& name) {
......
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