| 1 | // Copyright 2014 The Flutter 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 | |
| 5 | import 'dart:io'; |
| 6 | |
| 7 | import 'package:flutter/widgets.dart'; |
| 8 | import 'package:flutter_test/flutter_test.dart'; |
| 9 | |
| 10 | void main() { |
| 11 | test('Initializes httpOverrides and testTextInput' , () async { |
| 12 | expect(HttpOverrides.current, null); |
| 13 | final TestWidgetsFlutterBinding binding = CustomBindings(); |
| 14 | expect(WidgetsBinding.instance, isA<CustomBindings>()); |
| 15 | expect(binding.testTextInput.isRegistered, false); |
| 16 | expect(HttpOverrides.current, null); |
| 17 | }); |
| 18 | } |
| 19 | |
| 20 | class CustomBindings extends AutomatedTestWidgetsFlutterBinding { |
| 21 | @override |
| 22 | bool get overrideHttpClient => false; |
| 23 | |
| 24 | @override |
| 25 | bool get registerTestTextInput => false; |
| 26 | } |
| 27 | |