docimports for flutter_driver (#151267)
Part of https://github.com/flutter/flutter/issues/150800
This commit is contained in:
parent
defdb958ff
commit
b13f50a918
@ -22,6 +22,8 @@
|
||||
/// enableFlutterDriverExtension();
|
||||
/// runApp(ExampleApp());
|
||||
/// }
|
||||
///
|
||||
/// @docImport 'src/extension/extension.dart';
|
||||
library flutter_driver_extension;
|
||||
|
||||
export 'src/common/deserialization_factory.dart';
|
||||
|
@ -18,7 +18,7 @@ import 'text.dart';
|
||||
import 'text_input_action.dart';
|
||||
import 'wait.dart';
|
||||
|
||||
/// A factory for deserializing [Finder]s.
|
||||
/// A factory for deserializing [SerializableFinder]s.
|
||||
mixin DeserializeFinderFactory {
|
||||
/// Deserializes the finder from JSON generated by [SerializableFinder.serialize].
|
||||
SerializableFinder deserializeFinder(Map<String, String> json) {
|
||||
|
@ -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:flutter/foundation.dart';
|
||||
library;
|
||||
|
||||
import 'enum_util.dart';
|
||||
import 'find.dart';
|
||||
import 'message.dart';
|
||||
|
@ -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/semantics.dart';
|
||||
/// @docImport 'package:flutter/widgets.dart';
|
||||
/// @docImport 'package:flutter_driver/flutter_driver.dart';
|
||||
/// @docImport 'package:flutter_test/flutter_test.dart';
|
||||
library;
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:meta/meta.dart';
|
||||
@ -174,12 +180,12 @@ class BySemanticsLabel extends SerializableFinder {
|
||||
}
|
||||
|
||||
/// A Flutter Driver finder that finds widgets by [text] inside a
|
||||
/// [widgets.Text] or [widgets.EditableText] widget.
|
||||
/// [Text] or [EditableText] widget.
|
||||
class ByText extends SerializableFinder {
|
||||
/// Creates a text finder given the text.
|
||||
const ByText(this.text);
|
||||
|
||||
/// The text that appears inside the [widgets.Text] or [widgets.EditableText]
|
||||
/// The text that appears inside the [Text] or [EditableText]
|
||||
/// widget.
|
||||
final String text;
|
||||
|
||||
|
@ -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:flutter/widgets.dart';
|
||||
library;
|
||||
|
||||
import 'find.dart';
|
||||
|
||||
/// A Flutter Driver command that taps on a target widget located by [finder].
|
||||
|
@ -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:flutter_driver/flutter_driver.dart';
|
||||
library;
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
@ -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:flutter_driver/flutter_driver.dart';
|
||||
library;
|
||||
|
||||
import 'enum_util.dart';
|
||||
import 'message.dart';
|
||||
|
||||
|
@ -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:flutter_driver/flutter_driver.dart';
|
||||
library;
|
||||
|
||||
import 'message.dart';
|
||||
|
||||
/// A Flutter Driver command that requests a string representation of the layer tree.
|
||||
|
@ -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:flutter/widgets.dart';
|
||||
library;
|
||||
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
/// An object sent from the Flutter Driver to a Flutter application to instruct
|
||||
|
@ -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:flutter_driver/flutter_driver.dart';
|
||||
library;
|
||||
|
||||
import 'message.dart';
|
||||
|
||||
/// A Flutter Driver command that requests a string representation of the render tree.
|
||||
|
@ -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:flutter/widgets.dart';
|
||||
library;
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'message.dart';
|
||||
|
@ -2,6 +2,13 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
/// @docImport 'package:flutter/services.dart';
|
||||
/// @docImport 'package:flutter/widgets.dart';
|
||||
/// @docImport 'package:flutter_driver/driver_extension.dart';
|
||||
|
||||
/// @docImport 'package:flutter_test/flutter_test.dart';
|
||||
library;
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:meta/meta.dart';
|
||||
@ -762,7 +769,7 @@ abstract class FlutterDriver {
|
||||
class CommonFinders {
|
||||
const CommonFinders._();
|
||||
|
||||
/// Finds [widgets.Text] and [widgets.EditableText] widgets containing string
|
||||
/// Finds [Text] and [EditableText] widgets containing string
|
||||
/// equal to [text].
|
||||
SerializableFinder text(String text) => ByText(text);
|
||||
|
||||
|
@ -8,7 +8,7 @@ import 'timeline.dart';
|
||||
/// Event name for frame request pending timeline events.
|
||||
const String kFrameRequestPendingEvent = 'Frame Request Pending';
|
||||
|
||||
/// Summarizes [TimelineEvents]s corresponding to [kFrameRequestPendingEvent] events.
|
||||
/// Summarizes [TimelineEvent]s corresponding to [kFrameRequestPendingEvent] events.
|
||||
///
|
||||
/// `FrameRequestPendingLatency` is the time between `Animator::RequestFrame`
|
||||
/// and `Animator::BeginFrame` for each frame built by the Flutter engine.
|
||||
@ -16,7 +16,7 @@ class FrameRequestPendingLatencySummarizer {
|
||||
/// Creates a FrameRequestPendingLatencySummarizer given the timeline events.
|
||||
FrameRequestPendingLatencySummarizer(this.frameRequestPendingEvents);
|
||||
|
||||
/// Timeline events with names in [kFrameRequestPendingTimelineEventNames].
|
||||
/// Timeline events with names in [kFrameRequestPendingEvent].
|
||||
final List<TimelineEvent> frameRequestPendingEvents;
|
||||
|
||||
/// Computes the average `FrameRequestPendingLatency` over the period of the timeline.
|
||||
|
@ -14,7 +14,7 @@ const Set<String> kGCRootEvents = <String>{
|
||||
'StartConcurrentMark',
|
||||
};
|
||||
|
||||
/// Summarizes [TimelineEvents]s corresponding to [kGCRootEvents] category.
|
||||
/// Summarizes [TimelineEvent]s corresponding to [kGCRootEvents] category.
|
||||
///
|
||||
/// A sample event (some fields have been omitted for brevity):
|
||||
/// ```json
|
||||
|
@ -33,7 +33,7 @@ enum ProfileType {
|
||||
Memory,
|
||||
}
|
||||
|
||||
/// Summarizes [TimelineEvents]s corresponding to [kProfilingEvents] category.
|
||||
/// Summarizes [TimelineEvent]s corresponding to [kProfilingEvents] category.
|
||||
///
|
||||
/// A sample event (some fields have been omitted for brevity):
|
||||
/// ```json
|
||||
|
@ -13,7 +13,7 @@ const String _kLayerMemory = 'LayerMBytes';
|
||||
const String _kPictureCount = 'PictureCount';
|
||||
const String _kPictureMemory = 'PictureMBytes';
|
||||
|
||||
/// Summarizes [TimelineEvents]s corresponding to [kRasterCacheEvent] events.
|
||||
/// Summarizes [TimelineEvent]s corresponding to [kRasterCacheEvent] events.
|
||||
///
|
||||
/// A sample event (some fields have been omitted for brevity):
|
||||
/// ```json
|
||||
|
@ -7,7 +7,7 @@ import 'timeline.dart';
|
||||
/// Event name for refresh rate related timeline events.
|
||||
const String kUIThreadVsyncProcessEvent = 'VsyncProcessCallback';
|
||||
|
||||
/// A summary of [TimelineEvents]s corresponding to `kUIThreadVsyncProcessEvent` events.
|
||||
/// A summary of [TimelineEvent]s corresponding to `kUIThreadVsyncProcessEvent` events.
|
||||
///
|
||||
/// `RefreshRate` is the time between the start of a vsync pulse and the target time of that vsync.
|
||||
class RefreshRateSummary {
|
||||
|
@ -10,7 +10,7 @@ const String kSceneDisplayLagEvent = 'SceneDisplayLag';
|
||||
|
||||
const String _kVsyncTransitionsMissed = 'vsync_transitions_missed';
|
||||
|
||||
/// Summarizes [TimelineEvents]s corresponding to [kSceneDisplayLagEvent] events.
|
||||
/// Summarizes [TimelineEvent]s corresponding to [kSceneDisplayLagEvent] events.
|
||||
///
|
||||
/// A sample event (some fields have been omitted for brevity):
|
||||
/// ```json
|
||||
|
@ -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 'dart:developer';
|
||||
library;
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
@ -281,7 +284,7 @@ class VMServiceFlutterDriver extends FlutterDriver {
|
||||
|
||||
/// Client connected to the Dart VM running the Flutter application.
|
||||
///
|
||||
/// You can use [VMServiceClient] to check VM version, flags and get
|
||||
/// You can use [vms.VmService] to check VM version, flags and get
|
||||
/// notified when a new isolate has been instantiated. That could be
|
||||
/// useful if your application spawns multiple isolates that you
|
||||
/// would like to instrument.
|
||||
@ -297,7 +300,7 @@ class VMServiceFlutterDriver extends FlutterDriver {
|
||||
///
|
||||
/// If you used the [registerExtension] API to instrument your application,
|
||||
/// you can use this [vms.Isolate] to call these extension methods via
|
||||
/// [invokeExtension].
|
||||
/// [vms.Isolate.invokeExtension].
|
||||
final vms.Isolate _appIsolate;
|
||||
|
||||
/// Whether to print communication between host and app to `stdout`.
|
||||
@ -554,7 +557,7 @@ String _getWebSocketUrl(String url) {
|
||||
}
|
||||
|
||||
/// Waits for a real Dart VM service to become available, then connects using
|
||||
/// the [VMServiceClient].
|
||||
/// the [vms.VmService].
|
||||
Future<vms.VmService> _waitAndConnect(String url, Map<String, dynamic>? headers) async {
|
||||
final String webSocketUrl = _getWebSocketUrl(url);
|
||||
int attempts = 0;
|
||||
|
@ -14,7 +14,7 @@ const Set<String> kVsyncTimelineEventNames = <String>{
|
||||
_kPlatformVsyncEvent,
|
||||
};
|
||||
|
||||
/// Summarizes [TimelineEvents]s corresponding to [kVsyncTimelineEventNames] events.
|
||||
/// Summarizes [TimelineEvent]s corresponding to [kVsyncTimelineEventNames] events.
|
||||
///
|
||||
/// `VsyncFrameLag` is the time between when a platform vsync event is received to
|
||||
/// when the frame starts getting processed by the Flutter Engine. This delay is
|
||||
|
@ -3,10 +3,6 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
/// The dart:io implementation of [registerWebServiceExtension].
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [_extension_web.dart], which has the web implementation
|
||||
void registerWebServiceExtension(Future<Map<String, dynamic>> Function(Map<String, String>) call) {
|
||||
throw UnsupportedError('Use registerServiceExtension instead');
|
||||
}
|
||||
|
@ -15,10 +15,6 @@ external JSObject get _window;
|
||||
///
|
||||
/// window.$flutterDriver will be called by Flutter Web Driver to process
|
||||
/// Flutter Command.
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [_extension_io.dart], which has the dart:io implementation
|
||||
void registerWebServiceExtension(Future<Map<String, dynamic>> Function(Map<String, String>) call) {
|
||||
// Define the result variable because packages/flutter_driver/lib/src/driver/web_driver.dart
|
||||
// checks for this value to become non-null when waiting for the result. If this value is
|
||||
|
@ -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:flutter_driver/flutter_driver.dart';
|
||||
library;
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
@ -37,7 +37,7 @@ class _InternalNoTransientCallbacksCondition implements WaitCondition {
|
||||
/// Creates an [_InternalNoTransientCallbacksCondition] instance.
|
||||
const _InternalNoTransientCallbacksCondition();
|
||||
|
||||
/// Factory constructor to parse an [InternalNoTransientCallbacksCondition]
|
||||
/// Factory constructor to parse an [_InternalNoTransientCallbacksCondition]
|
||||
/// instance from the given [SerializableWaitCondition] instance.
|
||||
factory _InternalNoTransientCallbacksCondition.deserialize(SerializableWaitCondition condition) {
|
||||
if (condition.conditionName != 'NoTransientCallbacksCondition') {
|
||||
@ -63,7 +63,7 @@ class _InternalNoPendingFrameCondition implements WaitCondition {
|
||||
/// Creates an [_InternalNoPendingFrameCondition] instance.
|
||||
const _InternalNoPendingFrameCondition();
|
||||
|
||||
/// Factory constructor to parse an [InternalNoPendingFrameCondition] instance
|
||||
/// Factory constructor to parse an [_InternalNoPendingFrameCondition] instance
|
||||
/// from the given [SerializableWaitCondition] instance.
|
||||
factory _InternalNoPendingFrameCondition.deserialize(SerializableWaitCondition condition) {
|
||||
if (condition.conditionName != 'NoPendingFrameCondition') {
|
||||
@ -89,7 +89,7 @@ class _InternalFirstFrameRasterizedCondition implements WaitCondition {
|
||||
/// Creates an [_InternalFirstFrameRasterizedCondition] instance.
|
||||
const _InternalFirstFrameRasterizedCondition();
|
||||
|
||||
/// Factory constructor to parse an [InternalNoPendingFrameCondition] instance
|
||||
/// Factory constructor to parse an [_InternalFirstFrameRasterizedCondition] instance
|
||||
/// from the given [SerializableWaitCondition] instance.
|
||||
factory _InternalFirstFrameRasterizedCondition.deserialize(SerializableWaitCondition condition) {
|
||||
if (condition.conditionName != 'FirstFrameRasterizedCondition') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user