Skip to content

Commit

Permalink
fix(test): [Wasm] Adjust WindowHelper.WaitForIdle to actually wait fo…
Browse files Browse the repository at this point in the history
…r idle
  • Loading branch information
jeromelaban committed Oct 1, 2020
1 parent 7d0e40c commit c000291
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/Uno.UI.RuntimeTests/IntegrationTests/common/TestServices.cs
Expand Up @@ -30,17 +30,8 @@ internal set

internal static async Task WaitForIdle()
{
#if __WASM__
await Task.Yield();
#else
await Task.Yield();
var tcs = new TaskCompletionSource<bool>();
await RootControl.Dispatcher.RunIdleAsync(_ => tcs.SetResult(true));
tcs = new TaskCompletionSource<bool>();
await RootControl.Dispatcher.RunIdleAsync(_ => tcs.SetResult(true));

await tcs.Task;
#endif
await RootControl.Dispatcher.RunIdleAsync(_ => { /* Empty to wait for the idle queue to be reached */ });
await RootControl.Dispatcher.RunIdleAsync(_ => { /* Empty to wait for the idle queue to be reached */ });
}

/// <summary>
Expand Down

0 comments on commit c000291

Please sign in to comment.