docimports for flutter_goldens, flutter_localizations, flutter_web_plugins, fuchsia_remote_debug_protocol, integration_test (#151271)

Part of https://github.com/flutter/flutter/issues/150800
This commit is contained in:
Michael Goderbauer 2024-07-11 13:15:05 -07:00 committed by GitHub
parent 17584ab790
commit fb290b3121
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 46 additions and 15 deletions

View File

@ -229,7 +229,8 @@ class TestRenderingFlutterBinding extends BindingBase with SchedulerBinding, Ser
/// The EnginePhase must not be [EnginePhase.build], since the rendering layer
/// has no build phase.
///
/// If `onErrors` is not null, it is set as [TestRenderingFlutterBinding.onError].
/// If `onErrors` is not null, it is set as
/// [TestRenderingFlutterBinding.onErrors].
void layout(
RenderBox box, { // If you want to just repump the last box, call pumpFrame().
BoxConstraints? constraints,
@ -256,7 +257,8 @@ void layout(
/// Pumps a single frame.
///
/// If `onErrors` is not null, it is set as [TestRenderingFlutterBinding.onError].
/// If `onErrors` is not null, it is set as
/// [TestRenderingFlutterBinding.onErrors].
void pumpFrame({ EnginePhase phase = EnginePhase.layout, VoidCallback? onErrors }) {
assert(TestRenderingFlutterBinding.instance.renderView.child != null); // call layout() first!

View File

@ -190,7 +190,7 @@ abstract class FlutterGoldenFileComparator extends GoldenFileComparator {
///
/// The optional [suffix] argument is used by the
/// [FlutterPostSubmitFileComparator] and the [FlutterPreSubmitFileComparator].
/// These [FlutterGoldenFileComparators] randomize their base directories to
/// These [FlutterGoldenFileComparator]s randomize their base directories to
/// maintain thread safety while using the `goldctl` tool.
@protected
@visibleForTesting
@ -535,7 +535,7 @@ class FlutterSkippingFileComparator extends FlutterGoldenFileComparator {
///
/// This comparator utilizes the [SkiaGoldClient] to request baseline images for
/// the given device under test for comparison. This comparator is initialized
/// when conditions for all other [FlutterGoldenFileComparators] have not been
/// when conditions for all other [FlutterGoldenFileComparator]s have not been
/// met, see the `isForEnvironment` method for each one listed below.
///
/// The [FlutterLocalFileComparator] is intended to run on local machines and

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'flutter_goldens.dart';
library;
import 'dart:convert';
import 'dart:io' as io;
@ -24,7 +27,7 @@ const String _kImpellerKey = 'FLUTTER_TEST_IMPELLER';
/// Signature of callbacks used to inject [print] replacements.
typedef LogCallback = void Function(String);
/// Exception thrown when an error is returned from the [SkiaClient].
/// Exception thrown when an error is returned from the [SkiaGoldClient].
class SkiaException implements Exception {
/// Creates a new `SkiaException` with a required error [message].
const SkiaException(this.message);
@ -75,12 +78,12 @@ class SkiaGoldClient {
/// A client for making Http requests to the Flutter Gold dashboard.
final io.HttpClient httpClient;
/// The local [Directory] within the [comparisonRoot] for the current test
/// The local [Directory] within the comparison root for the current test
/// context. In this directory, the client will create image and JSON files
/// for the goldctl tool to use.
///
/// This is informed by the [FlutterGoldenFileComparator] [basedir]. It cannot
/// be null.
/// This is informed by [FlutterGoldenFileComparator.basedir]. It cannot be
/// null.
final Directory workDirectory;
/// The logging function to use when reporting messages to the console.

View File

@ -17,7 +17,7 @@ String authTemplate({
}
/// Json response template for Skia Gold image request:
/// https://flutter-gold.skia.org/img/images/[imageHash].png
/// https://flutter-gold.skia.org/img/images/{imageHash}.png
List<List<int>> imageResponseTemplate() {
return <List<int>>[
<int>[

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:intl/intl.dart';
library;
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:intl/intl.dart' as intl;

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:intl/intl.dart';
library;
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart' as intl;

View File

@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:flutter/material.dart';
///
/// @docImport 'material_localizations.dart';
library;
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
@ -17,7 +22,7 @@ import 'l10n/generated_widgets_localizations.dart';
///
/// This list is available programmatically via [kWidgetsSupportedLanguages].
///
/// Besides localized strings, this class also maps [locale] to [textDirection].
/// Besides localized strings, this class also maps [Locale] to [textDirection].
/// All locales are [TextDirection.ltr] except for locales with the following
/// [Locale.languageCode] values, which are [TextDirection.rtl]:
///

View File

@ -13,6 +13,8 @@
///
/// * [How to Write a Flutter Web Plugin](https://medium.com/flutter/how-to-write-a-flutter-web-plugin-5e26c689ea1), a Medium article
/// describing how the `url_launcher` package was created using [flutter_web_plugins].
///
/// @docImport 'src/plugin_registry.dart';
library flutter_web_plugins;
export 'src/navigation/url_strategy.dart';

View File

@ -90,8 +90,7 @@ class RpcFormatError extends Error {
/// Handles JSON RPC-2 communication with a Dart VM service.
///
/// Either wraps existing RPC calls to the Dart VM service, or runs raw RPC
/// function calls via [invokeRpc].
/// Wraps existing RPC calls to the Dart VM service.
class DartVm {
DartVm._(this._vmService, this.uri);

View File

@ -2,6 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:flutter_driver/flutter_driver.dart';
///
/// @docImport 'integration_test.dart';
/// @docImport 'integration_test_driver_extended.dart';
library;
import 'dart:async';
import 'dart:convert';

View File

@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:flutter_driver/flutter_driver.dart';
///
/// @docImport 'integration_test_driver_extended.dart';
library;
import 'dart:async';
import 'dart:developer' as developer;
import 'dart:io' show HttpClient, SocketException, WebSocket;
@ -312,8 +317,8 @@ https://docs.flutter.dev/testing/integration-tests
/// [reportData] with `reportKey`. The [reportData] contains extra information
/// from the test other than test success/fail. It will be passed back to the
/// host and be processed by the [ResponseDataCallback] defined in
/// [integration_test_driver.integrationDriver]. By default it will be written
/// to `build/integration_response_data.json` with the key `timeline`.
/// [integrationDriver]. By default it will be written to
/// `build/integration_response_data.json` with the key `timeline`.
///
/// For tests with multiple calls of this method, `reportKey` needs to be a
/// unique key, otherwise the later result will override earlier one. Tests

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:integration_test/integration_test.dart';
library;
import 'dart:convert';
import 'dart:io';
@ -52,7 +55,7 @@ Future<void> main() async {
});
}
/// Runs a test script and returns the [IntegrationTestWidgetsFlutterBinding.result].
/// Runs a test script and returns the [IntegrationTestWidgetsFlutterBinding.results].
///
/// [scriptPath] is relative to the package root.
Future<Map<String, dynamic>?> _runTest(String scriptPath) async {