luce_test library

Classes

AbortPaymentEvent
AbsoluteOrientationSensor
AbstractWorker
Accelerometer
AccessibleNode
AccessibleNodeList
AmbientLightSensor
AnchorElement
Animation
AnimationEffectReadOnly
AnimationEffectTiming
AnimationEffectTimingReadOnly
AnimationEvent
AnimationPlaybackEvent
AnimationTimeline
AnimationWorkletGlobalScope
ApplicationCache
ApplicationCache is accessed via Window.applicationCache.
ApplicationCacheErrorEvent
AreaElement
DOM Area Element, which links regions of an image map with a hyperlink. [...]
AudioElement
AuthenticatorAssertionResponse
AuthenticatorAttestationResponse
AuthenticatorResponse
BackgroundFetchClickEvent
BackgroundFetchedEvent
BackgroundFetchEvent
BackgroundFetchFailEvent
BackgroundFetchFetch
BackgroundFetchManager
BackgroundFetchRegistration
BackgroundFetchSettledFetch
BarcodeDetector
BarProp
BaseElement
BatteryManager
BeforeInstallPromptEvent
BeforeUnloadEvent
Blob
BlobEvent
BluetoothRemoteGattDescriptor
Body
BodyElement
Br
BRElement
BroadcastChannel
BudgetState
BuildContext
BuildRoot
ButtonElement
ButtonInputElement
A button, with no default behavior.
CacheStorage
CanMakePaymentEvent
CanvasCaptureMediaStreamTrack
CanvasElement
CanvasGradient
An opaque canvas object representing a gradient. [...]
CanvasImageSource
An object that can be drawn to a 2D canvas rendering context. [...]
CanvasPattern
An opaque object representing a pattern of image, canvas, or video. [...]
CanvasRenderingContext
CanvasRenderingContext2D
CDataSection
CharacterData
CheckboxInputElement
A boolean editor control. [...]
ChildNode
Client
Clients
ClipboardEvent
CloseEvent
Comment
Completer<T>
A way to produce Future objects and to complete them later with a value or error. [...]
Component
CompositionEvent
Console
ContentElement
CookieStore
Coordinates
Credential
CredentialsContainer
CredentialUserData
Crypto
CryptoKey
Css
CssCharsetRule
CssClassSet
A Set that stores the CSS class names for an element.
CssConditionRule
CssFontFaceRule
CssGroupingRule
CssImageValue
CssImportRule
CssKeyframeRule
CssKeyframesRule
CssKeywordValue
CssMatrixComponent
CssMediaRule
CssNamespaceRule
CssNumericValue
CssPageRule
CssPerspective
CssPositionValue
CssRect
A class for representing CSS dimensions. [...]
CssResourceValue
CssRotation
CssRule
CssScale
CssSkew
CssStyleDeclaration
CssStyleDeclarationBase
CssStyleRule
CssStyleSheet
CssStyleValue
CssSupportsRule
CssTransformComponent
CssTransformValue
CssTranslation
CssUnitValue
CssUnparsedValue
CssurlImageValue
CssVariableReferenceValue
CssViewportRule
CustomElementRegistry
CustomEvent
CustomMatcher
A useful utility class for implementing other matchers through inheritance. Derived classes should call the base constructor with a feature name and description, and an instance matcher, and should implement the featureValueOf abstract method. [...]
CustomStream<T extends Event>
A stream of custom events, which enables the user to "fire" (add) their own custom events to a stream.
DataElement
DataListElement
DataTransfer
DataTransferItem
DataTransferItemList
DateInputElement
A date (year, month, day) with no time zone. [...]
DedicatedWorkerGlobalScope
DeferredLibrary
Indicates that loading of libraryName is deferred. [...]
DeprecatedStorageInfo
DeprecatedStorageQuota
DeprecationReport
Description
Matchers build up their error messages by appending to Description objects. [...]
DetailsElement
DetectedBarcode
DetectedFace
DetectedText
DeviceAcceleration
DeviceMotionEvent
DeviceOrientationEvent
DeviceRotationRate
DialogElement
Dimension
Class representing a length measurement in CSS.
DirectoryEntry
DirectoryReader
Div
DivElement
A generic container for content on an HTML page; corresponds to the <div> tag. [...]
DListElement
Document
The base class for all documents. [...]
DocumentFragment
DocumentOrShadowRoot
DocumentTimeline
DomError
DomException
DomImplementation
DomIterator
DomMatrix
DomMatrixReadOnly
DomParser
DomPoint
DomPointReadOnly
DomQuad
DomRectList
DomRectReadOnly
DomStringList
DomStringMap
DomTokenList
Element
An abstract class, which all HTML elements extend.
ElementEvents
ElementList<T extends Element>
An immutable list containing HTML elements. This list contains some additional methods when compared to regular lists for ease of CSS manipulation on a group of elements.
ElementStream<T extends Event>
A specialized Stream available to Elements to enable event delegation.
ElementUpgrader
A utility for changing the Dart wrapper type for elements.
EmailInputElement
An e-mail address or list of e-mail addresses. [...]
EmbedElement
Entry
ErrorEvent
Event
Events
Base class that supports listening for and dispatching browser events. [...]
EventSink<T>
A Sink that supports adding errors. [...]
EventSource
EventStreamProvider<T extends Event>
A factory to expose DOM events as Streams.
EventTarget
Base class for all browser objects that support events. [...]
ExtendableEvent
ExtendableMessageEvent
External
FaceDetector
FeatureMatcher<T>
FederatedCredential
FetchEvent
FieldSetElement
File
FileEntry
FileList
FileReader
FileSystem
FileUploadInputElement
A control for picking files from the user's computer.
FileWriter
FixedSizeListIterator<T>
FocusEvent
FontFace
FontFaceSet
FontFaceSetLoadEvent
FontFaceSource
ForeignFetchEvent
FormData
FormElement
Future<T>
An object representing a delayed computation. [...]
FutureOr<T>
A type representing values that are either Future<T> or T. [...]
Gamepad
GamepadButton
GamepadEvent
GamepadPose
Geolocation
Geoposition
GlobalEventHandlers
Gyroscope
H1
H2
H3
HashChangeEvent
HeadElement
Headers
HeadingElement
HiddenInputElement
Hidden input which is not intended to be seen or edited by the user.
History
HistoryBase
Hr
HRElement
An <hr> tag.
HtmlCollection
HtmlDocument
HtmlElement
HtmlFormControlsCollection
HtmlHtmlElement
HtmlHyperlinkElementUtils
HtmlOptionsCollection
HttpRequest
A client-side XHR request for getting data from a URL, formally known as XMLHttpRequest. [...]
HttpRequestEventTarget
HttpRequestUpload
HttpStatus
HTTP status codes. Exported in dart:io and dart:html.
IdleDeadline
IFrameElement
ImageBitmap
ImageBitmapRenderingContext
ImageButtonInputElement
Either an image which the user can select a coordinate to or a form submit button.
ImageCapture
ImageData
ImageElement
Img
ImmutableListMixin<E>
InputDeviceCapabilities
InputElement
InputElementBase
Exposes the functionality common between all InputElement types.
InstallEvent
IntersectionObserver
IntersectionObserverEntry
InterventionReport
isInstanceOf<T>
DEPRECATED Use TypeMatcher instead. [...]
KeyboardEvent
An event that describes user interaction with the keyboard. [...]
KeyboardEvents
KeyboardEventStream
Records KeyboardEvents that occur on a particular element, and provides a stream of outgoing KeyEvents with cross-browser consistent keyCode and charCode values despite the fact that a multitude of browsers that have varying keyboard default behavior. [...]
KeyCode
Defines the keycode values for keys that are returned by KeyboardEvent.keyCode. [...]
KeyEvent
A custom KeyboardEvent that attempts to eliminate cross-browser inconsistencies, and also provide both keyCode and charCode information for all key events (when such information can be determined). [...]
KeyframeEffect
KeyframeEffectReadOnly
KeyLocation
Defines the standard key locations returned by KeyboardEvent.getKeyLocation.
LabelElement
LatestEvent<E>
LegendElement
LIElement
LinearAccelerationSensor
LinkElement
LocalDateTimeInputElement
A date and time (year, month, day, hour, minute, second, fraction of a second) with no time zone. [...]
Location
LocationBase
Magnetometer
MapElement
Matcher
The base class for all matchers. [...]
MediaCapabilities
MediaCapabilitiesInfo
MediaDeviceInfo
MediaDevices
MediaElement
MediaEncryptedEvent
MediaError
MediaKeyMessageEvent
MediaKeys
MediaKeySession
MediaKeysPolicy
MediaKeyStatusMap
MediaKeySystemAccess
MediaList
MediaMetadata
MediaQueryList
MediaQueryListEvent
MediaRecorder
MediaSession
MediaSettingsRange
MediaSource
MediaStream
MediaStreamEvent
MediaStreamTrack
MediaStreamTrackEvent
MemoryInfo
An HTML [...]
MessageChannel
MessageEvent
MessagePort
Metadata
MetaElement
MeterElement
MidiAccess
MidiConnectionEvent
MidiInput
MidiInputMap
MidiMessageEvent
MidiOutput
MidiOutputMap
MidiPort
MimeType
MimeTypeArray
ModElement
MonthInputElement
A date consisting of a year and a month with no time zone. [...]
MouseEvent
MouseEvents
MutationEvent
MutationObserver
MutationRecord
NetworkInformation
Node
NodeFilter
NodeIterator
NodeList
NodeTreeSanitizer
Performs sanitization of a node tree after construction to ensure that it does not contain any disallowed elements or attributes. [...]
NodeValidator
Interface used to validate that only accepted elements and attributes are allowed while parsing HTML strings into DOM nodes. [...]
NodeValidatorBuilder
Class which helps construct standard node validation policies. [...]
NoncedElement
NonDocumentTypeChildNode
NonElementParentNode
Notification
NotificationEvent
NumberInputElement
A numeric editor control.
ObjectElement
OffscreenCanvas
OffscreenCanvasRenderingContext2D
OListElement
OnPlatform
An annotation for platform-specific customizations for a test suite. [...]
OptGroupElement
OptionElement
OrientationSensor
OutputElement
OverconstrainedError
P
PageTransitionEvent
PaintRenderingContext2D
PaintSize
PaintWorkletGlobalScope
ParagraphElement
ParamElement
ParentNode
PasswordCredential
PasswordInputElement
Text with no line breaks (sensitive information).
Path2D
PaymentAddress
PaymentInstruments
PaymentManager
PaymentRequest
PaymentRequestEvent
PaymentRequestUpdateEvent
PaymentResponse
Performance
PerformanceEntry
PerformanceLongTaskTiming
PerformanceMark
PerformanceMeasure
PerformanceNavigation
PerformanceNavigationTiming
PerformanceObserver
PerformanceObserverEntryList
PerformancePaintTiming
PerformanceResourceTiming
PerformanceServerTiming
PerformanceTiming
Permissions
PermissionStatus
PhotoCapabilities
PictureElement
Platform
Plugin
PluginArray
Point<T extends num>
A utility class for representing two-dimensional positions.
PointerEvent
PopStateEvent
PositionError
PreElement
Presentation
PresentationAvailability
PresentationConnection
PresentationConnectionAvailableEvent
PresentationConnectionCloseEvent
PresentationConnectionList
PresentationReceiver
PresentationRequest
ProcessingInstruction
ProgressElement
ProgressEvent
PromiseRejectionEvent
PublicKeyCredential
PushEvent
PushManager
PushMessageData
PushSubscription
PushSubscriptionOptions
QuoteElement
RadioButtonInputElement
A control that when used with other ReadioButtonInputElement controls forms a radio button group in which only one control can be checked at a time. [...]
Range
RangeInputElement
Similar to NumberInputElement but the browser may provide more optimal styling (such as a slider control). [...]
RangeInputElementBase
Base interface for all input element types which involve ranges.
ReadyState
Contains the set of standard values returned by HTMLDocument.getReadyState.
Rectangle<T extends num>
A class for representing two-dimensional rectangles whose properties are immutable.
RelatedApplication
RelativeOrientationSensor
RemotePlayback
ReportBody
ReportingObserver
ResetButtonInputElement
A button, which when clicked, resets the form.
ResizeObserver
ResizeObserverEntry
Retry
An annotation for marking a test to be retried. [...]
RtcCertificate
RtcDataChannel
RtcDataChannelEvent
RtcDtmfSender
RtcDtmfToneChangeEvent
RtcIceCandidate
RtcLegacyStatsReport
RtcPeerConnection
RtcPeerConnectionIceEvent
RtcRtpContributingSource
RtcRtpReceiver
RtcRtpSender
RtcSessionDescription
RtcStatsReport
RtcStatsResponse
RtcTrackEvent
Screen
ScreenOrientation
ScriptElement
ScrollAlignment
Options for Element.scrollIntoView.
ScrollState
ScrollTimeline
SearchInputElement
Similar to TextInputElement, but on platforms where search is styled differently this will get the search style. [...]
SecurityPolicyViolationEvent
SelectElement
Selection
Sensor
SensorErrorEvent
ServiceWorker
ServiceWorkerContainer
ServiceWorkerGlobalScope
ServiceWorkerRegistration
ShadowElement
ShadowRoot
SharedArrayBuffer
SharedWorker
SharedWorkerGlobalScope
Skip
An annotation for marking a test suite as skipped.
SlotElement
Source<E>
SourceBuffer
SourceBufferList
SourceElement
Span
SpanElement
SpeechGrammar
SpeechGrammarList
SpeechRecognition
SpeechRecognitionAlternative
SpeechRecognitionError
SpeechRecognitionEvent
SpeechRecognitionResult
SpeechSynthesis
SpeechSynthesisEvent
SpeechSynthesisUtterance
SpeechSynthesisVoice
State<E>
StaticRange
Storage
The type used by the Window.localStorage and Window.sessionStorage properties. Storage is implemented as a Map<String, String>. [...]
StorageEvent
StorageManager
Stream<T>
A source of asynchronous data events. [...]
StreamConsumer<S>
Abstract interface for a "sink" accepting multiple entire streams. [...]
StreamController<T>
A controller with the stream it controls. [...]
StreamIterator<T>
An Iterator like interface for the values of a Stream. [...]
StreamMatcher
A matcher that matches events from Streams or StreamQueues. [...]
StreamSink<S>
A object that accepts stream events both synchronously and asynchronously. [...]
StreamSubscription<T>
A subscription on events from a Stream. [...]
StreamTransformer<S, T>
Transforms a Stream. [...]
StreamTransformerBase<S, T>
Base class for implementing StreamTransformer. [...]
StreamView<T>
Stream wrapper that only exposes the Stream interface.
StringDescription
The default implementation of Description. This should rarely need substitution, although conceivably it is a place where other languages could be supported.
StyleElement
StyleMedia
StylePropertyMap
StylePropertyMapReadonly
StyleSheet
SubmitButtonInputElement
A button, which when clicked, submits the form.
SyncEvent
SynchronousStreamController<T>
A stream controller that delivers its events synchronously. [...]
SyncManager
TableCaptionElement
TableCellElement
TableColElement
TableElement
TableRowElement
TableSectionElement
Tag
Tags
An annotation for applying a set of user-defined tags to a test suite. [...]
TaskAttributionTiming
TelephoneInputElement
Represents a control for editing a telephone number. [...]
TemplateElement
TestFailure
An exception thrown when a test assertion fails.
TestOn
An annotation indicating which platforms a test suite supports. [...]
Text
TextAreaElement
TextDetector
TextEvent
TextInputElement
A basic text input editor control.
TextInputElementBase
Base interface for all inputs which involve text editing.
TextMetrics
TextTrack
TextTrackCue
TextTrackCueList
TextTrackList
Throws
Use the throwsA function instead.
TimeElement
TimeInputElement
A time (hour, minute, seconds, fractional seconds) with no time zone. [...]
Timeout
A class representing a modification to the default timeout for a test. [...]
Timer
A count-down timer that can be configured to fire once or repeatedly. [...]
TimeRanges
TitleElement
Touch
TouchEvent
TouchList
TrackDefault
TrackDefaultList
TrackElement
TrackEvent
TransitionEvent
TreeWalker
TrustedHtml
TrustedScriptUrl
TrustedUrl
Txt
TypeMatcher<T>
A Matcher subclass that supports validating the Type of the target object. [...]
UIEvent
UListElement
UnderlyingSourceBase
UnknownElement
UriPolicy
Defines the policy for what types of uris are allowed for particular attribute values. [...]
Url
UrlInputElement
A control for editing an absolute URL. [...]
UrlSearchParams
UrlUtilsReadOnly
ValidityState
VComponent
Verbatim
VideoElement
VideoPlaybackQuality
VideoTrack
VideoTrackList
VisualViewport
VKeyboardEvents
VMouseEvents
VNode
VR
VRCoordinateSystem
VRDevice
VRDeviceEvent
VRDisplay
VRDisplayCapabilities
VRDisplayEvent
VREyeParameters
VRFrameData
VRFrameOfReference
VRPose
VRSession
VRSessionEvent
VRStageBounds
VRStageBoundsPoint
VRStageParameters
VSingleChildElement<W extends Widget>
VTag
VText
VttCue
VttRegion
VVerbatim
WebSocket
Use the WebSocket interface to connect to a WebSocket, and to send and receive data on that WebSocket. [...]
WeekInputElement
A date consisting of a week-year number and a week number with no time zone. [...]
WheelEvent
Widget
Window
Top-level container for the current browser tab or window. [...]
WindowBase
Top-level container for a browser tab or window. [...]
WindowBase64
WindowClient
WindowEventHandlers
Worker
WorkerGlobalScope
WorkerPerformance
WorkletAnimation
WorkletGlobalScope
XmlDocument
XmlSerializer
XPathEvaluator
XPathExpression
XPathNSResolver
XPathResult
XsltProcessor
Zone
A zone represents an environment that remains stable across asynchronous calls. [...]
ZoneDelegate
An adapted view of the parent zone. [...]
ZoneSpecification
This class provides the specification for a forked zone. [...]

