Resource Load Statistics: Classify resources as prevalent based on redirects to other...
[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
284     // Custom full screen behavior.
285     void setHasCustomFullScreenBehavior(bool value) { m_customFullScreenBehavior = value; }
286     bool hasCustomFullScreenBehavior() const { return m_customFullScreenBehavior; }
287
288     // Web notifications.
289     static void grantWebNotificationPermission(JSStringRef origin);
290     static void denyWebNotificationPermission(JSStringRef origin);
291     static void removeAllWebNotificationPermissions();
292     static void simulateWebNotificationClick(JSValueRef notification);
293
294     // Geolocation.
295     void setGeolocationPermission(bool);
296     void setMockGeolocationPosition(double latitude, double longitude, double accuracy, JSValueRef altitude, JSValueRef altitudeAccuracy, JSValueRef heading, JSValueRef speed, JSValueRef floorLevel);
297     void setMockGeolocationPositionUnavailableError(JSStringRef message);
298     bool isGeolocationProviderActive();
299
300     // MediaStream
301     void setUserMediaPermission(bool);
302     void resetUserMediaPermission();
303     void setUserMediaPersistentPermissionForOrigin(bool permission, JSStringRef origin, JSStringRef parentOrigin);
304     unsigned userMediaPermissionRequestCountForOrigin(JSStringRef origin, JSStringRef parentOrigin) const;
305     void resetUserMediaPermissionRequestCountForOrigin(JSStringRef origin, JSStringRef parentOrigin);
306
307     void setPageVisibility(JSStringRef state);
308     void resetPageVisibility();
309
310     bool callShouldCloseOnWebView();
311
312     void setCustomTimeout(int duration) { m_timeout = duration; }
313
314     // Work queue.
315     void queueBackNavigation(unsigned howFarBackward);
316     void queueForwardNavigation(unsigned howFarForward);
317     void queueLoad(JSStringRef url, JSStringRef target, bool shouldOpenExternalURLs);
318     void queueLoadHTMLString(JSStringRef content, JSStringRef baseURL, JSStringRef unreachableURL);
319     void queueReload();
320     void queueLoadingScript(JSStringRef script);
321     void queueNonLoadingScript(JSStringRef script);
322
323     bool secureEventInputIsEnabled() const;
324
325     JSValueRef failNextNewCodeBlock();
326     JSValueRef numberOfDFGCompiles(JSValueRef theFunction);
327     JSValueRef neverInlineFunction(JSValueRef theFunction);
328
329     bool shouldDecideNavigationPolicyAfterDelay() const { return m_shouldDecideNavigationPolicyAfterDelay; }
330     void setShouldDecideNavigationPolicyAfterDelay(bool);
331     void setNavigationGesturesEnabled(bool);
332     void setIgnoresViewportScaleLimits(bool);
333     void setShouldDownloadUndisplayableMIMETypes(bool);
334
335     void runUIScript(JSStringRef script, JSValueRef callback);
336     void runUIScriptCallback(unsigned callbackID, JSStringRef result);
337
338     void installDidBeginSwipeCallback(JSValueRef);
339     void installWillEndSwipeCallback(JSValueRef);
340     void installDidEndSwipeCallback(JSValueRef);
341     void installDidRemoveSwipeSnapshotCallback(JSValueRef);
342     void callDidBeginSwipeCallback();
343     void callWillEndSwipeCallback();
344     void callDidEndSwipeCallback();
345     void callDidRemoveSwipeSnapshotCallback();
346
347     void clearTestRunnerCallbacks();
348
349     void accummulateLogsForChannel(JSStringRef channel);
350
351     unsigned imageCountInGeneralPasteboard() const;
352
353     // Gamepads
354     void connectMockGamepad(unsigned index);
355     void disconnectMockGamepad(unsigned index);
356     void setMockGamepadDetails(unsigned index, JSStringRef gamepadID, unsigned axisCount, unsigned buttonCount);
357     void setMockGamepadAxisValue(unsigned index, unsigned axisIndex, double value);
358     void setMockGamepadButtonValue(unsigned index, unsigned buttonIndex, double value);
359     
360     // Resource Load Statistics
361     void installStatisticsDidModifyDataRecordsCallback(JSValueRef callback);
362     void installStatisticsDidScanDataRecordsCallback(JSValueRef callback);
363     void installStatisticsDidRunTelemetryCallback(JSValueRef callback);
364     void statisticsDidModifyDataRecordsCallback();
365     void statisticsDidScanDataRecordsCallback();
366     void statisticsDidRunTelemetryCallback(unsigned totalPrevalentResources, unsigned totalPrevalentResourcesWithUserInteraction, unsigned top3SubframeUnderTopFrameOrigins);
367     void statisticsNotifyObserver();
368     void statisticsProcessStatisticsAndDataRecords();
369     void statisticsUpdateCookiePartitioning(JSValueRef callback);
370     void statisticsSetShouldPartitionCookiesForHost(JSStringRef hostName, bool value, JSValueRef callback);
371     void statisticsCallDidSetPartitionOrBlockCookiesForHostCallback();
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 setStatisticsSubresourceUniqueRedirectFrom(JSStringRef hostName, JSStringRef hostNameRedirectedFrom);
387     void setStatisticsTopFrameUniqueRedirectTo(JSStringRef hostName, JSStringRef hostNameRedirectedTo);
388     void setStatisticsTopFrameUniqueRedirectFrom(JSStringRef hostName, JSStringRef hostNameRedirectedFrom);
389     void setStatisticsTimeToLiveUserInteraction(double seconds);
390     void setStatisticsTimeToLiveCookiePartitionFree(double seconds);
391     void setStatisticsNotifyPagesWhenDataRecordsWereScanned(bool);
392     void setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval(bool);
393     void setStatisticsNotifyPagesWhenTelemetryWasCaptured(bool value);
394     void setStatisticsMinimumTimeBetweenDataRecordsRemoval(double);
395     void setStatisticsGrandfatheringTime(double seconds);
396     void setStatisticsMaxStatisticsEntries(unsigned);
397     void setStatisticsPruneEntriesDownTo(unsigned);
398     void statisticsClearInMemoryAndPersistentStore(JSValueRef callback);
399     void statisticsClearInMemoryAndPersistentStoreModifiedSinceHours(unsigned hours, JSValueRef callback);
400     void statisticsClearThroughWebsiteDataRemoval(JSValueRef callback);
401     void statisticsCallClearThroughWebsiteDataRemovalCallback();
402     void statisticsResetToConsistentState();
403
404     // Storage Access API
405     void setStorageAccessAPIEnabled(bool);
406     void getAllStorageAccessEntries(JSValueRef callback);
407     void callDidReceiveAllStorageAccessEntriesCallback(Vector<String>& domains);
408
409     // Open panel
410     void setOpenPanelFiles(JSValueRef);
411
412     void terminateNetworkProcess();
413     void terminateServiceWorkerProcess();
414
415     void removeAllSessionCredentials(JSValueRef);
416     void callDidRemoveAllSessionCredentialsCallback();
417     
418     void getApplicationManifestThen(JSValueRef);
419     void didGetApplicationManifest();
420
421     void installFakeHelvetica(JSStringRef configuration);
422
423 private:
424     TestRunner();
425
426     void platformInitialize();
427     void initializeWaitToDumpWatchdogTimerIfNeeded();
428
429     WKRetainPtr<WKURLRef> m_testURL; // Set by InjectedBundlePage once provisional load starts.
430
431     WhatToDump m_whatToDump;
432     bool m_shouldDumpAllFrameScrollPositions;
433     bool m_shouldDumpBackForwardListsForAllWindows;
434
435     bool m_shouldAllowEditing;
436     bool m_shouldCloseExtraWindows;
437
438     bool m_dumpEditingCallbacks;
439     bool m_dumpStatusCallbacks;
440     bool m_dumpTitleChanges;
441     bool m_dumpPixels;
442     bool m_dumpSelectionRect;
443     bool m_dumpFullScreenCallbacks;
444     bool m_dumpFrameLoadCallbacks;
445     bool m_dumpProgressFinishedCallback;
446     bool m_dumpResourceLoadCallbacks;
447     bool m_dumpResourceResponseMIMETypes;
448     bool m_dumpWillCacheResponse;
449     bool m_dumpApplicationCacheDelegateCallbacks;
450     bool m_dumpDatabaseCallbacks;
451     bool m_dumpPolicyCallbacks { false };
452     bool m_disallowIncreaseForApplicationCacheQuota;
453     bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called.
454     bool m_testRepaint;
455     bool m_testRepaintSweepHorizontally;
456     bool m_isPrinting;
457
458     bool m_willSendRequestReturnsNull;
459     bool m_willSendRequestReturnsNullOnRedirect;
460     bool m_shouldStopProvisionalFrameLoads;
461     String m_willSendRequestHTTPBody;
462
463     bool m_policyDelegateEnabled;
464     bool m_policyDelegatePermissive;
465     
466     bool m_globalFlag;
467     bool m_customFullScreenBehavior;
468
469     int m_timeout;
470
471     double m_databaseDefaultQuota;
472     double m_databaseMaxQuota;
473
474     bool m_shouldDecideNavigationPolicyAfterDelay { false };
475     bool m_shouldFinishAfterDownload { false };
476
477     bool m_userStyleSheetEnabled;
478     WKRetainPtr<WKStringRef> m_userStyleSheetLocation;
479
480     WKRetainPtr<WKArrayRef> m_allowedHosts;
481
482     size_t m_userMediaPermissionRequestCount { 0 };
483
484     PlatformTimerRef m_waitToDumpWatchdogTimer;
485 };
486
487 } // namespace WTR