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 // Must be called on an element whose enclosingLayer() is self-painting.
97 boolean isPaintingFrequently(Element element);
98 void incrementFrequentPaintCounter(Element element);
100 [MayThrowException] DOMString elementRenderTreeAsText(Element element);
101 boolean isPreloaded(DOMString url);
102 boolean isLoadingFromMemoryCache(DOMString url);
103 DOMString fetchResponseSource(FetchResponse response);
104 DOMString xhrResponseSource(XMLHttpRequest xhr);
105 boolean isSharingStyleSheetContents(HTMLLinkElement a, HTMLLinkElement b);
106 boolean isStyleSheetLoadingSubresources(HTMLLinkElement link);
107 void clearMemoryCache();
108 void pruneMemoryCacheToSize(long size);
109 void destroyDecodedDataForAllImages();
110 long memoryCacheSize();
111 void setOverrideCachePolicy(CachePolicy policy);
112 void setOverrideResourceLoadPriority(ResourceLoadPriority priority);
113 void setStrictRawResourceValidationPolicyDisabled(boolean disabled);
115 void clearPageCache();
116 unsigned long pageCacheSize();
118 CSSStyleDeclaration computedStyleIncludingVisitedInfo(Element element);
120 Node ensureUserAgentShadowRoot(Element host);
121 Node shadowRoot(Element host);
123 // CSS Deferred Parsing Testing.
124 long deferredStyleRulesCount(StyleSheet sheet);
125 long deferredGroupRulesCount(StyleSheet sheet);
126 long deferredKeyframesRulesCount(StyleSheet sheet);
128 [MayThrowException] DOMString shadowRootType(Node root);
129 DOMString shadowPseudoId(Element element);
130 void setShadowPseudoId(Element element, DOMString id);
131 Node treeScopeRootNode(Node node);
132 Node parentTreeScope(Node node);
134 // Spatial Navigation testing
135 [MayThrowException] unsigned long lastSpatialNavigationCandidateCount();
137 // CSS Animation testing.
138 unsigned long numberOfActiveAnimations();
139 [MayThrowException] void suspendAnimations();
140 [MayThrowException] void resumeAnimations();
141 [MayThrowException] boolean animationsAreSuspended();
142 [MayThrowException] boolean pauseAnimationAtTimeOnElement(DOMString animationName, unrestricted double pauseTime, Element element);
143 [MayThrowException] boolean pauseAnimationAtTimeOnPseudoElement(DOMString animationName, unrestricted double pauseTime, Element element, DOMString pseudoId);
144 readonly attribute double animationsInterval;
146 // CSS Transition testing.
147 [MayThrowException] boolean pauseTransitionAtTimeOnElement(DOMString propertyName, unrestricted double pauseTime, Element element);
148 [MayThrowException] boolean pauseTransitionAtTimeOnPseudoElement(DOMString property, unrestricted double pauseTime, Element element, DOMString pseudoId);
150 DOMString visiblePlaceholder(Element element);
151 void selectColorInColorChooser(HTMLInputElement element, DOMString colorValue);
152 [MayThrowException] sequence<DOMString> formControlStateOfPreviousHistoryItem();
153 [MayThrowException] void setFormControlStateOfPreviousHistoryItem(sequence<DOMString> values);
155 [MayThrowException] DOMRect absoluteCaretBounds();
157 DOMRect boundingBox(Element element);
159 [MayThrowException] DOMRectList inspectorHighlightRects();
160 [MayThrowException] DOMString inspectorHighlightObject();
162 [MayThrowException] unsigned long markerCountForNode(Node node, DOMString markerType);
163 [MayThrowException] Range? markerRangeForNode(Node node, DOMString markerType, unsigned long index);
164 [MayThrowException] DOMString markerDescriptionForNode(Node node, DOMString markerType, unsigned long index);
165 [MayThrowException] DOMString dumpMarkerRects(DOMString markerType);
166 void addTextMatchMarker(Range range, boolean isActive);
167 [MayThrowException] void setMarkedTextMatchesAreHighlighted(boolean flag);
169 void invalidateFontCache();
170 void setFontSmoothingEnabled(boolean enabled);
172 [MayThrowException] void setScrollViewPosition(long x, long y);
174 // Like Element.scrollTo(), but without constaints, for testing rubber-banding.
175 [MayThrowException] void unconstrainedScrollTo(Element element, unrestricted double x, unrestricted double y);
177 [MayThrowException] DOMRect layoutViewportRect();
178 [MayThrowException] DOMRect visualViewportRect();
180 [MayThrowException] void setViewBaseBackgroundColor(DOMString colorValue);
182 [MayThrowException] void setPagination(DOMString mode, long gap, optional long pageLength = 0);
183 [MayThrowException] void setPaginationLineGridEnabled(boolean enabled);
185 [MayThrowException] DOMString configurationForViewport(unrestricted float devicePixelRatio, long deviceWidth, long deviceHeight, long availableWidth, long availableHeight);
187 [MayThrowException] boolean wasLastChangeUserEdit(Element textField);
188 boolean elementShouldAutoComplete(HTMLInputElement inputElement);
189 void setEditingValue(HTMLInputElement inputElement, DOMString value);
190 void setAutofilled(HTMLInputElement inputElement, boolean enabled);
191 void setShowAutoFillButton(HTMLInputElement inputElement, AutoFillButtonType autoFillButtonType);
193 [MayThrowException] Range? rangeOfString(DOMString text, Range? referenceRange, sequence<DOMString> findOptions);
194 [MayThrowException] unsigned long countMatchesForText(DOMString text, sequence<DOMString> findOptions, DOMString markMatches);
195 [MayThrowException] unsigned long countFindMatches(DOMString text, sequence<DOMString> findOptions);
197 [MayThrowException] DOMString autofillFieldName(Element formControlElement);
199 [MayThrowException] void paintControlTints();
201 [MayThrowException] void scrollElementToRect(Element element, long x, long y, long w, long h);
203 Range? rangeFromLocationAndLength(Element scope, long rangeLocation, long rangeLength);
204 unsigned long locationFromRange(Element scope, Range range);
205 unsigned long lengthFromRange(Element scope, Range range);
206 DOMString rangeAsText(Range range);
207 Range subrange(Range range, long rangeLocation, long rangeLength);
208 [MayThrowException] Range? rangeForDictionaryLookupAtLocation(long x, long y);
209 Range? rangeOfStringNearLocation(Range range, DOMString text, long targetOffset);
211 [MayThrowException] void setDelegatesScrolling(boolean enabled);
213 [MayThrowException] long lastSpellCheckRequestSequence();
214 [MayThrowException] long lastSpellCheckProcessedSequence();
216 sequence<DOMString> userPreferredLanguages();
217 void setUserPreferredLanguages(sequence<DOMString> languages);
219 sequence<DOMString> userPreferredAudioCharacteristics();
220 void setUserPreferredAudioCharacteristic(DOMString characteristic);
222 [MayThrowException] unsigned long wheelEventHandlerCount();
223 [MayThrowException] unsigned long touchEventHandlerCount();
225 [MayThrowException] DOMRectList touchEventRectsForEvent(DOMString eventName);
226 [MayThrowException] DOMRectList passiveTouchEventListenerRects();
228 [MayThrowException] NodeList? nodesFromRect(Document document, long x, long y,
229 unsigned long topPadding, unsigned long rightPadding, unsigned long bottomPadding, unsigned long leftPadding,
230 boolean ignoreClipping, boolean allowShadowContent, boolean allowChildFrameContent);
232 // Calling parserMetaData() with no arguments gets the metadata for the script of the current scope.
233 DOMString parserMetaData(optional any func);
235 void updateEditorUINowIfScheduled();
237 boolean hasSpellingMarker(long from, long length);
238 boolean hasGrammarMarker(long from, long length);
239 boolean hasAutocorrectedMarker(long from, long length);
240 void setContinuousSpellCheckingEnabled(boolean enabled);
241 void setAutomaticQuoteSubstitutionEnabled(boolean enabled);
242 void setAutomaticLinkDetectionEnabled(boolean enabled);
243 void setAutomaticDashSubstitutionEnabled(boolean enabled);
244 void setAutomaticTextReplacementEnabled(boolean enabled);
245 void setAutomaticSpellingCorrectionEnabled(boolean enabled);
247 void handleAcceptedCandidate(DOMString candidate, unsigned long location, unsigned long length);
249 boolean isOverwriteModeEnabled();
250 void toggleOverwriteModeEnabled();
252 unsigned long numberOfScrollableAreas();
254 [MayThrowException] boolean isPageBoxVisible(long pageNumber);
256 unsigned long imageFrameIndex(HTMLImageElement element);
257 void setImageFrameDecodingDuration(HTMLImageElement element, unrestricted float duration);
258 void resetImageAnimation(HTMLImageElement element);
259 boolean isImageAnimating(HTMLImageElement element);
260 void setClearDecoderAfterAsyncFrameRequestForTesting(HTMLImageElement element, boolean enabled);
261 unsigned long imageDecodeCount(HTMLImageElement element);
262 void setLargeImageAsyncDecodingEnabledForTesting(HTMLImageElement element, boolean enabled);
264 void setGridMaxTracksLimit(unsigned long maxTracksLimit);
266 readonly attribute InternalSettings settings;
267 readonly attribute unsigned long workerThreadCount;
269 [MayThrowException] readonly attribute boolean areSVGAnimationsPaused;
270 [MayThrowException] double svgAnimationsInterval(SVGSVGElement element);
272 // Flags for layerTreeAsText.
273 const unsigned short LAYER_TREE_INCLUDES_VISIBLE_RECTS = 1;
274 const unsigned short LAYER_TREE_INCLUDES_TILE_CACHES = 2;
275 const unsigned short LAYER_TREE_INCLUDES_REPAINT_RECTS = 4;
276 const unsigned short LAYER_TREE_INCLUDES_PAINTING_PHASES = 8;
277 const unsigned short LAYER_TREE_INCLUDES_CONTENT_LAYERS = 16;
278 const unsigned short LAYER_TREE_INCLUDES_ACCELERATES_DRAWING = 32;
279 const unsigned short LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED = 64;
280 [MayThrowException] DOMString layerTreeAsText(Document document, optional unsigned short flags = 0);
282 [MayThrowException] unsigned long long layerIDForElement(Element element);
284 [MayThrowException] DOMString scrollingStateTreeAsText();
285 [MayThrowException] DOMString mainThreadScrollingReasons(); // FIXME: rename to synchronousScrollingReasons().
286 [MayThrowException] DOMRectList nonFastScrollableRects();
288 [MayThrowException] DOMString repaintRectsAsText();
290 // These throw if the element does not have a compositing layer.
291 [MayThrowException] void setElementUsesDisplayListDrawing(Element element, boolean usesDisplayListDrawing);
292 [MayThrowException] void setElementTracksDisplayListReplay(Element element, boolean trackReplay);
294 // Flags for displayListForElement.
295 const unsigned short DISPLAY_LIST_INCLUDES_PLATFORM_OPERATIONS = 1;
296 // Returns the recorded display list.
297 [MayThrowException] DOMString displayListForElement(Element element, optional unsigned short flags = 0);
298 // Returns the display list that was actually painted.
299 [MayThrowException] DOMString replayDisplayListForElement(Element element, optional unsigned short flags = 0);
301 [MayThrowException] void garbageCollectDocumentResources();
303 [MayThrowException] void insertAuthorCSS(DOMString css);
304 [MayThrowException] void insertUserCSS(DOMString css);
306 readonly attribute boolean isUnderMemoryPressure;
307 void beginSimulatedMemoryPressure();
308 void endSimulatedMemoryPressure();
310 unsigned long numberOfLiveNodes();
311 unsigned long numberOfLiveDocuments();
312 unsigned long referencingNodeCount(Document document);
313 DOMWindow? openDummyInspectorFrontend(DOMString url);
314 void closeDummyInspectorFrontend();
315 [MayThrowException] void setInspectorIsUnderTest(boolean isUnderTest);
317 DOMString counterValue(Element element);
318 long pageNumber(Element element, optional unrestricted float pageWidth = 800, optional unrestricted float pageHeight = 600);
319 sequence<DOMString> shortcutIconURLs();
320 long numberOfPages(optional unrestricted double pageWidthInPixels = 800, optional unrestricted double pageHeightInPixels = 600);
321 [MayThrowException] DOMString pageProperty(DOMString propertyName, long pageNumber);
322 [MayThrowException] DOMString pageSizeAndMarginsInPixels(long pageIndex, long width, long height, long marginTop, long marginRight, long marginBottom, long marginLeft);
324 [MayThrowException] void setPageScaleFactor(unrestricted float scaleFactor, long x, long y);
325 [MayThrowException] float pageScaleFactor();
327 [MayThrowException] void setPageZoomFactor(unrestricted float zoomFactor);
328 [MayThrowException] void setTextZoomFactor(unrestricted float zoomFactor);
330 [MayThrowException] void setUseFixedLayout(boolean useFixedLayout);
331 [MayThrowException] void setFixedLayoutSize(long width, long height);
332 void setPrinting(long width, long height);
334 [MayThrowException] void setViewExposedRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
336 void setHeaderHeight(unrestricted float height);
337 void setFooterHeight(unrestricted float height);
339 void setTopContentInset(unrestricted float contentInset);
341 [Conditional=FULLSCREEN_API] void webkitWillEnterFullScreenForElement(Element element);
342 [Conditional=FULLSCREEN_API] void webkitDidEnterFullScreenForElement(Element element);
343 [Conditional=FULLSCREEN_API] void webkitWillExitFullScreenForElement(Element element);
344 [Conditional=FULLSCREEN_API] void webkitDidExitFullScreenForElement(Element element);
346 void setApplicationCacheOriginQuota(unsigned long long quota);
348 void registerURLSchemeAsBypassingContentSecurityPolicy(DOMString scheme);
349 void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(DOMString scheme);
351 void registerDefaultPortForProtocol(unsigned short port, DOMString scheme);
353 MallocStatistics mallocStatistics();
354 TypeConversions typeConversions();
355 MemoryInfo memoryInfo();
357 sequence<DOMString> getReferencedFilePaths();
359 // These functions both reset the tracked repaint rects. They are intended to be used in the following order:
360 // startTrackingRepaints, repaintRectsAsText, stopTrackingRepaints.
361 [MayThrowException] void startTrackingRepaints();
362 [MayThrowException] void stopTrackingRepaints();
364 [MayThrowException] void startTrackingLayerFlushes();
365 [MayThrowException] unsigned long layerFlushCount();
367 // Query if a timer is currently throttled, to debug timer throttling.
368 [MayThrowException] boolean isTimerThrottled(long timerHandle);
370 boolean isRequestAnimationFrameThrottled();
371 boolean areTimersThrottled();
373 [MayThrowException] void setLowPowerModeEnabled(boolean enabled);
374 readonly attribute double requestAnimationFrameInterval;
375 readonly attribute boolean scriptedAnimationsAreSuspended;
377 // Override the behavior of WebPage::eventThrottlingDelay(), which only affects iOS.
378 attribute EventThrottlingBehavior? eventThrottlingBehaviorOverride;
380 [MayThrowException] void startTrackingStyleRecalcs();
381 [MayThrowException] unsigned long styleRecalcCount();
382 readonly attribute unsigned long lastStyleUpdateSize;
384 [MayThrowException] void startTrackingCompositingUpdates();
385 [MayThrowException] unsigned long compositingUpdateCount();
387 // |node| should be Document, HTMLIFrameElement, or unspecified.
388 // If |node| is an HTMLIFrameElement, it assumes node.contentDocument is
389 // specified without security checks. Unspecified or null means this document.
390 [MayThrowException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(optional Node? node = null);
392 readonly attribute unsigned long layoutCount;
394 // Returns a string with information about the mouse cursor used at the specified client location.
395 [MayThrowException] DOMString getCurrentCursorInfo();
397 DOMString markerTextForListItem(Element element);
399 DOMString toolTipFromElement(Element element);
401 SerializedScriptValue deserializeBuffer(ArrayBuffer buffer);
402 ArrayBuffer serializeObject(SerializedScriptValue object);
404 boolean isFromCurrentWorld(any obj);
406 void setUsesOverlayScrollbars(boolean enabled);
407 void setUsesMockScrollAnimator(boolean enabled);
409 void forceReload(boolean endToEnd);
410 void reloadExpiredOnly();
412 void enableAutoSizeMode(boolean enabled, long minimumWidth, long minimumHeight, long maximumWidth, long maximumHeight);
414 [Conditional=VIDEO] sequence<DOMString> mediaResponseSources(HTMLMediaElement media);
415 [Conditional=VIDEO] sequence<DOMString> mediaResponseContentRanges(HTMLMediaElement media);
416 [Conditional=VIDEO] void simulateAudioInterruption(HTMLMediaElement element);
417 [Conditional=VIDEO, MayThrowException] boolean mediaElementHasCharacteristic(HTMLMediaElement element, DOMString characteristic);
419 [Conditional=LEGACY_ENCRYPTED_MEDIA] void initializeMockCDM();
420 [Conditional=ENCRYPTED_MEDIA] MockCDMFactory registerMockCDM();
422 [Conditional=SPEECH_SYNTHESIS] void enableMockSpeechSynthesizer();
424 DOMString getImageSourceURL(Element element);
426 [Conditional=VIDEO_TRACK, MayThrowException] DOMString captionsStyleSheetOverride();
427 [Conditional=VIDEO_TRACK, MayThrowException] void setCaptionsStyleSheetOverride(DOMString override);
428 [Conditional=VIDEO_TRACK, MayThrowException] void setPrimaryAudioTrackLanguageOverride(DOMString language);
429 [Conditional=VIDEO_TRACK, MayThrowException] void setCaptionDisplayMode(DOMString mode);
431 [Conditional=VIDEO] TimeRanges createTimeRanges(Float32Array startTimes, Float32Array
433 [Conditional=VIDEO] unrestricted double closestTimeToTimeRanges(unrestricted double time, TimeRanges ranges);
435 boolean isSelectPopupVisible(HTMLSelectElement element);
437 [MayThrowException] boolean isPluginUnavailabilityIndicatorObscured(Element element);
438 boolean isPluginSnapshotted(Element element);
440 [MayThrowException] DOMRect selectionBounds();
442 [Conditional=MEDIA_SOURCE] void initializeMockMediaSource();
443 [Conditional=MEDIA_SOURCE] sequence<DOMString> bufferedSamplesForTrackID(SourceBuffer buffer, DOMString trackID);
444 [Conditional=MEDIA_SOURCE] sequence<DOMString> enqueuedSamplesForTrackID(SourceBuffer buffer, DOMString trackID);
445 [Conditional=MEDIA_SOURCE] void setShouldGenerateTimestamps(SourceBuffer buffer, boolean flag);
447 [Conditional=VIDEO, MayThrowException] void beginMediaSessionInterruption(DOMString interruptionType);
448 [Conditional=VIDEO] void endMediaSessionInterruption(DOMString flags);
449 [Conditional=MEDIA_SESSION] void sendMediaSessionStartOfInterruptionNotification(MediaSessionInterruptingCategory category);
450 [Conditional=MEDIA_SESSION] void sendMediaSessionEndOfInterruptionNotification(MediaSessionInterruptingCategory category);
451 [Conditional=MEDIA_SESSION] DOMString mediaSessionCurrentState(MediaSession session);
452 [Conditional=MEDIA_SESSION] double mediaElementPlayerVolume(HTMLMediaElement element);
453 [Conditional=MEDIA_SESSION] void sendMediaControlEvent(MediaControlEvent event);
454 [Conditional=VIDEO] void applicationWillBecomeInactive();
455 [Conditional=VIDEO] void applicationDidBecomeActive();
456 [Conditional=VIDEO] void applicationWillEnterForeground(optional boolean suspendedUnderLock = false);
457 [Conditional=VIDEO] void applicationDidEnterBackground(optional boolean suspendedUnderLock = false);
458 [Conditional=VIDEO, MayThrowException] void setMediaSessionRestrictions(DOMString mediaType, DOMString restrictions);
459 [Conditional=VIDEO, MayThrowException] DOMString mediaSessionRestrictions(DOMString mediaType);
460 [Conditional=VIDEO] void setMediaElementRestrictions(HTMLMediaElement element, DOMString restrictions);
461 [Conditional=WEB_AUDIO] void setAudioContextRestrictions(AudioContext context, DOMString restrictions);
462 [Conditional=VIDEO, MayThrowException] void postRemoteControlCommand(DOMString command, optional unrestricted float argument = 0);
463 [Conditional=WIRELESS_PLAYBACK_TARGET] void setMockMediaPlaybackTargetPickerEnabled(boolean enabled);
464 [Conditional=WIRELESS_PLAYBACK_TARGET, MayThrowException] void setMockMediaPlaybackTargetPickerState(DOMString deviceName, DOMString deviceState);
465 [Conditional=MEDIA_STREAM] void setMockMediaCaptureDevicesEnabled(boolean enabled);
467 [Conditional=WEB_RTC] void emulateRTCPeerConnectionPlatformEvent(RTCPeerConnection connection, DOMString action);
468 [Conditional=WEB_RTC] void useMockRTCPeerConnectionFactory(DOMString testCase);
469 [Conditional=WEB_RTC] void setICECandidateFiltering(boolean enabled);
470 [Conditional=WEB_RTC] void setEnumeratingAllNetworkInterfacesEnabled(boolean enabled);
471 [Conditional=WEB_RTC] void stopPeerConnection(RTCPeerConnection connection);
473 [Conditional=VIDEO] void simulateSystemSleep();
474 [Conditional=VIDEO] void simulateSystemWake();
475 [Conditional=VIDEO] boolean elementIsBlockingDisplaySleep(HTMLMediaElement element);
477 [MayThrowException] MockPageOverlay installMockPageOverlay(PageOverlayType type);
478 [MayThrowException] DOMString pageOverlayLayerTreeAsText(optional unsigned short flags = 0);
480 void setPageMuted(DOMString mutedState);
481 DOMString pageMediaState();
483 void setPageDefersLoading(boolean defersLoading);
485 File? createFile(DOMString url);
486 void queueMicroTask(long testNumber);
487 boolean testPreloaderSettingViewport();
489 [Conditional=CONTENT_FILTERING] readonly attribute MockContentFilterSettings mockContentFilterSettings;
491 [Conditional=CSS_SCROLL_SNAP, MayThrowException] DOMString scrollSnapOffsets(Element element);
492 [Conditional=CSS_SCROLL_SNAP] void setPlatformMomentumScrollingPredictionEnabled(boolean enabled);
494 [MayThrowException] DOMString pathStringWithShrinkWrappedRects(sequence<double> rectComponents, double radius);
496 [Conditional=VIDEO] DOMString getCurrentMediaControlsStatusForElement(HTMLMediaElement element);
498 DOMString userVisibleString(DOMURL url);
500 void setShowAllPlugins(boolean showAll);
502 [Conditional=STREAMS_API, CallWith=ScriptState] any cloneArrayBuffer(any buffer, any srcByteOffset, any byteLength);
503 [Conditional=STREAMS_API, CallWith=ScriptState] boolean isReadableStreamDisturbed(any stream);
505 DOMString resourceLoadStatisticsForOrigin(DOMString domain);
506 void setResourceLoadStatisticsEnabled(boolean enable);
507 [EnabledBySetting=StorageAccessAPI] void setUserGrantsStorageAccess(boolean value);
509 [MayThrowException] void setCanShowModalDialogOverride(boolean allow);
511 DOMString composedTreeAsText(Node parent);
513 boolean isProcessingUserGesture();
514 double lastHandledUserGestureTimestamp();
516 GCObservation? observeGC(any observed);
518 void setUserInterfaceLayoutDirection(UserInterfaceLayoutDirection userInterfaceLayoutDirection);
519 void setBaseWritingDirection(BaseWritingDirection direction);
521 boolean userPrefersReducedMotion();
523 void reportBacktrace();
525 [Conditional=POINTER_LOCK] boolean pageHasPendingPointerLock();
526 [Conditional=POINTER_LOCK] boolean pageHasPointerLock();
528 sequence<DOMString> accessKeyModifiers();
530 void setQuickLookPassword(DOMString password);
532 [CallWith=Document] void setAsRunningUserScripts();
534 void disableTileSizeUpdateDelay();
535 void setSpeculativeTilingDelayDisabledForTesting(boolean disabled);
537 [Conditional=WEBGL] void simulateWebGLContextChanged(WebGLRenderingContext context);
538 [Conditional=WEBGL] void failNextGPUStatusCheck(WebGLRenderingContext context);
540 void setPageVisibility(boolean isVisible);
542 [Conditional=WEB_RTC] void setH264HardwareEncoderAllowed(boolean allowed);
543 [Conditional=WEB_RTC] void applyRotationForOutgoingVideoSources(RTCPeerConnection connection);
545 [Conditional=MEDIA_STREAM] void setCameraMediaStreamTrackOrientation(MediaStreamTrack track, short orientation);
546 [Conditional=MEDIA_STREAM] void observeMediaStreamTrack(MediaStreamTrack track);
547 [Conditional=MEDIA_STREAM] Promise<ImageData> grabNextMediaStreamTrackFrame();
548 [Conditional=MEDIA_STREAM] readonly attribute unsigned long trackAudioSampleCount;
549 [Conditional=MEDIA_STREAM] readonly attribute unsigned long trackVideoSampleCount;
550 [Conditional=MEDIA_STREAM, MayThrowException] void setMediaDeviceState(DOMString deviceID, DOMString property, boolean value);
551 [Conditional=MEDIA_STREAM] void delayMediaStreamTrackSamples(MediaStreamTrack track, float delay);
552 [Conditional=MEDIA_STREAM] void setMediaStreamTrackMuted(MediaStreamTrack track, boolean muted);
553 [Conditional=MEDIA_STREAM] void removeMediaStreamTrack(MediaStream stream, MediaStreamTrack track);
554 [Conditional=MEDIA_STREAM] void simulateMediaStreamTrackCaptureSourceFailure(MediaStreamTrack track);
556 Promise<void> clearCacheStorageMemoryRepresentation();
557 Promise<DOMString> cacheStorageEngineRepresentation();
558 void setResponseSizeWithPadding(FetchResponse response, unsigned long long size);
559 unsigned long long responseSizeWithPadding(FetchResponse response);
561 void setConsoleMessageListener(StringCallback callback);
563 DOMString audioSessionCategory();
565 [Conditional=SERVICE_WORKER] Promise<Response> waitForFetchEventToFinish(FetchEvent event);
566 [Conditional=SERVICE_WORKER] Promise<void> waitForExtendableEventToFinish(ExtendableEvent event);
567 [Conditional=SERVICE_WORKER, CallWith=ScriptExecutionContext] FetchEvent createBeingDispatchedFetchEvent();
568 [Conditional=SERVICE_WORKER] ExtendableEvent createTrustedExtendableEvent();
569 [Conditional=SERVICE_WORKER] Promise<boolean> hasServiceWorkerRegistration(DOMString scopeURL);
571 boolean hasServiceWorkerRegisteredForOrigin(DOMString origin);
573 [EnabledAtRuntime=WebAnimations] DOMString timelineDescription(AnimationTimeline timeline);
574 [EnabledAtRuntime=WebAnimations] void pauseTimeline(AnimationTimeline timeline);
575 [EnabledAtRuntime=WebAnimations] void setTimelineCurrentTime(AnimationTimeline timeline, double currentTime);
576 [Conditional=APPLE_PAY] readonly attribute MockPaymentCoordinator mockPaymentCoordinator;