Mixins

ChangeNotification

Constants

anything → const Matcher
A matcher that matches any value.
const _IsAnything()
isArgumentError → const TypeMatcher<ArgumentError>
A matcher for ArgumentError.
const TypeMatcher<ArgumentError>()
isCastError → const TypeMatcher<CastError>
A matcher for CastError.
const TypeMatcher<CastError>()
isConcurrentModificationError → const TypeMatcher<ConcurrentModificationError>
A matcher for ConcurrentModificationError.
const TypeMatcher<ConcurrentModificationError>()
isCyclicInitializationError → const TypeMatcher<CyclicInitializationError>
A matcher for CyclicInitializationError.
const TypeMatcher<CyclicInitializationError>()
isEmpty → const Matcher
Returns a matcher that matches the isEmpty property.
const _Empty()
isException → const TypeMatcher<Exception>
A matcher for Exception.
const TypeMatcher<Exception>()
isFalse → const Matcher
A matcher that matches anything except the Boolean value true.
const _IsFalse()
isFormatException → const TypeMatcher<FormatException>
A matcher for FormatException.
const TypeMatcher<FormatException>()
isList → const TypeMatcher<List>
A matcher for List.
const TypeMatcher<List>()
isMap → const TypeMatcher<Map>
A matcher for Map.
const TypeMatcher<Map>()
isNaN → const Matcher
A matcher that matches the numeric value NaN.
const _IsNaN()
isNegative → const Matcher
A matcher which matches if the match argument is negative.
const _OrderingMatcher(0, false, true, false, 'a negative value', false)
isNonNegative → const Matcher
A matcher which matches if the match argument is zero or positive.
const _OrderingMatcher(0, true, false, true, 'a non-negative value', false)
isNonPositive → const Matcher
A matcher which matches if the match argument is zero or negative.
const _OrderingMatcher(0, true, true, false, 'a non-positive value', false)
isNonZero → const Matcher
A matcher which matches if the match argument is non-zero.
const _OrderingMatcher(0, false, true, true, 'a value not equal to')
isNoSuchMethodError → const TypeMatcher<NoSuchMethodError>
A matcher for NoSuchMethodError.
const TypeMatcher<NoSuchMethodError>()
isNotEmpty → const Matcher
Returns a matcher that matches the isNotEmpty property.
const _NotEmpty()
isNotNaN → const Matcher
A matcher that matches any non-NaN value.
const _IsNotNaN()
isNotNull → const Matcher
A matcher that matches any non-null value.
const _IsNotNull()
isNull → const Matcher
A matcher that matches any null value.
const _IsNull()
isNullThrownError → const TypeMatcher<NullThrownError>
A matcher for NullThrownError.
const TypeMatcher<NullThrownError>()
isPositive → const Matcher
A matcher which matches if the match argument is positive.
const _OrderingMatcher(0, false, false, true, 'a positive value', false)
isRangeError → const TypeMatcher<RangeError>
A matcher for RangeError.
const TypeMatcher<RangeError>()
isStateError → const TypeMatcher<StateError>
A matcher for StateError.
const TypeMatcher<StateError>()
isTrue → const Matcher
A matcher that matches the Boolean value true.
const _IsTrue()
isUnimplementedError → const TypeMatcher<UnimplementedError>
A matcher for UnimplementedError.
const TypeMatcher<UnimplementedError>()
isUnsupportedError → const TypeMatcher<UnsupportedError>
A matcher for UnsupportedError.
const TypeMatcher<UnsupportedError>()
isZero → const Matcher
A matcher which matches if the match argument is zero.
const _OrderingMatcher(0, true, false, false, 'a value equal to')
returnsNormally → const Matcher
A matcher that matches a function call against no exception. [...]
const _ReturnsNormally()
throws → const Matcher
This function is deprecated. [...]
@Deprecated("Will be removed in 0.13.0")
const Throws()
throwsArgumentError → const Matcher
A matcher for functions that throw ArgumentError.
const Throws(isArgumentError)
throwsConcurrentModificationError → const Matcher
A matcher for functions that throw ConcurrentModificationError.
const Throws(isConcurrentModificationError)
throwsCyclicInitializationError → const Matcher
A matcher for functions that throw CyclicInitializationError.
const Throws(isCyclicInitializationError)
throwsException → const Matcher
A matcher for functions that throw Exception.
const Throws(isException)
throwsFormatException → const Matcher
A matcher for functions that throw FormatException.
const Throws(isFormatException)
throwsNoSuchMethodError → const Matcher
A matcher for functions that throw NoSuchMethodError.
const Throws(isNoSuchMethodError)
throwsNullThrownError → const Matcher
A matcher for functions that throw NullThrownError.
const Throws(isNullThrownError)
throwsRangeError → const Matcher
A matcher for functions that throw RangeError.
const Throws(isRangeError)
throwsStateError → const Matcher
A matcher for functions that throw StateError.
const Throws(isStateError)
throwsUnimplementedError → const Matcher
A matcher for functions that throw Exception.
const Throws(isUnimplementedError)
throwsUnsupportedError → const Matcher
A matcher for functions that throw UnsupportedError.
const Throws(isUnsupportedError)

