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:
parent
17584ab790
commit
fb290b3121
@ -229,7 +229,8 @@ class TestRenderingFlutterBinding extends BindingBase with SchedulerBinding, Ser
|
|||||||
/// The EnginePhase must not be [EnginePhase.build], since the rendering layer
|
/// The EnginePhase must not be [EnginePhase.build], since the rendering layer
|
||||||
/// has no build phase.
|
/// 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(
|
void layout(
|
||||||
RenderBox box, { // If you want to just repump the last box, call pumpFrame().
|
RenderBox box, { // If you want to just repump the last box, call pumpFrame().
|
||||||
BoxConstraints? constraints,
|
BoxConstraints? constraints,
|
||||||
@ -256,7 +257,8 @@ void layout(
|
|||||||
|
|
||||||
/// Pumps a single frame.
|
/// 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 }) {
|
void pumpFrame({ EnginePhase phase = EnginePhase.layout, VoidCallback? onErrors }) {
|
||||||
assert(TestRenderingFlutterBinding.instance.renderView.child != null); // call layout() first!
|
assert(TestRenderingFlutterBinding.instance.renderView.child != null); // call layout() first!
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ abstract class FlutterGoldenFileComparator extends GoldenFileComparator {
|
|||||||
///
|
///
|
||||||
/// The optional [suffix] argument is used by the
|
/// The optional [suffix] argument is used by the
|
||||||
/// [FlutterPostSubmitFileComparator] and the [FlutterPreSubmitFileComparator].
|
/// [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.
|
/// maintain thread safety while using the `goldctl` tool.
|
||||||
@protected
|
@protected
|
||||||
@visibleForTesting
|
@visibleForTesting
|
||||||
@ -535,7 +535,7 @@ class FlutterSkippingFileComparator extends FlutterGoldenFileComparator {
|
|||||||
///
|
///
|
||||||
/// This comparator utilizes the [SkiaGoldClient] to request baseline images for
|
/// This comparator utilizes the [SkiaGoldClient] to request baseline images for
|
||||||
/// the given device under test for comparison. This comparator is initialized
|
/// 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.
|
/// met, see the `isForEnvironment` method for each one listed below.
|
||||||
///
|
///
|
||||||
/// The [FlutterLocalFileComparator] is intended to run on local machines and
|
/// The [FlutterLocalFileComparator] is intended to run on local machines and
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'flutter_goldens.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io' as io;
|
import 'dart:io' as io;
|
||||||
|
|
||||||
@ -24,7 +27,7 @@ const String _kImpellerKey = 'FLUTTER_TEST_IMPELLER';
|
|||||||
/// Signature of callbacks used to inject [print] replacements.
|
/// Signature of callbacks used to inject [print] replacements.
|
||||||
typedef LogCallback = void Function(String);
|
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 {
|
class SkiaException implements Exception {
|
||||||
/// Creates a new `SkiaException` with a required error [message].
|
/// Creates a new `SkiaException` with a required error [message].
|
||||||
const SkiaException(this.message);
|
const SkiaException(this.message);
|
||||||
@ -75,12 +78,12 @@ class SkiaGoldClient {
|
|||||||
/// A client for making Http requests to the Flutter Gold dashboard.
|
/// A client for making Http requests to the Flutter Gold dashboard.
|
||||||
final io.HttpClient httpClient;
|
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
|
/// context. In this directory, the client will create image and JSON files
|
||||||
/// for the goldctl tool to use.
|
/// for the goldctl tool to use.
|
||||||
///
|
///
|
||||||
/// This is informed by the [FlutterGoldenFileComparator] [basedir]. It cannot
|
/// This is informed by [FlutterGoldenFileComparator.basedir]. It cannot be
|
||||||
/// be null.
|
/// null.
|
||||||
final Directory workDirectory;
|
final Directory workDirectory;
|
||||||
|
|
||||||
/// The logging function to use when reporting messages to the console.
|
/// The logging function to use when reporting messages to the console.
|
||||||
|
@ -17,7 +17,7 @@ String authTemplate({
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Json response template for Skia Gold image request:
|
/// 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() {
|
List<List<int>> imageResponseTemplate() {
|
||||||
return <List<int>>[
|
return <List<int>>[
|
||||||
<int>[
|
<int>[
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'package:intl/intl.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:intl/intl.dart' as intl;
|
import 'package:intl/intl.dart' as intl;
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'package:intl/intl.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart' as intl;
|
import 'package:intl/intl.dart' as intl;
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'package:flutter/material.dart';
|
||||||
|
///
|
||||||
|
/// @docImport 'material_localizations.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
@ -17,7 +22,7 @@ import 'l10n/generated_widgets_localizations.dart';
|
|||||||
///
|
///
|
||||||
/// This list is available programmatically via [kWidgetsSupportedLanguages].
|
/// 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
|
/// All locales are [TextDirection.ltr] except for locales with the following
|
||||||
/// [Locale.languageCode] values, which are [TextDirection.rtl]:
|
/// [Locale.languageCode] values, which are [TextDirection.rtl]:
|
||||||
///
|
///
|
||||||
|
@ -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
|
/// * [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].
|
/// describing how the `url_launcher` package was created using [flutter_web_plugins].
|
||||||
|
///
|
||||||
|
/// @docImport 'src/plugin_registry.dart';
|
||||||
library flutter_web_plugins;
|
library flutter_web_plugins;
|
||||||
|
|
||||||
export 'src/navigation/url_strategy.dart';
|
export 'src/navigation/url_strategy.dart';
|
||||||
|
@ -90,8 +90,7 @@ class RpcFormatError extends Error {
|
|||||||
|
|
||||||
/// Handles JSON RPC-2 communication with a Dart VM service.
|
/// Handles JSON RPC-2 communication with a Dart VM service.
|
||||||
///
|
///
|
||||||
/// Either wraps existing RPC calls to the Dart VM service, or runs raw RPC
|
/// Wraps existing RPC calls to the Dart VM service.
|
||||||
/// function calls via [invokeRpc].
|
|
||||||
class DartVm {
|
class DartVm {
|
||||||
DartVm._(this._vmService, this.uri);
|
DartVm._(this._vmService, this.uri);
|
||||||
|
|
||||||
|
@ -2,6 +2,12 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// 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:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'package:flutter_driver/flutter_driver.dart';
|
||||||
|
///
|
||||||
|
/// @docImport 'integration_test_driver_extended.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:developer' as developer;
|
import 'dart:developer' as developer;
|
||||||
import 'dart:io' show HttpClient, SocketException, WebSocket;
|
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
|
/// [reportData] with `reportKey`. The [reportData] contains extra information
|
||||||
/// from the test other than test success/fail. It will be passed back to the
|
/// from the test other than test success/fail. It will be passed back to the
|
||||||
/// host and be processed by the [ResponseDataCallback] defined in
|
/// host and be processed by the [ResponseDataCallback] defined in
|
||||||
/// [integration_test_driver.integrationDriver]. By default it will be written
|
/// [integrationDriver]. By default it will be written to
|
||||||
/// to `build/integration_response_data.json` with the key `timeline`.
|
/// `build/integration_response_data.json` with the key `timeline`.
|
||||||
///
|
///
|
||||||
/// For tests with multiple calls of this method, `reportKey` needs to be a
|
/// For tests with multiple calls of this method, `reportKey` needs to be a
|
||||||
/// unique key, otherwise the later result will override earlier one. Tests
|
/// unique key, otherwise the later result will override earlier one. Tests
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'package:integration_test/integration_test.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
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.
|
/// [scriptPath] is relative to the package root.
|
||||||
Future<Map<String, dynamic>?> _runTest(String scriptPath) async {
|
Future<Map<String, dynamic>?> _runTest(String scriptPath) async {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user