Delete un-tested hybrid_android_views, add layering to android_engine_test. (#162903)
Another large test suite that has never been running. The underlying thing I _think_ it wanted tested, which was hybrid composition, is now tested by `android_engine_test`. I also added a red square on top of each platform view so that, like `hybrid_android_views`, we can make sure layering is working as expected. Any other ideas? Can also be follow-up PRs?
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// Copyright 2014 The Flutter 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';
|
||||
|
||||
final class MainApp extends StatelessWidget {
|
||||
const MainApp({super.key, required this.platformView});
|
||||
final Widget platformView;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: Stack(
|
||||
children: <Widget>[
|
||||
platformView,
|
||||
Center(child: Container(width: 100, height: 100, color: Colors.red)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_driver/driver_extension.dart';
|
||||
|
||||
import '../src/allow_list_devices.dart';
|
||||
import '_shared.dart';
|
||||
|
||||
void main() async {
|
||||
ensureAndroidDevice();
|
||||
@@ -18,19 +19,13 @@ void main() async {
|
||||
|
||||
// Run on full screen.
|
||||
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
|
||||
runApp(const MainApp());
|
||||
}
|
||||
|
||||
final class MainApp extends StatelessWidget {
|
||||
const MainApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: _HybridCompositionAndroidPlatformView(viewType: 'blue_orange_gradient_platform_view'),
|
||||
);
|
||||
}
|
||||
runApp(
|
||||
const MainApp(
|
||||
platformView: _HybridCompositionAndroidPlatformView(
|
||||
viewType: 'blue_orange_gradient_platform_view',
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
final class _HybridCompositionAndroidPlatformView extends StatelessWidget {
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_driver/driver_extension.dart';
|
||||
|
||||
import '../src/allow_list_devices.dart';
|
||||
import '_shared.dart';
|
||||
|
||||
void main() async {
|
||||
ensureAndroidDevice();
|
||||
@@ -15,22 +16,12 @@ void main() async {
|
||||
|
||||
// Run on full screen.
|
||||
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
|
||||
runApp(const MainApp());
|
||||
}
|
||||
|
||||
final class MainApp extends StatelessWidget {
|
||||
const MainApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
// It is assumed:
|
||||
// - The Android SDK version is >= 23 (the test driver checks)
|
||||
// - This view does NOT use a SurfaceView
|
||||
//
|
||||
// See https://github.com/flutter/flutter/blob/main/docs/platforms/android/Android-Platform-Views.md.
|
||||
home: AndroidView(viewType: 'blue_orange_gradient_platform_view'),
|
||||
);
|
||||
}
|
||||
runApp(
|
||||
// It is assumed:
|
||||
// - The Android SDK version is >= 23 (the test driver checks)
|
||||
// - This view does NOT use a SurfaceView
|
||||
//
|
||||
// See https://github.com/flutter/flutter/blob/main/docs/platforms/android/Android-Platform-Views.md.
|
||||
const MainApp(platformView: AndroidView(viewType: 'blue_orange_gradient_platform_view')),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_driver/driver_extension.dart';
|
||||
|
||||
import '../src/allow_list_devices.dart';
|
||||
import '_shared.dart';
|
||||
|
||||
void main() async {
|
||||
ensureAndroidDevice();
|
||||
@@ -15,22 +16,14 @@ void main() async {
|
||||
|
||||
// Run on full screen.
|
||||
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
|
||||
runApp(const MainApp());
|
||||
}
|
||||
|
||||
final class MainApp extends StatelessWidget {
|
||||
const MainApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
runApp(
|
||||
const MainApp(
|
||||
// It is assumed:
|
||||
// - The Android SDK version is >= 23 (the test driver checks)
|
||||
// - This view DOES use a SurfaceView
|
||||
//
|
||||
// See https://github.com/flutter/flutter/blob/main/docs/platforms/android/Android-Platform-Views.md.
|
||||
home: AndroidView(viewType: 'blue_orange_gradient_surface_view_platform_view'),
|
||||
);
|
||||
}
|
||||
platformView: AndroidView(viewType: 'blue_orange_gradient_surface_view_platform_view'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user