Properties

completes Matcher
Matches a Future that completes successfully with a value. [...]
final
document HtmlDocument
Root node for all content in a web page.
read-only
doesNotComplete Matcher
Matches a Future that does not complete. [...]
final
emitsDone StreamMatcher
Returns a StreamMatcher that asserts that the stream emits a "done" event.
final
neverCalled → Null Function([Object, Object, Object, Object, Object, Object, Object, Object, Object, Object ])
Returns a function that causes the test to fail if it's called. [...]
read-only
window Window
Top-level container for a web page, which is usually a browser tab or window. [...]
read-only

Functions

addStateInfo(Map matchState, Map values) → void
Useful utility for nesting match states.
addTearDown(dynamic callback()) → void
Registers a function to be run after the current test. [...]
allOf(dynamic arg0, [ dynamic arg1, dynamic arg2, dynamic arg3, dynamic arg4, dynamic arg5, dynamic arg6 ]) Matcher
This returns a matcher that matches if all of the matchers passed as arguments (up to 7) match. [...]
anyElement(dynamic matcher) Matcher
Returns a matcher which matches Iterables in which at least one element matches the given matcher.
anyOf(dynamic arg0, [ dynamic arg1, dynamic arg2, dynamic arg3, dynamic arg4, dynamic arg5, dynamic arg6 ]) Matcher
Matches if any of the given matchers evaluate to true. [...]
closeTo(num value, num delta) Matcher
Returns a matcher which matches if the match argument is within delta of some value. [...]
collapseWhitespace(String string) → String
Utility function to collapse whitespace runs to single spaces and strip leading/trailing whitespace.
completion(dynamic matcher, [ String description ]) Matcher
Matches a Future that completes succesfully with a value that matches matcher. [...]
contains(dynamic expected) Matcher
Returns a matcher that matches if the match argument contains the expected value. [...]
containsAll(Iterable expected) Matcher
Matches Iterables which contain an element matching every value in expected in any order, and may contain additional values. [...]
containsAllInOrder(Iterable expected) Matcher
Matches Iterables which contain an element matching every value in expected in the same order, but may contain additional values interleaved throughout. [...]
containsPair(dynamic key, dynamic value) Matcher
Returns a matcher which matches maps containing the key-value pair with key => value.
containsValue(dynamic value) Matcher
Returns a matcher which matches maps containing the given value.
emits(dynamic matcher) StreamMatcher
Returns a StreamMatcher for matcher. [...]
emitsAnyOf(Iterable matchers) StreamMatcher
Returns a StreamMatcher that matches the stream if at least one of matchers matches. [...]
emitsError(dynamic matcher) StreamMatcher
Returns a StreamMatcher that matches a single error event that matches matcher.
emitsInAnyOrder(Iterable matchers) StreamMatcher
Returns a StreamMatcher that matches the stream if each matcher in matchers matches, in any order. [...]
emitsInOrder(Iterable matchers) StreamMatcher
Returns a StreamMatcher that matches the stream if each matcher in matchers matches, one after another. [...]
emitsThrough(dynamic matcher) StreamMatcher
Returns a StreamMatcher that matches any number of events followed by events that match matcher. [...]
endsWith(String suffixString) Matcher
Returns a matcher that matches if the match argument is a string and ends with suffixString.
equals(dynamic expected, [ int limit = 100 ]) Matcher
Returns a matcher that matches if the value is structurally equal to expected. [...]
equalsIgnoringCase(String value) Matcher
Returns a matcher which matches if the match argument is a string and is equal to value when compared case-insensitively.
equalsIgnoringWhitespace(String value) Matcher
Returns a matcher which matches if the match argument is a string and is equal to value, ignoring whitespace. [...]
escape(String str) → String
Returns str with all whitespace characters represented as their escape sequences. [...]
everyElement(dynamic matcher) Matcher
Returns a matcher which matches Iterables in which all elements match the given matcher.
expect(dynamic actual, dynamic matcher, { String reason, dynamic skip, bool verbose: false, ErrorFormatter formatter }) → void
Assert that actual matches matcher. [...]
expectAsync(Function callback, { int count: 1, int max: 0, String id, String reason }) → Function
This function is deprecated because it doesn't work well with strong mode. Use expectAsync0, expectAsync1, expectAsync2, expectAsync3, expectAsync4, expectAsync5, or expectAsync6 instead.
@Deprecated("Will be removed in 0.13.0")
expectAsync0<T>(T callback(), { int count: 1, int max: 0, String id, String reason }) Func0<T>
Informs the framework that the given callback of arity 0 is expected to be called count number of times (by default 1). [...]
expectAsync1<T, A>(T callback(A a), { int count: 1, int max: 0, String id, String reason }) Func1<T, A>
Informs the framework that the given callback of arity 1 is expected to be called count number of times (by default 1). [...]
expectAsync2<T, A, B>(T callback(A a, B b), { int count: 1, int max: 0, String id, String reason }) Func2<T, A, B>
Informs the framework that the given callback of arity 2 is expected to be called count number of times (by default 1). [...]
expectAsync3<T, A, B, C>(T callback(A a, B b, C c), { int count: 1, int max: 0, String id, String reason }) Func3<T, A, B, C>
Informs the framework that the given callback of arity 3 is expected to be called count number of times (by default 1). [...]
expectAsync4<T, A, B, C, D>(T callback(A a, B b, C c, D d), { int count: 1, int max: 0, String id, String reason }) Func4<T, A, B, C, D>
Informs the framework that the given callback of arity 4 is expected to be called count number of times (by default 1). [...]
expectAsync5<T, A, B, C, D, E>(T callback(A a, B b, C c, D d, E e), { int count: 1, int max: 0, String id, String reason }) Func5<T, A, B, C, D, E>
Informs the framework that the given callback of arity 5 is expected to be called count number of times (by default 1). [...]
expectAsync6<T, A, B, C, D, E, F>(T callback(A a, B b, C c, D d, E e, F f), { int count: 1, int max: 0, String id, String reason }) Func6<T, A, B, C, D, E, F>
Informs the framework that the given callback of arity 6 is expected to be called count number of times (by default 1). [...]
expectAsyncUntil(Function callback, bool isDone(), { String id, String reason }) → Function
This function is deprecated because it doesn't work well with strong mode. Use expectAsyncUntil0, expectAsyncUntil1, expectAsyncUntil2, expectAsyncUntil3, expectAsyncUntil4, expectAsyncUntil5, or expectAsyncUntil6 instead.
@Deprecated("Will be removed in 0.13.0")
expectAsyncUntil0<T>(T callback(), bool isDone(), { String id, String reason }) Func0<T>
Informs the framework that the given callback of arity 0 is expected to be called until isDone returns true. [...]
expectAsyncUntil1<T, A>(T callback(A a), bool isDone(), { String id, String reason }) Func1<T, A>
Informs the framework that the given callback of arity 1 is expected to be called until isDone returns true. [...]
expectAsyncUntil2<T, A, B>(T callback(A a, B b), bool isDone(), { String id, String reason }) Func2<T, A, B>
Informs the framework that the given callback of arity 2 is expected to be called until isDone returns true. [...]
expectAsyncUntil3<T, A, B, C>(T callback(A a, B b, C c), bool isDone(), { String id, String reason }) Func3<T, A, B, C>
Informs the framework that the given callback of arity 3 is expected to be called until isDone returns true. [...]
expectAsyncUntil4<T, A, B, C, D>(T callback(A a, B b, C c, D d), bool isDone(), { String id, String reason }) Func4<T, A, B, C, D>
Informs the framework that the given callback of arity 4 is expected to be called until isDone returns true. [...]
expectAsyncUntil5<T, A, B, C, D, E>(T callback(A a, B b, C c, D d, E e), bool isDone(), { String id, String reason }) Func5<T, A, B, C, D, E>
Informs the framework that the given callback of arity 5 is expected to be called until isDone returns true. [...]
expectAsyncUntil6<T, A, B, C, D, E, F>(T callback(A a, B b, C c, D d, E e, F f), bool isDone(), { String id, String reason }) Func6<T, A, B, C, D, E, F>
Informs the framework that the given callback of arity 6 is expected to be called until isDone returns true. [...]
expectLater(dynamic actual, dynamic matcher, { String reason, dynamic skip }) Future
Just like expect, but returns a Future that completes when the matcher has finished matching. [...]
fail(String message) → Null
Convenience method for throwing a new TestFailure with the provided message.
@alwaysThrows
greaterThan(dynamic value) Matcher
Returns a matcher which matches if the match argument is greater than the given value.
greaterThanOrEqualTo(dynamic value) Matcher
Returns a matcher which matches if the match argument is greater than or equal to the given value.
group(dynamic description, dynamic body(), { String testOn, Timeout timeout, dynamic skip, dynamic tags, Map<String, dynamic> onPlatform, int retry, bool solo: false }) → void
Creates a group of tests. [...]
@isTestGroup
hasAttributes(Matcher attributesMatcher) Matcher
hasChildren(Matcher childrenMatcher) Matcher
hasClasses(Matcher classesMatcher) Matcher
hasDataset(Matcher datasetMatcher) Matcher
hasLength(dynamic matcher) Matcher
Returns a matcher that matches if an object has a length property that matches matcher.
inClosedOpenRange(num low, num high) Matcher
Returns a matcher which matches if the match argument is greater than or equal to a low and less than high.
inExclusiveRange(num low, num high) Matcher
Returns a matcher which matches if the match argument is greater than low and less than high.
inInclusiveRange(num low, num high) Matcher
Returns a matcher which matches if the match argument is greater than or equal to low and less than or equal to high.
inOpenClosedRange(num low, num high) Matcher
Returns a matcher which matches if the match argument is greater than low and less than or equal to high.
isA<T>() TypeMatcher<T>
Returns a matcher that matches objects with type T. [...]
isElement(String expectedTag, [ Matcher fieldMatcher = anything ]) Matcher
isIn(dynamic expected) Matcher
Returns a matcher that matches if the match argument is in the expected value. This is the converse of contains.
isNot(dynamic matcher) Matcher
This returns a matcher that inverts matcher to its logical negation.
isText(Matcher textMatcher) Matcher
lessThan(dynamic value) Matcher
Returns a matcher which matches if the match argument is less than the given value.
lessThanOrEqualTo(dynamic value) Matcher
Returns a matcher which matches if the match argument is less than or equal to the given value.
matches(dynamic re) Matcher
Returns a matcher that matches if the match argument is a string and matches the regular expression given by re. [...]
mayEmit(dynamic matcher) StreamMatcher
Returns a StreamMatcher that allows (but doesn't require) matcher to match the stream. [...]
mayEmitMultiple(dynamic matcher) StreamMatcher
Returns a StreamMatcher that matches any number of events that match matcher. [...]
mount(Widget widget, Element container) → void
neverEmits(dynamic matcher) StreamMatcher
Returns a StreamMatcher that matches a stream that never matches matcher. [...]
orderedEquals(Iterable expected) Matcher
Returns a matcher which matches Iterables that have the same length and the same elements as expected, in the same order. [...]
pairwiseCompare<S, T>(Iterable<S> expected, bool comparator(S a, T b), String description) Matcher
A pairwise matcher for Iterables. [...]
predicate<T>(bool f(T value), [ String description = 'satisfies function' ]) Matcher
Returns a matcher that uses an arbitrary function that returns true or false for the actual value. [...]
printOnFailure(String message) → void
Prints message if and when the current test fails. [...]
prints(dynamic matcher) Matcher
Matches a Function that prints text that matches matcher. [...]
promiseToFuture<T>(dynamic jsPromise) Future<T>
promiseToFutureAsMap(dynamic jsPromise) Future<Map<String, dynamic>>
pumpEventQueue({int times }) Future
Returns a Future that completes after the event loop has run the given number of times (20 by default). [...]
querySelector(String selectors) Element
Finds the first descendant element of this document that matches the specified group of selectors. [...]
querySelectorAll<T extends Element>(String selectors) ElementList<T>
Finds all descendant elements of this document that match the specified group of selectors. [...]
registerException(dynamic error, [ StackTrace stackTrace ]) → void
Registers an exception that was caught for the current test.
rendering() Future<void>
runZoned<R>(R body(), { Map zoneValues, ZoneSpecification zoneSpecification, Function onError }) → R
Runs body in its own zone. [...]
same(dynamic expected) Matcher
Returns a matches that matches if the value is the same instance as expected, using identical.
scheduleMicrotask(void callback()) → void
Runs a function asynchronously. [...]
setUp(dynamic callback()) → void
Registers a function to be run before tests. [...]
setUpAll(dynamic callback()) → void
Registers a function to be run once before all tests. [...]
spawnHybridCode(String dartCode, { Object message, bool stayAlive: false }) StreamChannel
Spawns a VM isolate that runs the given dartCode, which is loaded as the contents of a Dart library. [...]
spawnHybridUri(dynamic uri, { Object message, bool stayAlive: false }) StreamChannel
Spawns a VM isolate for the given uri, which may be a Uri or a String. [...]
startsWith(String prefixString) Matcher
Returns a matcher that matches if the match argument is a string and starts with prefixString.
stringContainsInOrder(List<String> substrings) Matcher
Returns a matcher that matches if the match argument is a string and contains a given list of substrings in relative order. [...]
tearDown(dynamic callback()) → void
Registers a function to be run after tests. [...]
tearDownAll(dynamic callback()) → void
Registers a function to be run once after all tests. [...]
test(dynamic description, dynamic body(), { String testOn, Timeout timeout, dynamic skip, dynamic tags, Map<String, dynamic> onPlatform, int retry, bool solo: false }) → void
Creates a new test case with the given description (converted to a string) and body. [...]
@isTest
throwsA(dynamic matcher) Matcher
This can be used to match three kinds of objects: [...]
unorderedEquals(Iterable expected) Matcher
Returns a matcher which matches Iterables that have the same length and the same elements as expected, but not necessarily in the same order. [...]
unorderedMatches(Iterable expected) Matcher
Returns a matcher which matches Iterables whose elements match the matchers in expected, but not necessarily in the same order. [...]
wrapMatcher(dynamic x) Matcher
Takes an argument and returns an equivalent Matcher. [...]

Typedefs

AddListener(Listener listener) RemoveListener
BlobCallback(Blob blob) → void
ControllerCallback() → void
Type of a stream controller's onListen, onPause and onResume callbacks.
ControllerCancelCallback() → dynamic
Type of stream controller onCancel callbacks. [...]
CreatePeriodicTimerHandler(Zone self, ZoneDelegate parent, Zone zone, Duration period, void f(Timer timer)) Timer
CreateTimerHandler(Zone self, ZoneDelegate parent, Zone zone, Duration duration, void f()) Timer
CustomElementConstructor() → void
DatabaseCallback(SqlDatabase database) → void
DecodeErrorCallback(DomException error) → void
DecodeSuccessCallback(AudioBuffer decodedData) → void
ErrorCallbackHandler(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace stackTrace) AsyncError
ErrorFormatter(dynamic actual, Matcher matcher, String reason, Map matchState, bool verbose) → String
The type used for functions that can be used to build up error reports upon failures in expect.
@Deprecated("Will be removed in 0.13.0.")
EventListener(Event event) → dynamic
FontFaceSetForEachCallback(FontFace fontFace, FontFace fontFaceAgain, FontFaceSet set) → void
Emitted for any setlike IDL entry needs a callback signature. Today there is only one.
ForkHandler(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification specification, Map zoneValues) Zone
FrameRequestCallback(num highResTime) → void
Func0<T>() → T
Func1<T, A>([A a ]) → T
Func2<T, A, B>([A a, B b ]) → T
Func3<T, A, B, C>([A a, B b, C c ]) → T
Func4<T, A, B, C, D>([A a, B b, C c, D d ]) → T
Func5<T, A, B, C, D, E>([A a, B b, C c, D d, E e ]) → T
Func6<T, A, B, C, D, E, F>([A a, B b, C c, D d, E e, F f ]) → T
FunctionStringCallback(String data) → void
HandleUncaughtErrorHandler(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace stackTrace) → void
IdleRequestCallback(IdleDeadline deadline) → void
IntersectionObserverCallback(List entries, IntersectionObserver observer) → void
KeyboardEventHandler(KeyboardEvent event) → void
Listener() → void
MediaSessionActionHandler() → void
MessageCallback(Map message) → void
MetadataCallback(Metadata metadata) → void
MojoWatchCallback(int result) → void
MouseEventHandler(MouseEvent event) → void
MutationCallback(List mutations, MutationObserver observer) → void
PerformanceObserverCallback(PerformanceObserverEntryList entries, PerformanceObserver observer) → void
PrintHandler(Zone self, ZoneDelegate parent, Zone zone, String line) → void
RegisterBinaryCallbackHandler(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2)) ZoneBinaryCallback<R, T1, T2>
RegisterCallbackHandler(Zone self, ZoneDelegate parent, Zone zone, R f()) ZoneCallback<R>
RegisterUnaryCallbackHandler(Zone self, ZoneDelegate parent, Zone zone, R f(T arg)) ZoneUnaryCallback<R, T>
RemotePlaybackAvailabilityCallback(bool available) → void
RemoveListener() → void
ReportingObserverCallback(List reports, ReportingObserver observer) → void
RequestAnimationFrameCallback(num highResTime) → void
ResizeObserverCallback(List<ResizeObserverEntry> entries, ResizeObserver observer) → void
RtcPeerConnectionErrorCallback(DomException exception) → void
RtcStatsCallback(RtcStatsResponse response) → void
RunBinaryHandler(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2), T1 arg1, T2 arg2) → R
RunHandler(Zone self, ZoneDelegate parent, Zone zone, R f()) → R
RunUnaryHandler(Zone self, ZoneDelegate parent, Zone zone, R f(T arg), T arg) → R
ScheduleMicrotaskHandler(Zone self, ZoneDelegate parent, Zone zone, void f()) → void
ScrollStateCallback(ScrollState scrollState) → void
StorageErrorCallback(DomError error) → void
StorageQuotaCallback(int grantedQuotaInBytes) → void
StorageUsageCallback(int currentUsageInBytes, int currentQuotaInBytes) → void
TimeoutHandler() → void
VoidCallback() → void
ZoneBinaryCallback<R, T1, T2>(T1 arg1, T2 arg2) → R
ZoneCallback<R>() → R
ZoneUnaryCallback<R, T>(T arg) → R

Exceptions / Errors

AsyncError
Pair of error and stack trace. Returned by Zone.errorCallback.
DeferredLoadException
Thrown when a deferred library fails to load.
TimeoutException
Thrown when a scheduled timeout happens while waiting for an async result.