[flutter_tools] ensure track-widget-creation can be disabled on Android/macOS (#56203)
Ensure --no-track-widget-creation is piped through android/macOS. Adds integration testing for iOS/android/macOS
This commit is contained in:
18
dev/integration_tests/ui/lib/track_widget_creation.dart
Normal file
18
dev/integration_tests/ui/lib/track_widget_creation.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
// 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 'dart:developer';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
void main() {
|
||||
final Set<Widget> widgets = <Widget>{};
|
||||
widgets.add(const Text('same'));
|
||||
widgets.add(const Text('same'));
|
||||
|
||||
// If track-widget-creation is enabled, the set will have 2 members.
|
||||
// Otherwise is will only have one.
|
||||
registerExtension('ext.devicelab.test', (String method, Map<String, Object> params) async {
|
||||
return ServiceExtensionResponse.result('{"result":${widgets.length}}');
|
||||
});
|
||||
}
|
||||
@@ -3,7 +3,7 @@ description: Flutter non-plugin UI integration tests.
|
||||
|
||||
environment:
|
||||
# The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
|
||||
sdk: ">=2.0.0-dev.68.0 <3.0.0"
|
||||
sdk: ">=2.8.0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
image: 2.1.12
|
||||
|
||||
13
dev/integration_tests/ui/web/index.html
Normal file
13
dev/integration_tests/ui/web/index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- 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. -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>web_integration</title>
|
||||
<script defer src="main.dart.js" type="application/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user