6040a1bbac10e77a0c0667790a09a3f52faf7d45
[WebKit-https.git] / Tools / WebKitTestRunner / InjectedBundle / TestRunner.h
1 /*
2  * Copyright (C) 2010-2017 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23  * THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 #pragma once
27
28 #include "JSWrappable.h"
29 #include "StringFunctions.h"
30 #include <JavaScriptCore/JSRetainPtr.h>
31 #include <WebKit/WKBundleScriptWorld.h>
32 #include <WebKit/WKRetainPtr.h>
33 #include <string>
34 #include <wtf/Ref.h>
35 #include <wtf/text/WTFString.h>
36
37 #if PLATFORM(COCOA)
38 #include <wtf/RetainPtr.h>
39 #include <CoreFoundation/CFRunLoop.h>
40 typedef RetainPtr<CFRunLoopTimerRef> PlatformTimerRef;
41 #elif PLATFORM(GTK) || PLATFORM(WPE)
42 #include <wtf/RunLoop.h>
43 namespace WTR {
44 class TestRunner;
45 typedef RunLoop::Timer<TestRunner> PlatformTimerRef;
46 }
47 #endif
48
49 namespace WTR {
50
51 class TestRunner : public JSWrappable {
52 public:
53     static Ref<TestRunner> create();
54     virtual ~TestRunner();
55
56     // JSWrappable
57     virtual JSClassRef wrapperClass();
58
59     void makeWindowObject(JSContextRef, JSObjectRef windowObject, JSValueRef* exception);
60
61     bool isWebKit2() const { return true; }
62
63     // The basics.
64     WKURLRef testURL() const { return m_testURL.get(); }
65     void setTestURL(WKURLRef url) { m_testURL = url; }
66     void dumpAsText(bool dumpPixels);
67     void waitForPolicyDelegate();
68     void dumpChildFramesAsText() { m_whatToDump = AllFramesText; }
69     void waitUntilDownloadFinished();
70     void waitUntilDone();
71     void notifyDone();
72     double preciseTime();
73     double timeout() { return m_timeout; }
74
75     // Other dumping.
76     void dumpBackForwardList() { m_shouldDumpBackForwardListsForAllWindows = true; }
77     void dumpChildFrameScrollPositions() { m_shouldDumpAllFrameScrollPositions = true; }
78     void dumpEditingCallbacks() { m_dumpEditingCallbacks = true; }
79     void dumpSelectionRect() { m_dumpSelectionRect = true; }
80     void dumpStatusCallbacks() { m_dumpStatusCallbacks = true; }
81     void dumpTitleChanges() { m_dumpTitleChanges = true; }
82     void dumpFullScreenCallbacks() { m_dumpFullScreenCallbacks = true; }
83     void dumpFrameLoadCallbacks() { setShouldDumpFrameLoadCallbacks(true); }
84     void dumpProgressFinishedCallback() { setShouldDumpProgressFinishedCallback(true); }
85     void dumpResourceLoadCallbacks() { m_dumpResourceLoadCallbacks = true; }
86     void dumpResourceResponseMIMETypes() { m_dumpResourceResponseMIMETypes = true; }
87     void dumpWillCacheResponse() { m_dumpWillCacheResponse = true; }
88     void dumpApplicationCacheDelegateCallbacks() { m_dumpApplicationCacheDelegateCallbacks = true; }
89     void dumpDatabaseCallbacks() { m_dumpDatabaseCallbacks = true; }
90     void dumpDOMAsWebArchive() { m_whatToDump = DOMAsWebArchive; }
91     void dumpPolicyDelegateCallbacks() { m_dumpPolicyCallbacks = true; }
92
93     void setShouldDumpFrameLoadCallbacks(bool value) { m_dumpFrameLoadCallbacks = value; }
94     void setShouldDumpProgressFinishedCallback(bool value) { m_dumpProgressFinishedCallback = value; }
95
96     // Special options.
97     void keepWebHistory();
98     void setAcceptsEditing(bool value) { m_shouldAllowEditing = value; }
99     void setCanOpenWindows(bool);
100     void setCloseRemainingWindowsWhenComplete(bool value) { m_shouldCloseExtraWindows = value; }
101     void setXSSAuditorEnabled(bool);
102     void setModernMediaControlsEnabled(bool);
103     void setWebGL2Enabled(bool);
104     void setWebGPUEnabled(bool);
105     void setWritableStreamAPIEnabled(bool);
106     void setReadableByteStreamAPIEnabled(bool);
107
108     void setAllowUniversalAccessFromFileURLs(bool);
109     void setAllowFileAccessFromFileURLs(bool);
110     void setNeedsStorageAccessFromFileURLsQuirk(bool);
111     void setPluginsEnabled(bool);
112     void setJavaScriptCanAccessClipboard(bool);
113     void setPrivateBrowsingEnabled(bool);
114     void setUseDashboardCompatibilityMode(bool);
115     void setPopupBlockingEnabled(bool);
116     void setAuthorAndUserStylesEnabled(bool);
117     void setCustomPolicyDelegate(bool enabled, bool permissive = false);
118     void addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
119     void removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
120     void setUserStyleSheetEnabled(bool);
121     void setUserStyleSheetLocation(JSStringRef);
122     void setSpatialNavigationEnabled(bool);
123     void setTabKeyCyclesThroughElements(bool);
124     void setSerializeHTTPLoads();
125     void dispatchPendingLoadRequests();
126     void setCacheModel(int);
127     void setAsynchronousSpellCheckingEnabled(bool);
128     void setAllowsAnySSLCertificate(bool);
129     void setEncryptedMediaAPIEnabled(bool);
130     void setMediaDevicesEnabled(bool);
131     void setWebRTCLegacyAPIEnabled(bool);
132
133     // Special DOM functions.
134     void clearBackForwardList();
135     void execCommand(JSStringRef name, JSStringRef argument);
136     bool isCommandEnabled(JSStringRef name);
137     unsigned windowCount();
138
139     // Repaint testing.
140     void testRepaint() { m_testRepaint = true; }
141     void repaintSweepHorizontally() { m_testRepaintSweepHorizontally = true; }
142     void display();
143     void displayAndTrackRepaints();
144
145     // UserContent testing.
146     void addUserScript(JSStringRef source, bool runAtStart, bool allFrames);
147     void addUserStyleSheet(JSStringRef source, bool allFrames);
148
149     // Text search testing.
150     bool findString(JSStringRef, JSValueRef optionsArray);
151
152     // Local storage
153     void clearAllDatabases();
154     void setDatabaseQuota(uint64_t);
155     JSRetainPtr<JSStringRef> pathToLocalResource(JSStringRef);
156
157     // Application Cache
158     void clearAllApplicationCaches();
159     void clearApplicationCacheForOrigin(JSStringRef origin);
160     void setAppCacheMaximumSize(uint64_t);
161     long long applicationCacheDiskUsageForOrigin(JSStringRef origin);
162     void disallowIncreaseForApplicationCacheQuota();
163     bool shouldDisallowIncreaseForApplicationCacheQuota() { return m_disallowIncreaseForApplicationCacheQuota; }
164     JSValueRef originsWithApplicationCache();
165
166     void clearDOMCache(JSStringRef origin);
167     void clearDOMCaches();
168     bool hasDOMCache(JSStringRef origin);
169     uint64_t domCacheSize(JSStringRef origin);
170
171     // Failed load condition testing
172     void forceImmediateCompletion();
173
174     // Printing
175     bool isPageBoxVisible(int pageIndex);
176     bool isPrinting() { return m_isPrinting; }
177     void setPrinting() { m_isPrinting = true; }
178
179     // Authentication
180     void setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(bool);
181     void setHandlesAuthenticationChallenges(bool);
182     void setShouldLogCanAuthenticateAgainstProtectionSpace(bool);
183     void setAuthenticationUsername(JSStringRef);
184     void setAuthenticationPassword(JSStringRef);
185
186     void setValueForUser(JSContextRef, JSValueRef element, JSStringRef value);
187
188     // Audio testing.
189     void setAudioResult(JSContextRef, JSValueRef data);
190
191     void setBlockAllPlugins(bool shouldBlock);
192
193     enum WhatToDump { RenderTree, MainFrameText, AllFramesText, Audio, DOMAsWebArchive };
194     WhatToDump whatToDump() const { return m_whatToDump; }
195
196     bool shouldDumpAllFrameScrollPositions() const { return m_shouldDumpAllFrameScrollPositions; }
197     bool shouldDumpBackForwardListsForAllWindows() const { return m_shouldDumpBackForwardListsForAllWindows; }
198     bool shouldDumpEditingCallbacks() const { return m_dumpEditingCallbacks; }
199     bool shouldDumpMainFrameScrollPosition() const { return m_whatToDump == RenderTree; }
200     bool shouldDumpStatusCallbacks() const { return m_dumpStatusCallbacks; }
201     bool shouldDumpTitleChanges() const { return m_dumpTitleChanges; }
202     bool shouldDumpPixels() const { return m_dumpPixels; }
203     bool shouldDumpFullScreenCallbacks() const { return m_dumpFullScreenCallbacks; }
204     bool shouldDumpFrameLoadCallbacks() const { return m_dumpFrameLoadCallbacks; }
205     bool shouldDumpProgressFinishedCallback() const { return m_dumpProgressFinishedCallback; }
206     bool shouldDumpResourceLoadCallbacks() const { return m_dumpResourceLoadCallbacks; }
207     bool shouldDumpResourceResponseMIMETypes() const { return m_dumpResourceResponseMIMETypes; }
208     bool shouldDumpWillCacheResponse() const { return m_dumpWillCacheResponse; }
209     bool shouldDumpApplicationCacheDelegateCallbacks() const { return m_dumpApplicationCacheDelegateCallbacks; }
210     bool shouldDumpDatabaseCallbacks() const { return m_dumpDatabaseCallbacks; }
211     bool shouldDumpSelectionRect() const { return m_dumpSelectionRect; }
212     bool shouldDumpPolicyCallbacks() const { return m_dumpPolicyCallbacks; }
213
214     bool isPolicyDelegateEnabled() const { return m_policyDelegateEnabled; }
215     bool isPolicyDelegatePermissive() const { return m_policyDelegatePermissive; }
216
217     bool waitToDump() const { return m_waitToDump; }
218     void waitToDumpWatchdogTimerFired();
219     void invalidateWaitToDumpWatchdogTimer();
220
221     // Downloads
222     bool shouldFinishAfterDownload() const { return m_shouldFinishAfterDownload; }
223     void setShouldLogDownloadCallbacks(bool);
224
225     bool shouldAllowEditing() const { return m_shouldAllowEditing; }
226
227     bool shouldCloseExtraWindowsAfterRunningTest() const { return m_shouldCloseExtraWindows; }
228
229     void evaluateScriptInIsolatedWorld(JSContextRef, unsigned worldID, JSStringRef script);
230     static unsigned worldIDForWorld(WKBundleScriptWorldRef);
231
232     void showWebInspector();
233     void closeWebInspector();
234     void evaluateInWebInspector(JSStringRef script);
235     JSRetainPtr<JSStringRef> inspectorTestStubURL();
236
237     void setPOSIXLocale(JSStringRef);
238
239     bool willSendRequestReturnsNull() const { return m_willSendRequestReturnsNull; }
240     void setWillSendRequestReturnsNull(bool f) { m_willSendRequestReturnsNull = f; }
241     bool willSendRequestReturnsNullOnRedirect() const { return m_willSendRequestReturnsNullOnRedirect; }
242     void setWillSendRequestReturnsNullOnRedirect(bool f) { m_willSendRequestReturnsNullOnRedirect = f; }
243     void setWillSendRequestAddsHTTPBody(JSStringRef body) { m_willSendRequestHTTPBody = toWTFString(toWK(body)); }
244     String willSendRequestHTTPBody() const { return m_willSendRequestHTTPBody; }
245
246     void setTextDirection(JSStringRef);
247
248     void setShouldStayOnPageAfterHandlingBeforeUnload(bool);
249
250     void setDefersLoading(bool);
251
252     void setStopProvisionalFrameLoads() { m_shouldStopProvisionalFrameLoads = true; }
253     bool shouldStopProvisionalFrameLoads() const { return m_shouldStopProvisionalFrameLoads; }
254     
255     bool globalFlag() const { return m_globalFlag; }
256     void setGlobalFlag(bool value) { m_globalFlag = value; }
257
258     double databaseDefaultQuota() const { return m_databaseDefaultQuota; }
259     void setDatabaseDefaultQuota(double quota) { m_databaseDefaultQuota = quota; }
260
261     double databaseMaxQuota() const { return m_databaseMaxQuota; }
262     void setDatabaseMaxQuota(double quota) { m_databaseMaxQuota = quota; }
263
264     void addChromeInputField(JSValueRef);
265     void removeChromeInputField(JSValueRef);
266     void focusWebView(JSValueRef);
267     void setBackingScaleFactor(double, JSValueRef);
268
269     void setWindowIsKey(bool);
270
271     void setViewSize(double width, double height);
272
273     void callAddChromeInputFieldCallback();
274     void callRemoveChromeInputFieldCallback();
275     void callFocusWebViewCallback();
276     void callSetBackingScaleFactorCallback();
277
278     void overridePreference(JSStringRef preference, JSStringRef value);
279
280     // Cookies testing
281     void setAlwaysAcceptCookies(bool);
282     void setCookieStoragePartitioningEnabled(bool);
283     void setStorageAccessAPIEnabled(bool);
284
285     // Custom full screen behavior.
286     void setHasCustomFullScreenBehavior(bool value) { m_customFullScreenBehavior = value; }
287     bool hasCustomFullScreenBehavior() const { return m_customFullScreenBehavior; }
288
289     // Web notifications.
290     static void grantWebNotificationPermission(JSStringRef origin);
291     static void denyWebNotificationPermission(JSStringRef origin);
292     static void removeAllWebNotificationPermissions();
293     static void simulateWebNotificationClick(JSValueRef notification);
294
295     // Geolocation.
296     void setGeolocationPermission(bool);
297     void setMockGeolocationPosition(double latitude, double longitude, double accuracy, JSValueRef altitude, JSValueRef altitudeAccuracy, JSValueRef heading, JSValueRef speed, JSValueRef floorLevel);
298     void setMockGeolocationPositionUnavailableError(JSStringRef message);
299     bool isGeolocationProviderActive();
300
301     // MediaStream
302     void setUserMediaPermission(bool);
303     void resetUserMediaPermission();
304     void setUserMediaPersistentPermissionForOrigin(bool permission, JSStringRef origin, JSStringRef parentOrigin);
305     unsigned userMediaPermissionRequestCountForOrigin(JSStringRef origin, JSStringRef parentOrigin) const;
306     void resetUserMediaPermissionRequestCountForOrigin(JSStringRef origin, JSStringRef parentOrigin);
307
308     void setPageVisibility(JSStringRef state);
309     void resetPageVisibility();
310
311     bool callShouldCloseOnWebView();
312
313     void setCustomTimeout(int duration) { m_timeout = duration; }
314
315     // Work queue.
316     void queueBackNavigation(unsigned howFarBackward);
317     void queueForwardNavigation(unsigned howFarForward);
318     void queueLoad(JSStringRef url, JSStringRef target, bool shouldOpenExternalURLs);
319     void queueLoadHTMLString(JSStringRef content, JSStringRef baseURL, JSStringRef unreachableURL);
320     void queueReload();
321     void queueLoadingScript(JSStringRef script);
322     void queueNonLoadingScript(JSStringRef script);
323
324     bool secureEventInputIsEnabled() const;
325
326     JSValueRef failNextNewCodeBlock();
327     JSValueRef numberOfDFGCompiles(JSValueRef theFunction);
328     JSValueRef neverInlineFunction(JSValueRef theFunction);
329
330     bool shouldDecideNavigationPolicyAfterDelay() const { return m_shouldDecideNavigationPolicyAfterDelay; }
331     void setShouldDecideNavigationPolicyAfterDelay(bool);
332     void setNavigationGesturesEnabled(bool);
333     void setIgnoresViewportScaleLimits(bool);
334     void setShouldDownloadUndisplayableMIMETypes(bool);
335
336     void runUIScript(JSStringRef script, JSValueRef callback);
337     void runUIScriptCallback(unsigned callbackID, JSStringRef result);
338
339     void installDidBeginSwipeCallback(JSValueRef);
340     void installWillEndSwipeCallback(JSValueRef);
341     void installDidEndSwipeCallback(JSValueRef);
342     void installDidRemoveSwipeSnapshotCallback(JSValueRef);
343     void callDidBeginSwipeCallback();
344     void callWillEndSwipeCallback();
345     void callDidEndSwipeCallback();
346     void callDidRemoveSwipeSnapshotCallback();
347
348     void clearTestRunnerCallbacks();
349
350     void accummulateLogsForChannel(JSStringRef channel);
351
352     unsigned imageCountInGeneralPasteboard() const;
353
354     // Gamepads
355     void connectMockGamepad(unsigned index);
356     void disconnectMockGamepad(unsigned index);
357     void setMockGamepadDetails(unsigned index, JSStringRef gamepadID, unsigned axisCount, unsigned buttonCount);
358     void setMockGamepadAxisValue(unsigned index, unsigned axisIndex, double value);
359     void setMockGamepadButtonValue(unsigned index, unsigned buttonIndex, double value);
360     
361     // Resource Load Statistics
362     void installStatisticsDidModifyDataRecordsCallback(JSValueRef callback);
363     void installStatisticsDidScanDataRecordsCallback(JSValueRef callback);
364     void installStatisticsDidRunTelemetryCallback(JSValueRef callback);
365     void statisticsDidModifyDataRecordsCallback();
366     void statisticsDidScanDataRecordsCallback();
367     void statisticsDidRunTelemetryCallback(unsigned totalPrevalentResources, unsigned totalPrevalentResourcesWithUserInteraction, unsigned top3SubframeUnderTopFrameOrigins);
368     void statisticsNotifyObserver();
369     void statisticsProcessStatisticsAndDataRecords();
370     void statisticsUpdateCookiePartitioning();
371     void statisticsSetShouldPartitionCookiesForHost(JSStringRef hostName, bool value);
372     void statisticsSubmitTelemetry();
373     void setStatisticsLastSeen(JSStringRef hostName, double seconds);
374     void setStatisticsPrevalentResource(JSStringRef hostName, bool value);
375     bool isStatisticsPrevalentResource(JSStringRef hostName);
376     bool isStatisticsRegisteredAsSubFrameUnder(JSStringRef subFrameHost, JSStringRef topFrameHost);
377     bool isStatisticsRegisteredAsRedirectingTo(JSStringRef hostRedirectedFrom, JSStringRef hostRedirectedTo);
378     void setStatisticsHasHadUserInteraction(JSStringRef hostName, bool value);
379     void setStatisticsHasHadNonRecentUserInteraction(JSStringRef hostName);
380     bool isStatisticsHasHadUserInteraction(JSStringRef hostName);
381     void setStatisticsGrandfathered(JSStringRef hostName, bool value);
382     bool isStatisticsGrandfathered(JSStringRef hostName);
383     void setStatisticsSubframeUnderTopFrameOrigin(JSStringRef hostName, JSStringRef topFrameHostName);
384     void setStatisticsSubresourceUnderTopFrameOrigin(JSStringRef hostName, JSStringRef topFrameHostName);
385     void setStatisticsSubresourceUniqueRedirectTo(JSStringRef hostName, JSStringRef hostNameRedirectedTo);
386     void setStatisticsTimeToLiveUserInteraction(double seconds);
387     void setStatisticsTimeToLiveCookiePartitionFree(double seconds);
388     void setStatisticsNotifyPagesWhenDataRecordsWereScanned(bool);
389     void setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval(bool);
390     void setStatisticsNotifyPagesWhenTelemetryWasCaptured(bool value);
391     void setStatisticsMinimumTimeBetweenDataRecordsRemoval(double);
392     void setStatisticsGrandfatheringTime(double seconds);
393     void setStatisticsMaxStatisticsEntries(unsigned);
394     void setStatisticsPruneEntriesDownTo(unsigned);
395     void statisticsClearInMemoryAndPersistentStore();
396     void statisticsClearInMemoryAndPersistentStoreModifiedSinceHours(unsigned hours);
397     void statisticsClearThroughWebsiteDataRemoval(JSValueRef callback);
398     void statisticsCallClearThroughWebsiteDataRemovalCallback();
399     void statisticsResetToConsistentState();
400
401     // Open panel
402     void setOpenPanelFiles(JSValueRef);
403
404     void terminateNetworkProcess();
405     void terminateServiceWorkerProcess();
406
407     void removeAllSessionCredentials(JSValueRef);
408     void callDidRemoveAllSessionCredentialsCallback();
409     
410     void getApplicationManifestThen(JSValueRef);
411     void didGetApplicationManifest();
412
413 private:
414     TestRunner();
415
416     void platformInitialize();
417     void initializeWaitToDumpWatchdogTimerIfNeeded();
418
419     WKRetainPtr<WKURLRef> m_testURL; // Set by InjectedBundlePage once provisional load starts.
420
421     WhatToDump m_whatToDump;
422     bool m_shouldDumpAllFrameScrollPositions;
423     bool m_shouldDumpBackForwardListsForAllWindows;
424
425     bool m_shouldAllowEditing;
426     bool m_shouldCloseExtraWindows;
427
428     bool m_dumpEditingCallbacks;
429     bool m_dumpStatusCallbacks;
430     bool m_dumpTitleChanges;
431     bool m_dumpPixels;
432     bool m_dumpSelectionRect;
433     bool m_dumpFullScreenCallbacks;
434     bool m_dumpFrameLoadCallbacks;
435     bool m_dumpProgressFinishedCallback;
436     bool m_dumpResourceLoadCallbacks;
437     bool m_dumpResourceResponseMIMETypes;
438     bool m_dumpWillCacheResponse;
439     bool m_dumpApplicationCacheDelegateCallbacks;
440     bool m_dumpDatabaseCallbacks;
441     bool m_dumpPolicyCallbacks { false };
442     bool m_disallowIncreaseForApplicationCacheQuota;
443     bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called.
444     bool m_testRepaint;
445     bool m_testRepaintSweepHorizontally;
446     bool m_isPrinting;
447
448     bool m_willSendRequestReturnsNull;
449     bool m_willSendRequestReturnsNullOnRedirect;
450     bool m_shouldStopProvisionalFrameLoads;
451     String m_willSendRequestHTTPBody;
452
453     bool m_policyDelegateEnabled;
454     bool m_policyDelegatePermissive;
455     
456     bool m_globalFlag;
457     bool m_customFullScreenBehavior;
458
459     int m_timeout;
460
461     double m_databaseDefaultQuota;
462     double m_databaseMaxQuota;
463
464     bool m_shouldDecideNavigationPolicyAfterDelay { false };
465     bool m_shouldFinishAfterDownload { false };
466
467     bool m_userStyleSheetEnabled;
468     WKRetainPtr<WKStringRef> m_userStyleSheetLocation;
469
470     WKRetainPtr<WKArrayRef> m_allowedHosts;
471
472     size_t m_userMediaPermissionRequestCount { 0 };
473
474     PlatformTimerRef m_waitToDumpWatchdogTimer;
475 };
476
477 } // namespace WTR