[iOS] Video occasionally mixes with other system audio instead of interrupting
[WebKit-https.git] / Source / WebCore / testing / Internals.idl
1 /*
2  * Copyright (C) 2012 Google Inc. All rights reserved.
3  * Copyright (C) 2013-2017 Apple Inc. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
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.
14  *
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.
25  */
26
27 enum PageOverlayType {
28     "view",
29     "document"
30 };
31
32 // These map to ResourceRequestCachePolicy.
33 enum CachePolicy {
34     "UseProtocolCachePolicy",
35     "ReloadIgnoringCacheData",
36     "ReturnCacheDataElseLoad",
37     "ReturnCacheDataDontLoad"
38 };
39
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"
47 };
48
49 [Conditional=MEDIA_SESSION] enum MediaSessionInterruptingCategory {
50     "content",
51     "transient",
52     "transient-solo"
53 };
54
55 [Conditional=MEDIA_SESSION] enum MediaControlEvent {
56     "play-pause",
57     "next-track",
58     "previous-track"
59 };
60
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"
66 };
67
68 enum UserInterfaceLayoutDirection {
69     "LTR",
70     "RTL"
71 };
72
73 enum BaseWritingDirection {
74     "Natural",
75     "Ltr",
76     "Rtl"
77 };
78
79 enum EventThrottlingBehavior {
80     "responsive",
81     "unresponsive"
82 };
83
84 [
85     ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
86     NoInterfaceObject,
87 ] interface Internals {
88     DOMString address(Node node);
89     boolean nodeNeedsStyleRecalc(Node node);
90     DOMString styleChangeType(Node node);
91     DOMString description(any value);
92
93     // Animated image pausing testing.
94     boolean hasPausedImageAnimations(Element element);
95
96     [MayThrowException] DOMString elementRenderTreeAsText(Element element);
97     boolean isPreloaded(DOMString url);
98     boolean isLoadingFromMemoryCache(DOMString url);
99     DOMString xhrResponseSource(XMLHttpRequest xhr);
100     sequence<DOMString> mediaResponseSources(HTMLMediaElement media);
101     sequence<DOMString> mediaResponseContentRanges(HTMLMediaElement media);
102     boolean isSharingStyleSheetContents(HTMLLinkElement a, HTMLLinkElement b);
103     boolean isStyleSheetLoadingSubresources(HTMLLinkElement link);
104     void clearMemoryCache();
105     void pruneMemoryCacheToSize(long size);
106     void destroyDecodedDataForAllImages();
107     long memoryCacheSize();
108     void setOverrideCachePolicy(CachePolicy policy);
109     void setOverrideResourceLoadPriority(ResourceLoadPriority priority);
110     void setStrictRawResourceValidationPolicyDisabled(boolean disabled);
111
112     void clearPageCache();
113     unsigned long pageCacheSize();
114
115     CSSStyleDeclaration computedStyleIncludingVisitedInfo(Element element);
116
117     Node ensureUserAgentShadowRoot(Element host);
118     Node shadowRoot(Element host);
119
120     // CSS Deferred Parsing Testing.
121     long deferredStyleRulesCount(StyleSheet sheet);
122     long deferredGroupRulesCount(StyleSheet sheet);
123     long deferredKeyframesRulesCount(StyleSheet sheet);
124
125     [MayThrowException] DOMString shadowRootType(Node root);
126     DOMString shadowPseudoId(Element element);
127     void setShadowPseudoId(Element element, DOMString id);
128     Node treeScopeRootNode(Node node);
129     Node parentTreeScope(Node node);
130
131     // Spatial Navigation testing
132     [MayThrowException] unsigned long lastSpatialNavigationCandidateCount();
133
134     // CSS Animation testing.
135     unsigned long numberOfActiveAnimations();
136     [MayThrowException] void suspendAnimations();
137     [MayThrowException] void resumeAnimations();
138     [MayThrowException] boolean animationsAreSuspended();
139     [MayThrowException] boolean pauseAnimationAtTimeOnElement(DOMString animationName, unrestricted double pauseTime, Element element);
140     [MayThrowException] boolean pauseAnimationAtTimeOnPseudoElement(DOMString animationName, unrestricted double pauseTime, Element element, DOMString pseudoId);
141     readonly attribute double animationsInterval;
142
143     // CSS Transition testing.
144     [MayThrowException] boolean pauseTransitionAtTimeOnElement(DOMString propertyName, unrestricted double pauseTime, Element element);
145     [MayThrowException] boolean pauseTransitionAtTimeOnPseudoElement(DOMString property, unrestricted double pauseTime, Element element, DOMString pseudoId);
146
147     DOMString visiblePlaceholder(Element element);
148     void selectColorInColorChooser(HTMLInputElement element, DOMString colorValue);
149     [MayThrowException] sequence<DOMString> formControlStateOfPreviousHistoryItem();
150     [MayThrowException] void setFormControlStateOfPreviousHistoryItem(sequence<DOMString> values);
151
152     [MayThrowException] DOMRect absoluteCaretBounds();
153
154     DOMRect boundingBox(Element element);
155
156     [MayThrowException] DOMRectList inspectorHighlightRects();
157     [MayThrowException] DOMString inspectorHighlightObject();
158
159     [MayThrowException] unsigned long markerCountForNode(Node node, DOMString markerType);
160     [MayThrowException] Range? markerRangeForNode(Node node, DOMString markerType, unsigned long index);
161     [MayThrowException] DOMString markerDescriptionForNode(Node node, DOMString markerType, unsigned long index);
162     [MayThrowException] DOMString dumpMarkerRects(DOMString markerType);
163     void addTextMatchMarker(Range range, boolean isActive);
164     [MayThrowException] void setMarkedTextMatchesAreHighlighted(boolean flag);
165
166     void invalidateFontCache();
167     void setFontSmoothingEnabled(boolean enabled);
168
169     [MayThrowException] void setScrollViewPosition(long x, long y);
170
171     [MayThrowException] DOMRect layoutViewportRect();
172     [MayThrowException] DOMRect visualViewportRect();
173
174     [MayThrowException] void setViewBaseBackgroundColor(DOMString colorValue);
175
176     [MayThrowException] void setPagination(DOMString mode, long gap, optional long pageLength = 0);
177     [MayThrowException] void setPaginationLineGridEnabled(boolean enabled);
178
179     [MayThrowException] DOMString configurationForViewport(unrestricted float devicePixelRatio, long deviceWidth, long deviceHeight, long availableWidth, long availableHeight);
180
181     [MayThrowException] boolean wasLastChangeUserEdit(Element textField);
182     boolean elementShouldAutoComplete(HTMLInputElement inputElement);
183     void setEditingValue(HTMLInputElement inputElement, DOMString value);
184     void setAutofilled(HTMLInputElement inputElement, boolean enabled);
185     void setShowAutoFillButton(HTMLInputElement inputElement, AutoFillButtonType autoFillButtonType);
186
187     [MayThrowException] Range? rangeOfString(DOMString text, Range? referenceRange, sequence<DOMString> findOptions);
188     [MayThrowException] unsigned long countMatchesForText(DOMString text, sequence<DOMString> findOptions, DOMString markMatches);
189     [MayThrowException] unsigned long countFindMatches(DOMString text, sequence<DOMString> findOptions);
190
191     [MayThrowException] DOMString autofillFieldName(Element formControlElement);
192
193     [MayThrowException] void paintControlTints();
194
195     [MayThrowException] void scrollElementToRect(Element element, long x, long y, long w, long h);
196
197     Range? rangeFromLocationAndLength(Element scope, long rangeLocation, long rangeLength);
198     unsigned long locationFromRange(Element scope, Range range);
199     unsigned long lengthFromRange(Element scope, Range range);
200     DOMString rangeAsText(Range range);
201     Range subrange(Range range, long rangeLocation, long rangeLength);
202     [MayThrowException] Range? rangeForDictionaryLookupAtLocation(long x, long y);
203     Range? rangeOfStringNearLocation(Range range, DOMString text, long targetOffset);
204
205     [MayThrowException] void setDelegatesScrolling(boolean enabled);
206
207     [MayThrowException] long lastSpellCheckRequestSequence();
208     [MayThrowException] long lastSpellCheckProcessedSequence();
209
210     sequence<DOMString> userPreferredLanguages();
211     void setUserPreferredLanguages(sequence<DOMString> languages);
212
213     sequence<DOMString> userPreferredAudioCharacteristics();
214     void setUserPreferredAudioCharacteristic(DOMString characteristic);
215
216     [MayThrowException] unsigned long wheelEventHandlerCount();
217     [MayThrowException] unsigned long touchEventHandlerCount();
218
219     [MayThrowException] DOMRectList touchEventRectsForEvent(DOMString eventName);
220     [MayThrowException] DOMRectList passiveTouchEventListenerRects();
221
222     [MayThrowException] NodeList? nodesFromRect(Document document, long x, long y,
223         unsigned long topPadding, unsigned long rightPadding, unsigned long bottomPadding, unsigned long leftPadding,
224         boolean ignoreClipping, boolean allowShadowContent, boolean allowChildFrameContent);
225
226     // Calling parserMetaData() with no arguments gets the metadata for the script of the current scope.
227     DOMString parserMetaData(optional any func);
228
229     void updateEditorUINowIfScheduled();
230
231     boolean hasSpellingMarker(long from, long length);
232     boolean hasGrammarMarker(long from, long length);
233     boolean hasAutocorrectedMarker(long from, long length);
234     void setContinuousSpellCheckingEnabled(boolean enabled);
235     void setAutomaticQuoteSubstitutionEnabled(boolean enabled);
236     void setAutomaticLinkDetectionEnabled(boolean enabled);
237     void setAutomaticDashSubstitutionEnabled(boolean enabled);
238     void setAutomaticTextReplacementEnabled(boolean enabled);
239     void setAutomaticSpellingCorrectionEnabled(boolean enabled);
240
241     void handleAcceptedCandidate(DOMString candidate, unsigned long location, unsigned long length);
242
243     boolean isOverwriteModeEnabled();
244     void toggleOverwriteModeEnabled();
245
246     unsigned long numberOfScrollableAreas();
247
248     [MayThrowException] boolean isPageBoxVisible(long pageNumber);
249
250     unsigned long imageFrameIndex(HTMLImageElement element);
251     void setImageFrameDecodingDuration(HTMLImageElement element, unrestricted float duration);
252     void resetImageAnimation(HTMLImageElement element);
253     boolean isImageAnimating(HTMLImageElement element);
254     void setClearDecoderAfterAsyncFrameRequestForTesting(HTMLImageElement element, boolean value);
255
256     void setGridMaxTracksLimit(unsigned long maxTracksLimit);
257
258     readonly attribute InternalSettings settings;
259     readonly attribute unsigned long workerThreadCount;
260
261     [MayThrowException] readonly attribute boolean areSVGAnimationsPaused;
262     [MayThrowException] double svgAnimationsInterval(SVGSVGElement element);
263
264     // Flags for layerTreeAsText.
265     const unsigned short LAYER_TREE_INCLUDES_VISIBLE_RECTS = 1;
266     const unsigned short LAYER_TREE_INCLUDES_TILE_CACHES = 2;
267     const unsigned short LAYER_TREE_INCLUDES_REPAINT_RECTS = 4;
268     const unsigned short LAYER_TREE_INCLUDES_PAINTING_PHASES = 8;
269     const unsigned short LAYER_TREE_INCLUDES_CONTENT_LAYERS = 16;
270     const unsigned short LAYER_TREE_INCLUDES_ACCELERATES_DRAWING = 32;
271     const unsigned short LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED = 64;
272     [MayThrowException] DOMString layerTreeAsText(Document document, optional unsigned short flags = 0);
273
274     [MayThrowException] unsigned long long layerIDForElement(Element element);
275
276     [MayThrowException] DOMString scrollingStateTreeAsText();
277     [MayThrowException] DOMString mainThreadScrollingReasons(); // FIXME: rename to synchronousScrollingReasons().
278     [MayThrowException] DOMRectList nonFastScrollableRects();
279
280     [MayThrowException] DOMString repaintRectsAsText();
281
282     // These throw if the element does not have a compositing layer.
283     [MayThrowException] void setElementUsesDisplayListDrawing(Element element, boolean usesDisplayListDrawing);
284     [MayThrowException] void setElementTracksDisplayListReplay(Element element, boolean trackReplay);
285
286     // Flags for displayListForElement.
287     const unsigned short DISPLAY_LIST_INCLUDES_PLATFORM_OPERATIONS = 1;
288     // Returns the recorded display list.
289     [MayThrowException] DOMString displayListForElement(Element element, optional unsigned short flags = 0);
290     // Returns the display list that was actually painted.
291     [MayThrowException] DOMString replayDisplayListForElement(Element element, optional unsigned short flags = 0);
292
293     [MayThrowException] void garbageCollectDocumentResources();
294
295     [MayThrowException] void insertAuthorCSS(DOMString css);
296     [MayThrowException] void insertUserCSS(DOMString css);
297
298     readonly attribute boolean isUnderMemoryPressure;
299     void beginSimulatedMemoryPressure();
300     void endSimulatedMemoryPressure();
301
302 #if defined(ENABLE_PROXIMITY_EVENTS) && ENABLE_PROXIMITY_EVENTS
303     [MayThrowException] void setDeviceProximity(DOMString eventType, unrestricted double value, unrestricted double min, unrestricted double max);
304 #endif
305
306     unsigned long numberOfLiveNodes();
307     unsigned long numberOfLiveDocuments();
308     DOMWindow? openDummyInspectorFrontend(DOMString url);
309     void closeDummyInspectorFrontend();
310     [MayThrowException] void setInspectorIsUnderTest(boolean isUnderTest);
311
312     DOMString counterValue(Element element);
313     long pageNumber(Element element, optional unrestricted float pageWidth = 800, optional unrestricted float pageHeight = 600);
314     sequence<DOMString> shortcutIconURLs();
315     long numberOfPages(optional unrestricted double pageWidthInPixels = 800, optional unrestricted double pageHeightInPixels = 600);
316     [MayThrowException] DOMString pageProperty(DOMString propertyName, long pageNumber);
317     [MayThrowException] DOMString pageSizeAndMarginsInPixels(long pageIndex, long width, long height, long marginTop, long marginRight, long marginBottom, long marginLeft);
318
319     [MayThrowException] void setPageScaleFactor(unrestricted float scaleFactor, long x, long y);
320     [MayThrowException] float pageScaleFactor();
321
322     [MayThrowException] void setPageZoomFactor(unrestricted float zoomFactor);
323     [MayThrowException] void setTextZoomFactor(unrestricted float zoomFactor);
324
325     [MayThrowException] void setUseFixedLayout(boolean useFixedLayout);
326     [MayThrowException] void setFixedLayoutSize(long width, long height);
327     void setPrinting(long width, long height);
328
329     [MayThrowException] void setViewExposedRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
330
331     void setHeaderHeight(unrestricted float height);
332     void setFooterHeight(unrestricted float height);
333
334     void setTopContentInset(unrestricted float contentInset);
335
336 #if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API
337     void webkitWillEnterFullScreenForElement(Element element);
338     void webkitDidEnterFullScreenForElement(Element element);
339     void webkitWillExitFullScreenForElement(Element element);
340     void webkitDidExitFullScreenForElement(Element element);
341 #endif
342
343     void setApplicationCacheOriginQuota(unsigned long long quota);
344
345     void registerURLSchemeAsBypassingContentSecurityPolicy(DOMString scheme);
346     void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(DOMString scheme);
347
348     void registerDefaultPortForProtocol(unsigned short port, DOMString scheme);
349
350     MallocStatistics mallocStatistics();
351     TypeConversions typeConversions();
352     MemoryInfo memoryInfo();
353
354     sequence<DOMString> getReferencedFilePaths();
355
356     // These functions both reset the tracked repaint rects. They are intended to be used in the following order:
357     //  startTrackingRepaints, repaintRectsAsText, stopTrackingRepaints.
358     [MayThrowException] void startTrackingRepaints();
359     [MayThrowException] void stopTrackingRepaints();
360
361     [MayThrowException] void startTrackingLayerFlushes();
362     [MayThrowException] unsigned long layerFlushCount();
363
364     // Query if a timer is currently throttled, to debug timer throttling.
365     [MayThrowException] boolean isTimerThrottled(long timerHandle);
366
367     boolean isRequestAnimationFrameThrottled();
368     boolean areTimersThrottled();
369
370     [MayThrowException] void setLowPowerModeEnabled(boolean enabled);
371     readonly attribute double requestAnimationFrameInterval;
372
373     // Override the behavior of WebPage::eventThrottlingDelay(), which only affects iOS.
374     attribute EventThrottlingBehavior? eventThrottlingBehaviorOverride;
375
376     [MayThrowException] void startTrackingStyleRecalcs();
377     [MayThrowException] unsigned long styleRecalcCount();
378     readonly attribute unsigned long lastStyleUpdateSize;
379
380     [MayThrowException] void startTrackingCompositingUpdates();
381     [MayThrowException] unsigned long compositingUpdateCount();
382
383     // |node| should be Document, HTMLIFrameElement, or unspecified.
384     // If |node| is an HTMLIFrameElement, it assumes node.contentDocument is
385     // specified without security checks. Unspecified or null means this document.
386     [MayThrowException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(optional Node? node = null);
387
388     readonly attribute unsigned long layoutCount;
389
390     // Returns a string with information about the mouse cursor used at the specified client location.
391     [MayThrowException] DOMString getCurrentCursorInfo();
392
393     DOMString markerTextForListItem(Element element);
394
395     DOMString toolTipFromElement(Element element);
396
397     SerializedScriptValue deserializeBuffer(ArrayBuffer buffer);
398     ArrayBuffer serializeObject(SerializedScriptValue object);
399
400     boolean isFromCurrentWorld(any obj);
401
402     void setUsesOverlayScrollbars(boolean enabled);
403     void setUsesMockScrollAnimator(boolean enabled);
404
405     void forceReload(boolean endToEnd);
406     void reloadExpiredOnly();
407
408     void enableAutoSizeMode(boolean enabled, long minimumWidth, long minimumHeight, long maximumWidth, long maximumHeight);
409
410     [Conditional=VIDEO] void simulateAudioInterruption(HTMLMediaElement element);
411     [Conditional=VIDEO, MayThrowException] boolean mediaElementHasCharacteristic(HTMLMediaElement element, DOMString characteristic);
412
413     [Conditional=LEGACY_ENCRYPTED_MEDIA] void initializeMockCDM();
414     [Conditional=ENCRYPTED_MEDIA] MockCDMFactory registerMockCDM();
415
416     [Conditional=SPEECH_SYNTHESIS] void enableMockSpeechSynthesizer();
417
418     DOMString getImageSourceURL(Element element);
419
420     [Conditional=VIDEO_TRACK, MayThrowException] DOMString captionsStyleSheetOverride();
421     [Conditional=VIDEO_TRACK, MayThrowException] void setCaptionsStyleSheetOverride(DOMString override);
422     [Conditional=VIDEO_TRACK, MayThrowException] void setPrimaryAudioTrackLanguageOverride(DOMString language);
423     [Conditional=VIDEO_TRACK, MayThrowException] void setCaptionDisplayMode(DOMString mode);
424
425     [Conditional=VIDEO] TimeRanges createTimeRanges(Float32Array startTimes, Float32Array
426      endTimes);
427     [Conditional=VIDEO] unrestricted double closestTimeToTimeRanges(unrestricted double time, TimeRanges ranges);
428
429     boolean isSelectPopupVisible(HTMLSelectElement element);
430
431     [MayThrowException] boolean isPluginUnavailabilityIndicatorObscured(Element element);
432     boolean isPluginSnapshotted(Element element);
433
434     [MayThrowException] DOMRect selectionBounds();
435
436     [Conditional=MEDIA_SOURCE] void initializeMockMediaSource();
437     [Conditional=MEDIA_SOURCE] sequence<DOMString> bufferedSamplesForTrackID(SourceBuffer buffer, DOMString trackID);
438     [Conditional=MEDIA_SOURCE] sequence<DOMString> enqueuedSamplesForTrackID(SourceBuffer buffer, DOMString trackID);
439     [Conditional=MEDIA_SOURCE] void setShouldGenerateTimestamps(SourceBuffer buffer, boolean flag);
440
441     [Conditional=VIDEO, MayThrowException] void beginMediaSessionInterruption(DOMString interruptionType);
442     [Conditional=VIDEO] void endMediaSessionInterruption(DOMString flags);
443     [Conditional=MEDIA_SESSION] void sendMediaSessionStartOfInterruptionNotification(MediaSessionInterruptingCategory category);
444     [Conditional=MEDIA_SESSION] void sendMediaSessionEndOfInterruptionNotification(MediaSessionInterruptingCategory category);
445     [Conditional=MEDIA_SESSION] DOMString mediaSessionCurrentState(MediaSession session);
446     [Conditional=MEDIA_SESSION] double mediaElementPlayerVolume(HTMLMediaElement element);
447     [Conditional=MEDIA_SESSION] void sendMediaControlEvent(MediaControlEvent event);
448     [Conditional=VIDEO] void applicationDidEnterForeground();
449     [Conditional=VIDEO] void applicationWillEnterBackground();
450     [Conditional=VIDEO, MayThrowException] void setMediaSessionRestrictions(DOMString mediaType, DOMString restrictions);
451     [Conditional=VIDEO, MayThrowException] DOMString mediaSessionRestrictions(DOMString mediaType);
452     [Conditional=VIDEO] void setMediaElementRestrictions(HTMLMediaElement element, DOMString restrictions);
453     [Conditional=WEB_AUDIO] void setAudioContextRestrictions(AudioContext context, DOMString restrictions);
454     [Conditional=VIDEO, MayThrowException] void postRemoteControlCommand(DOMString command, optional unrestricted float argument = 0);
455     [Conditional=WIRELESS_PLAYBACK_TARGET] void setMockMediaPlaybackTargetPickerEnabled(boolean enabled);
456     [Conditional=WIRELESS_PLAYBACK_TARGET, MayThrowException] void setMockMediaPlaybackTargetPickerState(DOMString deviceName, DOMString deviceState);
457     [Conditional=MEDIA_STREAM] void setMockMediaCaptureDevicesEnabled(boolean enabled);
458
459     [Conditional=WEB_RTC] void emulateRTCPeerConnectionPlatformEvent(RTCPeerConnection connection, DOMString action);
460     [Conditional=WEB_RTC] void useMockRTCPeerConnectionFactory(DOMString testCase);
461     [Conditional=WEB_RTC] void setICECandidateFiltering(boolean enabled);
462     [Conditional=WEB_RTC] void setEnumeratingAllNetworkInterfacesEnabled(boolean enabled);
463     [Conditional=WEB_RTC] void stopPeerConnection(RTCPeerConnection connection);
464
465     [Conditional=VIDEO] void simulateSystemSleep();
466     [Conditional=VIDEO] void simulateSystemWake();
467     [Conditional=VIDEO] boolean elementIsBlockingDisplaySleep(HTMLMediaElement element);
468
469     [MayThrowException] MockPageOverlay installMockPageOverlay(PageOverlayType type);
470     [MayThrowException] DOMString pageOverlayLayerTreeAsText(optional unsigned short flags = 0);
471
472     void setPageMuted(DOMString mutedState);
473     DOMString pageMediaState();
474
475     void setPageDefersLoading(boolean defersLoading);
476
477     File? createFile(DOMString url);
478     void queueMicroTask(long testNumber);
479     boolean testPreloaderSettingViewport();
480
481     [Conditional=CONTENT_FILTERING] readonly attribute MockContentFilterSettings mockContentFilterSettings;
482
483 #if defined(ENABLE_CSS_SCROLL_SNAP) && ENABLE_CSS_SCROLL_SNAP
484     [MayThrowException] DOMString scrollSnapOffsets(Element element);
485     void setPlatformMomentumScrollingPredictionEnabled(boolean enabled);
486 #endif
487
488     [MayThrowException] DOMString pathStringWithShrinkWrappedRects(sequence<double> rectComponents, double radius);
489
490     [Conditional=VIDEO] DOMString getCurrentMediaControlsStatusForElement(HTMLMediaElement element);
491
492     DOMString userVisibleString(DOMURL url);
493
494     void setShowAllPlugins(boolean showAll);
495
496     [Conditional=STREAMS_API, CallWith=ScriptState] any cloneArrayBuffer(any buffer, any srcByteOffset, any byteLength);
497     [Conditional=STREAMS_API, CallWith=ScriptState] boolean isReadableStreamDisturbed(any stream);
498
499     DOMString resourceLoadStatisticsForOrigin(DOMString domain);
500     void setResourceLoadStatisticsEnabled(boolean enable);
501
502     [MayThrowException] void setCanShowModalDialogOverride(boolean allow);
503
504     DOMString composedTreeAsText(Node parent);
505
506     boolean isProcessingUserGesture();
507     double lastHandledUserGestureTimestamp();
508
509     GCObservation? observeGC(any observed);
510
511     void setUserInterfaceLayoutDirection(UserInterfaceLayoutDirection userInterfaceLayoutDirection);
512     void setBaseWritingDirection(BaseWritingDirection direction);
513
514     boolean userPrefersReducedMotion();
515     
516     void reportBacktrace();
517
518     [Conditional=POINTER_LOCK] boolean pageHasPendingPointerLock();
519     [Conditional=POINTER_LOCK] boolean pageHasPointerLock();
520
521     sequence<DOMString> accessKeyModifiers();
522
523 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
524     void setQuickLookPassword(DOMString password);
525 #endif
526
527     [CallWith=Document] void setAsRunningUserScripts();
528
529     void disableTileSizeUpdateDelay();
530     void setSpeculativeTilingDelayDisabledForTesting(boolean disabled);
531
532     [Conditional=WEBGL] void simulateWebGLContextChanged(WebGLRenderingContext context);
533     [Conditional=WEBGL] void failNextGPUStatusCheck(WebGLRenderingContext context);
534
535     void setPageVisibility(boolean isVisible);
536
537     [Conditional=WEB_RTC] void applyRotationForOutgoingVideoSources(RTCPeerConnection connection);
538
539     [Conditional=MEDIA_STREAM] void setCameraMediaStreamTrackOrientation(MediaStreamTrack track, short orientation);
540     [Conditional=MEDIA_STREAM] void observeMediaStreamTrack(MediaStreamTrack track);
541     [Conditional=MEDIA_STREAM] Promise<ImageData> grabNextMediaStreamTrackFrame();
542     [Conditional=MEDIA_STREAM] readonly attribute unsigned long trackAudioSampleCount;
543     [Conditional=MEDIA_STREAM] readonly attribute unsigned long trackVideoSampleCount;
544     [Conditional=MEDIA_STREAM, MayThrowException] void setMediaDeviceState(DOMString deviceID, DOMString property, boolean value);
545     [Conditional=MEDIA_STREAM] void delayMediaStreamTrackSamples(MediaStreamTrack track, float delay);
546     [Conditional=MEDIA_STREAM] void setMediaStreamTrackMuted(MediaStreamTrack track, boolean muted);
547     [Conditional=MEDIA_STREAM] void removeMediaStreamTrack(MediaStream stream, MediaStreamTrack track);
548
549     DOMString audioSessionCategory();
550 };