• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2016 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5import 'package:flutter/scheduler.dart';
6import 'package:flutter/services.dart';
7import 'package:flutter_test/flutter_test.dart';
8
9void main() {
10  testWidgets('Does flutter_test catch leaking tickers?', (WidgetTester tester) async {
11    Ticker((Duration duration) { })..start();
12
13    final ByteData message = const StringCodec().encodeMessage('AppLifecycleState.paused');
14    await defaultBinaryMessenger.handlePlatformMessage('flutter/lifecycle', message, (_) {});
15  });
16}
17