| 123456789101112131415161718192021222324252627 |
- import 'dart:io';
- import 'package:flutter_test/flutter_test.dart';
- void main() {
- test('Impeller opt-out is application-scoped', () {
- final manifest = File('android/app/src/main/AndroidManifest.xml')
- .readAsStringSync();
- final applicationStart = manifest.indexOf('<application');
- final applicationEnd = manifest.indexOf('</application>');
- final activityStart = manifest.indexOf('<activity');
- final activityEnd = manifest.indexOf('</activity>');
- final impeller = manifest.indexOf(
- 'io.flutter.embedding.android.EnableImpeller',
- );
- expect(applicationStart, greaterThanOrEqualTo(0));
- expect(applicationEnd, greaterThan(applicationStart));
- expect(activityStart, greaterThan(applicationStart));
- expect(activityEnd, greaterThan(activityStart));
- expect(impeller, greaterThan(applicationStart));
- expect(impeller, lessThan(applicationEnd));
- // Flutter ignores this key under <activity>; keep it out of that block.
- expect(impeller < activityStart || impeller > activityEnd, isTrue);
- });
- }
|