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

5
@TestOn('!chrome')
6
import 'package:flutter/foundation.dart';
7
import '../flutter_test_alternative.dart';
8 9

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

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

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

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