Have the framework in charge of scheduling frames. (#13344)
...instead of the engine.
This commit is contained in:
16
dev/automated_tests/flutter_test/ticker_expectation.txt
Normal file
16
dev/automated_tests/flutter_test/ticker_expectation.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
[^═]*(this line contains the test framework's output with the clock and so forth)?
|
||||
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
|
||||
The following message was thrown:
|
||||
An animation is still running even after the widget tree was disposed.
|
||||
|
||||
There was one transient callback left. The stack trace for when it was registered is as follows:
|
||||
── callback 2 ──
|
||||
<<skip until matching line>>
|
||||
#[0-9]+ main.+ \(.+/flutter/dev/automated_tests/flutter_test/ticker_test\.dart:[0-9]+:[0-9]+\)
|
||||
<<skip until matching line>>
|
||||
════════════════════════════════════════════════════════════════════════════════════════════════════
|
||||
.*..:.. \+0 -1: - Does flutter_test catch leaking tickers\? \[E\]
|
||||
Test failed\. See exception logs above\.
|
||||
The test description was: Does flutter_test catch leaking tickers\?
|
||||
*
|
||||
.*..:.. \+0 -1: Some tests failed\. *
|
||||
16
dev/automated_tests/flutter_test/ticker_test.dart
Normal file
16
dev/automated_tests/flutter_test/ticker_test.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Does flutter_test catch leaking tickers?', (WidgetTester tester) async {
|
||||
new Ticker((Duration duration) { })..start();
|
||||
|
||||
final ByteData message = const StringCodec().encodeMessage('AppLifecycleState.paused');
|
||||
await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) {});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user