Fix some tests to be happy with proper microtask scheduling. (#12900)

(I suspect this accounts the sets of microtasks from scheduleWarmUpFrame now running separately.)

Issue https://github.com/flutter/flutter/issues/9998
This commit is contained in:
Ryan Macnak
2017-11-07 09:26:45 -08:00
committed by GitHub
parent dfd1ffa7c5
commit cc5902b9d8

View File

@@ -75,6 +75,7 @@ Future<Map<String, String>> hasReassemble(Future<Map<String, String>> pendingRes
await binding.flushMicrotasks();
expect(binding.frameScheduled, isTrue);
expect(completed, isFalse);
await binding.flushMicrotasks();
await binding.doFrame();
await binding.flushMicrotasks();
expect(completed, isTrue);
@@ -411,6 +412,7 @@ void main() {
await binding.flushMicrotasks();
expect(binding.frameScheduled, isTrue);
expect(completed, false);
await binding.flushMicrotasks();
await binding.doFrame();
await binding.flushMicrotasks();
expect(completed, true);