2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013-2017 Apple Inc. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
16 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
19 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 enum PageOverlayType {
32 // These map to ResourceRequestCachePolicy.
34 "UseProtocolCachePolicy",
35 "ReloadIgnoringCacheData",
36 "ReturnCacheDataElseLoad",
37 "ReturnCacheDataDontLoad"
40 // FIXME: Strings in an enum should not have the name of the enum as a prefix.
41 enum ResourceLoadPriority {
42 "ResourceLoadPriorityVeryLow",
43 "ResourceLoadPriorityLow",
44 "ResourceLoadPriorityMedium",
45 "ResourceLoadPriorityHigh",
46 "ResourceLoadPriorityVeryHigh"
49 [Conditional=MEDIA_SESSION] enum MediaSessionInterruptingCategory {
55 [Conditional=MEDIA_SESSION] enum MediaControlEvent {
61 // FIXME: Strings in an enum should not have the name of the enum as a prefix.
62 enum AutoFillButtonType {
63 "AutoFillButtonTypeNone",
64 "AutoFillButtonTypeContacts",
65 "AutoFillButtonTypeCredentials"
68 enum UserInterfaceLayoutDirection {
73 enum BaseWritingDirection {
79 enum EventThrottlingBehavior {
85 ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
87 ] interface Internals {
88 DOMString address(Node node);
89 boolean nodeNeedsStyleRecalc(Node node);
90 DOMString styleChangeType(Node node);
91 DOMString description(any value);
93 // Animated image pausing testing.
94 boolean hasPausedImageAnimations(Element element);
96 [MayThrowException] DOMString elementRenderTreeAsText(Element element);
97 boolean isPreloaded(DOMString url);
98 boolean isLoadingFromMemoryCache(DOMString url);
99 DOMString fetchResponseSource(FetchResponse response);
100 DOMString xhrResponseSource(XMLHttpRequest xhr);
101 boolean isSharingStyleSheetContents(HTMLLinkElement a, HTMLLinkElement b);
102 boolean isStyleSheetLoadingSubresources(HTMLLinkElement link);
103 void clearMemoryCache();
104 void pruneMemoryCacheToSize(long size);
105 void destroyDecodedDataForAllImages();
106 long memoryCacheSize();
107 void setOverrideCachePolicy(CachePolicy policy);
108 void setOverrideResourceLoadPriority(ResourceLoadPriority priority);
109 void setStrictRawResourceValidationPolicyDisabled(boolean disabled);
111 void clearPageCache();
112 unsigned long pageCacheSize();
114 CSSStyleDeclaration computedStyleIncludingVisitedInfo(Element element);
116 Node ensureUserAgentShadowRoot(Element host);
117 Node shadowRoot(Element host);
119 // CSS Deferred Parsing Testing.
120 long deferredStyleRulesCount(StyleSheet sheet);
121 long deferredGroupRulesCount(StyleSheet sheet);
122 long deferredKeyframesRulesCount(StyleSheet sheet);
124 [MayThrowException] DOMString shadowRootType(Node root);
125 DOMString shadowPseudoId(Element element);
126 void setShadowPseudoId(Element element, DOMString id);
127 Node treeScopeRootNode(Node node);
128 Node parentTreeScope(Node node);
130 // Spatial Navigation testing
131 [MayThrowException] unsigned long lastSpatialNavigationCandidateCount();
133 // CSS Animation testing.
134 unsigned long numberOfActiveAnimations();
135 [MayThrowException] void suspendAnimations();
136 [MayThrowException] void resumeAnimations();
137 [MayThrowException] boolean animationsAreSuspended();
138 [MayThrowException] boolean pauseAnimationAtTimeOnElement(DOMString animationName, unrestricted double pauseTime, Element element);
139 [MayThrowException] boolean pauseAnimationAtTimeOnPseudoElement(DOMString animationName, unrestricted double pauseTime, Element element, DOMString pseudoId);
140 readonly attribute double animationsInterval;
142 // CSS Transition testing.
143 [MayThrowException] boolean pauseTransitionAtTimeOnElement(DOMString propertyName, unrestricted double pauseTime, Element element);
144 [MayThrowException] boolean pauseTransitionAtTimeOnPseudoElement(DOMString property, unrestricted double pauseTime, Element element, DOMString pseudoId);
146 DOMString visiblePlaceholder(Element element);
147 void selectColorInColorChooser(HTMLInputElement element, DOMString colorValue);
148 [MayThrowException] sequence<DOMString> formControlStateOfPreviousHistoryItem();
149 [MayThrowException] void setFormControlStateOfPreviousHistoryItem(sequence<DOMString> values);
151 [MayThrowException] DOMRect absoluteCaretBounds();
153 DOMRect boundingBox(Element element);
155 [MayThrowException] DOMRectList inspectorHighlightRects();
156 [MayThrowException] DOMString inspectorHighlightObject();
158 [MayThrowException] unsigned long markerCountForNode(Node node, DOMString markerType);
159 [MayThrowException] Range? markerRangeForNode(Node node, DOMString markerType, unsigned long index);
160 [MayThrowException] DOMString markerDescriptionForNode(Node node, DOMString markerType, unsigned long index);
161 [MayThrowException] DOMString dumpMarkerRects(DOMString markerType);
162 void addTextMatchMarker(Range range, boolean isActive);
163 [MayThrowException] void setMarkedTextMatchesAreHighlighted(boolean flag);
165 void invalidateFontCache();
166 void setFontSmoothingEnabled(boolean enabled);
168 [MayThrowException] void setScrollViewPosition(long x, long y);
170 [MayThrowException] DOMRect layoutViewportRect();
171 [MayThrowException] DOMRect visualViewportRect();
173 [MayThrowException] void setViewBaseBackgroundColor(DOMString colorValue);
175 [MayThrowException] void setPagination(DOMString mode, long gap, optional long pageLength = 0);
176 [MayThrowException] void setPaginationLineGridEnabled(boolean enabled);
178 [MayThrowException] DOMString configurationForViewport(unrestricted float devicePixelRatio, long deviceWidth, long deviceHeight, long availableWidth, long availableHeight);
180 [MayThrowException] boolean wasLastChangeUserEdit(Element textField);
181 boolean elementShouldAutoComplete(HTMLInputElement inputElement);
182 void setEditingValue(HTMLInputElement inputElement, DOMString value);
183 void setAutofilled(HTMLInputElement inputElement, boolean enabled);
184 void setShowAutoFillButton(HTMLInputElement inputElement, AutoFillButtonType autoFillButtonType);
186 [MayThrowException] Range? rangeOfString(DOMString text, Range? referenceRange, sequence<DOMString> findOptions);
187 [MayThrowException] unsigned long countMatchesForText(DOMString text, sequence<DOMString> findOptions, DOMString markMatches);
188 [MayThrowException] unsigned long countFindMatches(DOMString text, sequence<DOMString> findOptions);
190 [MayThrowException] DOMString autofillFieldName(Element formControlElement);
192 [MayThrowException] void paintControlTints();
194 [MayThrowException] void scrollElementToRect(Element element, long x, long y, long w, long h);
196 Range? rangeFromLocationAndLength(Element scope, long rangeLocation, long rangeLength);
197 unsigned long locationFromRange(Element scope, Range range);
198 unsigned long lengthFromRange(Element scope, Range range);
199 DOMString rangeAsText(Range range);
200 Range subrange(Range range, long rangeLocation, long rangeLength);
201 [MayThrowException] Range? rangeForDictionaryLookupAtLocation(long x, long y);
202 Range? rangeOfStringNearLocation(Range range, DOMString text, long targetOffset);
204 [MayThrowException] void setDelegatesScrolling(boolean enabled);
206 [MayThrowException] long lastSpellCheckRequestSequence();
207 [MayThrowException] long lastSpellCheckProcessedSequence();
209 sequence<DOMString> userPreferredLanguages();
210 void setUserPreferredLanguages(sequence<DOMString> languages);
212 sequence<DOMString> userPreferredAudioCharacteristics();
213 void setUserPreferredAudioCharacteristic(DOMString characteristic);
215 [MayThrowException] unsigned long wheelEventHandlerCount();
216 [MayThrowException] unsigned long touchEventHandlerCount();
218 [MayThrowException] DOMRectList touchEventRectsForEvent(DOMString eventName);
219 [MayThrowException] DOMRectList passiveTouchEventListenerRects();
221 [MayThrowException] NodeList? nodesFromRect(Document document, long x, long y,
222 unsigned long topPadding, unsigned long rightPadding, unsigned long bottomPadding, unsigned long leftPadding,
223 boolean ignoreClipping, boolean allowShadowContent, boolean allowChildFrameContent);
225 // Calling parserMetaData() with no arguments gets the metadata for the script of the current scope.
226 DOMString parserMetaData(optional any func);
228 void updateEditorUINowIfScheduled();
230 boolean hasSpellingMarker(long from, long length);
231 boolean hasGrammarMarker(long from, long length);
232 boolean hasAutocorrectedMarker(long from, long length);
233 void setContinuousSpellCheckingEnabled(boolean enabled);
234 void setAutomaticQuoteSubstitutionEnabled(boolean enabled);
235 void setAutomaticLinkDetectionEnabled(boolean enabled);
236 void setAutomaticDashSubstitutionEnabled(boolean enabled);
237 void setAutomaticTextReplacementEnabled(boolean enabled);
238 void setAutomaticSpellingCorrectionEnabled(boolean enabled);
240 void handleAcceptedCandidate(DOMString candidate, unsigned long location, unsigned long length);
242 boolean isOverwriteModeEnabled();
243 void toggleOverwriteModeEnabled();
245 unsigned long numberOfScrollableAreas();
247 [MayThrowException] boolean isPageBoxVisible(long pageNumber);
249 unsigned long imageFrameIndex(HTMLImageElement element);
250 void setImageFrameDecodingDuration(HTMLImageElement element, unrestricted float duration);
251 void resetImageAnimation(HTMLImageElement element);
252 boolean isImageAnimating(HTMLImageElement element);
253 void setClearDecoderAfterAsyncFrameRequestForTesting(HTMLImageElement element, boolean enabled);
254 unsigned long imageDecodeCount(HTMLImageElement element);
255 void setLargeImageAsyncDecodingEnabledForTesting(HTMLImageElement element, boolean enabled);
257 void setGridMaxTracksLimit(unsigned long maxTracksLimit);
259 readonly attribute InternalSettings settings;
260 readonly attribute unsigned long workerThreadCount;
262 [MayThrowException] readonly attribute boolean areSVGAnimationsPaused;
263 [MayThrowException] double svgAnimationsInterval(SVGSVGElement element);
265 // Flags for layerTreeAsText.
266 const unsigned short LAYER_TREE_INCLUDES_VISIBLE_RECTS = 1;
267 const unsigned short LAYER_TREE_INCLUDES_TILE_CACHES = 2;
268 const unsigned short LAYER_TREE_INCLUDES_REPAINT_RECTS = 4;
269 const unsigned short LAYER_TREE_INCLUDES_PAINTING_PHASES = 8;
270 const unsigned short LAYER_TREE_INCLUDES_CONTENT_LAYERS = 16;
271 const unsigned short LAYER_TREE_INCLUDES_ACCELERATES_DRAWING = 32;
272 const unsigned short LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED = 64;
273 [MayThrowException] DOMString layerTreeAsText(Document document, optional unsigned short flags = 0);
275 [MayThrowException] unsigned long long layerIDForElement(Element element);
277 [MayThrowException] DOMString scrollingStateTreeAsText();
278 [MayThrowException] DOMString mainThreadScrollingReasons(); // FIXME: rename to synchronousScrollingReasons().
279 [MayThrowException] DOMRectList nonFastScrollableRects();
281 [MayThrowException] DOMString repaintRectsAsText();
283 // These throw if the element does not have a compositing layer.
284 [MayThrowException] void setElementUsesDisplayListDrawing(Element element, boolean usesDisplayListDrawing);
285 [MayThrowException] void setElementTracksDisplayListReplay(Element element, boolean trackReplay);
287 // Flags for displayListForElement.
288 const unsigned short DISPLAY_LIST_INCLUDES_PLATFORM_OPERATIONS = 1;
289 // Returns the recorded display list.
290 [MayThrowException] DOMString displayListForElement(Element element, optional unsigned short flags = 0);
291 // Returns the display list that was actually painted.
292 [MayThrowException] DOMString replayDisplayListForElement(Element element, optional unsigned short flags = 0);
294 [MayThrowException] void garbageCollectDocumentResources();
296 [MayThrowException] void insertAuthorCSS(DOMString css);
297 [MayThrowException] void insertUserCSS(DOMString css);
299 readonly attribute boolean isUnderMemoryPressure;
300 void beginSimulatedMemoryPressure();
301 void endSimulatedMemoryPressure();
303 unsigned long numberOfLiveNodes();
304 unsigned long numberOfLiveDocuments();
305 unsigned long referencingNodeCount(Document document);
306 DOMWindow? openDummyInspectorFrontend(DOMString url);
307 void closeDummyInspectorFrontend();
308 [MayThrowException] void setInspectorIsUnderTest(boolean isUnderTest);
310 DOMString counterValue(Element element);
311 long pageNumber(Element element, optional unrestricted float pageWidth = 800, optional unrestricted float pageHeight = 600);
312 sequence<DOMString> shortcutIconURLs();
313 long numberOfPages(optional unrestricted double pageWidthInPixels = 800, optional unrestricted double pageHeightInPixels = 600);
314 [MayThrowException] DOMString pageProperty(DOMString propertyName, long pageNumber);
315 [MayThrowException] DOMString pageSizeAndMarginsInPixels(long pageIndex, long width, long height, long marginTop, long marginRight, long marginBottom, long marginLeft);
317 [MayThrowException] void setPageScaleFactor(unrestricted float scaleFactor, long x, long y);
318 [MayThrowException] float pageScaleFactor();
320 [MayThrowException] void setPageZoomFactor(unrestricted float zoomFactor);
321 [MayThrowException] void setTextZoomFactor(unrestricted float zoomFactor);
323 [MayThrowException] void setUseFixedLayout(boolean useFixedLayout);
324 [MayThrowException] void setFixedLayoutSize(long width, long height);
325 void setPrinting(long width, long height);
327 [MayThrowException] void setViewExposedRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
329 void setHeaderHeight(unrestricted float height);
330 void setFooterHeight(unrestricted float height);
332 void setTopContentInset(unrestricted float contentInset);
334 [Conditional=FULLSCREEN_API] void webkitWillEnterFullScreenForElement(Element element);
335 [Conditional=FULLSCREEN_API] void webkitDidEnterFullScreenForElement(Element element);
336 [Conditional=FULLSCREEN_API] void webkitWillExitFullScreenForElement(Element element);
337 [Conditional=FULLSCREEN_API] void webkitDidExitFullScreenForElement(Element element);
339 void setApplicationCacheOriginQuota(unsigned long long quota);
341 void registerURLSchemeAsBypassingContentSecurityPolicy(DOMString scheme);
342 void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(DOMString scheme);
344 void registerDefaultPortForProtocol(unsigned short port, DOMString scheme);
346 MallocStatistics mallocStatistics();
347 TypeConversions typeConversions();
348 MemoryInfo memoryInfo();
350 sequence<DOMString> getReferencedFilePaths();
352 // These functions both reset the tracked repaint rects. They are intended to be used in the following order:
353 // startTrackingRepaints, repaintRectsAsText, stopTrackingRepaints.
354 [MayThrowException] void startTrackingRepaints();
355 [MayThrowException] void stopTrackingRepaints();
357 [MayThrowException] void startTrackingLayerFlushes();
358 [MayThrowException] unsigned long layerFlushCount();
360 // Query if a timer is currently throttled, to debug timer throttling.
361 [MayThrowException] boolean isTimerThrottled(long timerHandle);
363 boolean isRequestAnimationFrameThrottled();
364 boolean areTimersThrottled();
366 [MayThrowException] void setLowPowerModeEnabled(boolean enabled);
367 readonly attribute double requestAnimationFrameInterval;
368 readonly attribute boolean scriptedAnimationsAreSuspended;
370 // Override the behavior of WebPage::eventThrottlingDelay(), which only affects iOS.
371 attribute EventThrottlingBehavior? eventThrottlingBehaviorOverride;
373 [MayThrowException] void startTrackingStyleRecalcs();
374 [MayThrowException] unsigned long styleRecalcCount();
375 readonly attribute unsigned long lastStyleUpdateSize;
377 [MayThrowException] void startTrackingCompositingUpdates();
378 [MayThrowException] unsigned long compositingUpdateCount();
380 // |node| should be Document, HTMLIFrameElement, or unspecified.
381 // If |node| is an HTMLIFrameElement, it assumes node.contentDocument is
382 // specified without security checks. Unspecified or null means this document.
383 [MayThrowException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(optional Node? node = null);
385 readonly attribute unsigned long layoutCount;
387 // Returns a string with information about the mouse cursor used at the specified client location.
388 [MayThrowException] DOMString getCurrentCursorInfo();
390 DOMString markerTextForListItem(Element element);
392 DOMString toolTipFromElement(Element element);
394 SerializedScriptValue deserializeBuffer(ArrayBuffer buffer);
395 ArrayBuffer serializeObject(SerializedScriptValue object);
397 boolean isFromCurrentWorld(any obj);
399 void setUsesOverlayScrollbars(boolean enabled);
400 void setUsesMockScrollAnimator(boolean enabled);
402 void forceReload(boolean endToEnd);
403 void reloadExpiredOnly();
405 void enableAutoSizeMode(boolean enabled, long minimumWidth, long minimumHeight, long maximumWidth, long maximumHeight);
407 [Conditional=VIDEO] sequence<DOMString> mediaResponseSources(HTMLMediaElement media);
408 [Conditional=VIDEO] sequence<DOMString> mediaResponseContentRanges(HTMLMediaElement media);
409 [Conditional=VIDEO] void simulateAudioInterruption(HTMLMediaElement element);
410 [Conditional=VIDEO, MayThrowException] boolean mediaElementHasCharacteristic(HTMLMediaElement element, DOMString characteristic);
412 [Conditional=LEGACY_ENCRYPTED_MEDIA] void initializeMockCDM();
413 [Conditional=ENCRYPTED_MEDIA] MockCDMFactory registerMockCDM();
415 [Conditional=SPEECH_SYNTHESIS] void enableMockSpeechSynthesizer();
417 DOMString getImageSourceURL(Element element);
419 [Conditional=VIDEO_TRACK, MayThrowException] DOMString captionsStyleSheetOverride();
420 [Conditional=VIDEO_TRACK, MayThrowException] void setCaptionsStyleSheetOverride(DOMString override);
421 [Conditional=VIDEO_TRACK, MayThrowException] void setPrimaryAudioTrackLanguageOverride(DOMString language);
422 [Conditional=VIDEO_TRACK, MayThrowException] void setCaptionDisplayMode(DOMString mode);
424 [Conditional=VIDEO] TimeRanges createTimeRanges(Float32Array startTimes, Float32Array
426 [Conditional=VIDEO] unrestricted double closestTimeToTimeRanges(unrestricted double time, TimeRanges ranges);
428 boolean isSelectPopupVisible(HTMLSelectElement element);
430 [MayThrowException] boolean isPluginUnavailabilityIndicatorObscured(Element element);
431 boolean isPluginSnapshotted(Element element);
433 [MayThrowException] DOMRect selectionBounds();
435 [Conditional=MEDIA_SOURCE] void initializeMockMediaSource();
436 [Conditional=MEDIA_SOURCE] sequence<DOMString> bufferedSamplesForTrackID(SourceBuffer buffer, DOMString trackID);
437 [Conditional=MEDIA_SOURCE] sequence<DOMString> enqueuedSamplesForTrackID(SourceBuffer buffer, DOMString trackID);
438 [Conditional=MEDIA_SOURCE] void setShouldGenerateTimestamps(SourceBuffer buffer, boolean flag);
440 [Conditional=VIDEO, MayThrowException] void beginMediaSessionInterruption(DOMString interruptionType);
441 [Conditional=VIDEO] void endMediaSessionInterruption(DOMString flags);
442 [Conditional=MEDIA_SESSION] void sendMediaSessionStartOfInterruptionNotification(MediaSessionInterruptingCategory category);
443 [Conditional=MEDIA_SESSION] void sendMediaSessionEndOfInterruptionNotification(MediaSessionInterruptingCategory category);
444 [Conditional=MEDIA_SESSION] DOMString mediaSessionCurrentState(MediaSession session);
445 [Conditional=MEDIA_SESSION] double mediaElementPlayerVolume(HTMLMediaElement element);
446 [Conditional=MEDIA_SESSION] void sendMediaControlEvent(MediaControlEvent event);
447 [Conditional=VIDEO] void applicationWillBecomeInactive();
448 [Conditional=VIDEO] void applicationDidBecomeActive();
449 [Conditional=VIDEO] void applicationWillEnterForeground(optional boolean suspendedUnderLock = false);
450 [Conditional=VIDEO] void applicationDidEnterBackground(optional boolean suspendedUnderLock = false);
451 [Conditional=VIDEO, MayThrowException] void setMediaSessionRestrictions(DOMString mediaType, DOMString restrictions);
452 [Conditional=VIDEO, MayThrowException] DOMString mediaSessionRestrictions(DOMString mediaType);
453 [Conditional=VIDEO] void setMediaElementRestrictions(HTMLMediaElement element, DOMString restrictions);
454 [Conditional=WEB_AUDIO] void setAudioContextRestrictions(AudioContext context, DOMString restrictions);
455 [Conditional=VIDEO, MayThrowException] void postRemoteControlCommand(DOMString command, optional unrestricted float argument = 0);
456 [Conditional=WIRELESS_PLAYBACK_TARGET] void setMockMediaPlaybackTargetPickerEnabled(boolean enabled);
457 [Conditional=WIRELESS_PLAYBACK_TARGET, MayThrowException] void setMockMediaPlaybackTargetPickerState(DOMString deviceName, DOMString deviceState);
458 [Conditional=MEDIA_STREAM] void setMockMediaCaptureDevicesEnabled(boolean enabled);
460 [Conditional=WEB_RTC] void emulateRTCPeerConnectionPlatformEvent(RTCPeerConnection connection, DOMString action);
461 [Conditional=WEB_RTC] void useMockRTCPeerConnectionFactory(DOMString testCase);
462 [Conditional=WEB_RTC] void setICECandidateFiltering(boolean enabled);
463 [Conditional=WEB_RTC] void setEnumeratingAllNetworkInterfacesEnabled(boolean enabled);
464 [Conditional=WEB_RTC] void stopPeerConnection(RTCPeerConnection connection);
466 [Conditional=VIDEO] void simulateSystemSleep();
467 [Conditional=VIDEO] void simulateSystemWake();
468 [Conditional=VIDEO] boolean elementIsBlockingDisplaySleep(HTMLMediaElement element);
470 [MayThrowException] MockPageOverlay installMockPageOverlay(PageOverlayType type);
471 [MayThrowException] DOMString pageOverlayLayerTreeAsText(optional unsigned short flags = 0);
473 void setPageMuted(DOMString mutedState);
474 DOMString pageMediaState();
476 void setPageDefersLoading(boolean defersLoading);
478 File? createFile(DOMString url);
479 void queueMicroTask(long testNumber);
480 boolean testPreloaderSettingViewport();
482 [Conditional=CONTENT_FILTERING] readonly attribute MockContentFilterSettings mockContentFilterSettings;
484 [Conditional=CSS_SCROLL_SNAP, MayThrowException] DOMString scrollSnapOffsets(Element element);
485 [Conditional=CSS_SCROLL_SNAP] void setPlatformMomentumScrollingPredictionEnabled(boolean enabled);
487 [MayThrowException] DOMString pathStringWithShrinkWrappedRects(sequence<double> rectComponents, double radius);
489 [Conditional=VIDEO] DOMString getCurrentMediaControlsStatusForElement(HTMLMediaElement element);
491 DOMString userVisibleString(DOMURL url);
493 void setShowAllPlugins(boolean showAll);
495 [Conditional=STREAMS_API, CallWith=ScriptState] any cloneArrayBuffer(any buffer, any srcByteOffset, any byteLength);
496 [Conditional=STREAMS_API, CallWith=ScriptState] boolean isReadableStreamDisturbed(any stream);
498 DOMString resourceLoadStatisticsForOrigin(DOMString domain);
499 void setResourceLoadStatisticsEnabled(boolean enable);
500 [EnabledBySetting=StorageAccessAPI] void setUserGrantsStorageAccess(boolean value);
502 [MayThrowException] void setCanShowModalDialogOverride(boolean allow);
504 DOMString composedTreeAsText(Node parent);
506 boolean isProcessingUserGesture();
507 double lastHandledUserGestureTimestamp();
509 GCObservation? observeGC(any observed);
511 void setUserInterfaceLayoutDirection(UserInterfaceLayoutDirection userInterfaceLayoutDirection);
512 void setBaseWritingDirection(BaseWritingDirection direction);
514 boolean userPrefersReducedMotion();
516 void reportBacktrace();
518 [Conditional=POINTER_LOCK] boolean pageHasPendingPointerLock();
519 [Conditional=POINTER_LOCK] boolean pageHasPointerLock();
521 sequence<DOMString> accessKeyModifiers();
523 void setQuickLookPassword(DOMString password);
525 [CallWith=Document] void setAsRunningUserScripts();
527 void disableTileSizeUpdateDelay();
528 void setSpeculativeTilingDelayDisabledForTesting(boolean disabled);
530 [Conditional=WEBGL] void simulateWebGLContextChanged(WebGLRenderingContext context);
531 [Conditional=WEBGL] void failNextGPUStatusCheck(WebGLRenderingContext context);
533 void setPageVisibility(boolean isVisible);
535 [Conditional=WEB_RTC] void setH264HardwareEncoderAllowed(boolean allowed);
536 [Conditional=WEB_RTC] void applyRotationForOutgoingVideoSources(RTCPeerConnection connection);
538 [Conditional=MEDIA_STREAM] void setCameraMediaStreamTrackOrientation(MediaStreamTrack track, short orientation);
539 [Conditional=MEDIA_STREAM] void observeMediaStreamTrack(MediaStreamTrack track);
540 [Conditional=MEDIA_STREAM] Promise<ImageData> grabNextMediaStreamTrackFrame();
541 [Conditional=MEDIA_STREAM] readonly attribute unsigned long trackAudioSampleCount;
542 [Conditional=MEDIA_STREAM] readonly attribute unsigned long trackVideoSampleCount;
543 [Conditional=MEDIA_STREAM, MayThrowException] void setMediaDeviceState(DOMString deviceID, DOMString property, boolean value);
544 [Conditional=MEDIA_STREAM] void delayMediaStreamTrackSamples(MediaStreamTrack track, float delay);
545 [Conditional=MEDIA_STREAM] void setMediaStreamTrackMuted(MediaStreamTrack track, boolean muted);
546 [Conditional=MEDIA_STREAM] void removeMediaStreamTrack(MediaStream stream, MediaStreamTrack track);
547 [Conditional=MEDIA_STREAM] void simulateMediaStreamTrackCaptureSourceFailure(MediaStreamTrack track);
549 Promise<void> clearCacheStorageMemoryRepresentation();
550 Promise<DOMString> cacheStorageEngineRepresentation();
551 void setResponseSizeWithPadding(FetchResponse response, unsigned long long size);
552 unsigned long long responseSizeWithPadding(FetchResponse response);
554 void setConsoleMessageListener(StringCallback callback);
556 DOMString audioSessionCategory();
558 [Conditional=SERVICE_WORKER] Promise<Response> waitForFetchEventToFinish(FetchEvent event);
559 [Conditional=SERVICE_WORKER] Promise<void> waitForExtendableEventToFinish(ExtendableEvent event);
560 [Conditional=SERVICE_WORKER] ExtendableEvent createTrustedExtendableEvent();
562 boolean hasServiceWorkerRegisteredForOrigin(DOMString origin);
564 [EnabledAtRuntime=WebAnimations] DOMString timelineDescription(AnimationTimeline timeline);