reassemble_test.dart 699 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4 5
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/foundation.dart';
6
import 'package:flutter_test/flutter_test.dart';
7 8

class TestFoundationFlutterBinding extends BindingBase {
9
  bool? wasLocked;
10 11

  @override
12
  Future<void> performReassemble() async {
13 14 15 16 17
    wasLocked = locked;
    return super.performReassemble();
  }
}

18
TestFoundationFlutterBinding binding = TestFoundationFlutterBinding();
19 20 21 22 23 24

void main() {
  test('Pointer events are locked during reassemble', () async {
    await binding.reassembleApplication();
    expect(binding.wasLocked, isTrue);
  });
25
}