Tests for Engine ensuring debug-mode apps are attached on iOS. (#37043)

This PR contains the tests for flutter/engine#10186.
This commit is contained in:
sjindel-google
2019-08-06 20:08:09 +02:00
committed by GitHub
parent 7df82f728e
commit 0564f0a812
7 changed files with 158 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter_driver/driver_extension.dart';
/// This application does nothing but show a empty screen.
void main() {
enableFlutterDriverExtension();
runApp(Empty());
}
class Empty extends StatelessWidget {
@override
Widget build(BuildContext context) => Container();
}

View File

@@ -0,0 +1,8 @@
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:io';
/// This application exits immediately.
void main() => exit(0);

View File

@@ -0,0 +1,23 @@
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_driver/flutter_driver.dart';
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
// Connect and disconnect from the empty app.
void main() {
group('FlutterDriver', () {
FlutterDriver driver;
setUpAll(() async {
driver = await FlutterDriver.connect();
});
tearDownAll(() async {
await driver.close();
});
test('empty', () async {}, timeout: const Timeout(Duration(minutes: 1)));
});
}