TestRunner.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  1. /*
  2. * Copyright (C) 2007, 2008, 2009, 2012 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. *
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
  14. * its contributors may be used to endorse or promote products derived
  15. * from this software without specific prior written permission.
  16. *
  17. * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
  18. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  19. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  20. * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
  21. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  22. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  23. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  24. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  25. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  26. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. */
  28. #ifndef TestRunner_h
  29. #define TestRunner_h
  30. #include <JavaScriptCore/JSObjectRef.h>
  31. #include <JavaScriptCore/JSRetainPtr.h>
  32. #include <map>
  33. #include <set>
  34. #include <string>
  35. #include <vector>
  36. #include <wtf/PassRefPtr.h>
  37. #include <wtf/RefCounted.h>
  38. class TestRunner : public RefCounted<TestRunner> {
  39. public:
  40. static PassRefPtr<TestRunner> create(const std::string& testPathOrURL, const std::string& expectedPixelHash);
  41. static const unsigned viewWidth;
  42. static const unsigned viewHeight;
  43. static const unsigned w3cSVGViewWidth;
  44. static const unsigned w3cSVGViewHeight;
  45. ~TestRunner();
  46. void makeWindowObject(JSContextRef, JSObjectRef windowObject, JSValueRef* exception);
  47. void addDisallowedURL(JSStringRef url);
  48. void addURLToRedirect(std::string origin, std::string destination);
  49. const std::string& redirectionDestinationForURL(std::string);
  50. void clearAllApplicationCaches();
  51. void clearAllDatabases();
  52. void clearApplicationCacheForOrigin(JSStringRef name);
  53. void clearBackForwardList();
  54. void clearPersistentUserStyleSheet();
  55. bool callShouldCloseOnWebView();
  56. JSStringRef copyDecodedHostName(JSStringRef name);
  57. JSStringRef copyEncodedHostName(JSStringRef name);
  58. void dispatchPendingLoadRequests();
  59. void display();
  60. void displayInvalidatedRegion();
  61. void execCommand(JSStringRef name, JSStringRef value);
  62. bool findString(JSContextRef, JSStringRef, JSObjectRef optionsArray);
  63. void goBack();
  64. JSValueRef originsWithApplicationCache(JSContextRef);
  65. long long applicationCacheDiskUsageForOrigin(JSStringRef name);
  66. bool isCommandEnabled(JSStringRef name);
  67. void keepWebHistory();
  68. void notifyDone();
  69. int numberOfPendingGeolocationPermissionRequests();
  70. void overridePreference(JSStringRef key, JSStringRef value);
  71. JSStringRef pathToLocalResource(JSContextRef, JSStringRef url);
  72. void queueBackNavigation(int howFarBackward);
  73. void queueForwardNavigation(int howFarForward);
  74. void queueLoad(JSStringRef url, JSStringRef target);
  75. void queueLoadHTMLString(JSStringRef content, JSStringRef baseURL);
  76. void queueLoadAlternateHTMLString(JSStringRef content, JSStringRef baseURL, JSStringRef unreachableURL);
  77. void queueLoadingScript(JSStringRef script);
  78. void queueNonLoadingScript(JSStringRef script);
  79. void queueReload();
  80. void removeAllVisitedLinks();
  81. void setAcceptsEditing(bool);
  82. void setAllowUniversalAccessFromFileURLs(bool);
  83. void setAllowFileAccessFromFileURLs(bool);
  84. void setAppCacheMaximumSize(unsigned long long quota);
  85. void setApplicationCacheOriginQuota(unsigned long long);
  86. void setAuthorAndUserStylesEnabled(bool);
  87. void setCacheModel(int);
  88. void setCustomPolicyDelegate(bool setDelegate, bool permissive);
  89. void setDatabaseQuota(unsigned long long quota);
  90. void setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme);
  91. void setDefersLoading(bool);
  92. void setIconDatabaseEnabled(bool);
  93. void setJavaScriptCanAccessClipboard(bool flag);
  94. void setAutomaticLinkDetectionEnabled(bool flag);
  95. void setMainFrameIsFirstResponder(bool flag);
  96. void setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma);
  97. void setMockGeolocationPosition(double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed);
  98. void setMockGeolocationPositionUnavailableError(JSStringRef message);
  99. void addMockSpeechInputResult(JSStringRef result, double confidence, JSStringRef language);
  100. void setMockSpeechInputDumpRect(bool flag);
  101. void setPersistentUserStyleSheetLocation(JSStringRef path);
  102. void setPluginsEnabled(bool);
  103. void setPopupBlockingEnabled(bool);
  104. void setPrivateBrowsingEnabled(bool);
  105. void setTabKeyCyclesThroughElements(bool);
  106. void setUseDashboardCompatibilityMode(bool flag);
  107. void setUserStyleSheetEnabled(bool flag);
  108. void setUserStyleSheetLocation(JSStringRef path);
  109. void setValueForUser(JSContextRef, JSValueRef nodeObject, JSStringRef value);
  110. void setViewModeMediaFeature(JSStringRef);
  111. void setXSSAuditorEnabled(bool flag);
  112. void setSpatialNavigationEnabled(bool);
  113. void setScrollbarPolicy(JSStringRef orientation, JSStringRef policy);
  114. void startSpeechInput(JSContextRef inputElement);
  115. void setPageVisibility(const char*);
  116. void resetPageVisibility();
  117. void waitForPolicyDelegate();
  118. size_t webHistoryItemCount();
  119. int windowCount();
  120. #if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WIN) || PLATFORM(EFL)
  121. JSRetainPtr<JSStringRef> platformName() const;
  122. #endif
  123. // Legacy here refers to the old TestRunner API for handling web notifications, not the legacy web notification API.
  124. void ignoreLegacyWebNotificationPermissionRequests();
  125. // Legacy here refers to the old TestRunner API for handling web notifications, not the legacy web notification API.
  126. void simulateLegacyWebNotificationClick(JSStringRef title);
  127. void grantWebNotificationPermission(JSStringRef origin);
  128. void denyWebNotificationPermission(JSStringRef origin);
  129. void removeAllWebNotificationPermissions();
  130. void simulateWebNotificationClick(JSValueRef notification);
  131. bool dumpAsAudio() const { return m_dumpAsAudio; }
  132. void setDumpAsAudio(bool dumpAsAudio) { m_dumpAsAudio = dumpAsAudio; }
  133. bool dumpAsPDF() const { return m_dumpAsPDF; }
  134. void setDumpAsPDF(bool dumpAsPDF) { m_dumpAsPDF = dumpAsPDF; }
  135. bool dumpAsText() const { return m_dumpAsText; }
  136. void setDumpAsText(bool dumpAsText) { m_dumpAsText = dumpAsText; }
  137. bool generatePixelResults() const { return m_generatePixelResults; }
  138. void setGeneratePixelResults(bool generatePixelResults) { m_generatePixelResults = generatePixelResults; }
  139. bool disallowIncreaseForApplicationCacheQuota() const { return m_disallowIncreaseForApplicationCacheQuota; }
  140. void setDisallowIncreaseForApplicationCacheQuota(bool disallowIncrease) { m_disallowIncreaseForApplicationCacheQuota = disallowIncrease; }
  141. bool dumpApplicationCacheDelegateCallbacks() const { return m_dumpApplicationCacheDelegateCallbacks; }
  142. void setDumpApplicationCacheDelegateCallbacks(bool dumpCallbacks) { m_dumpApplicationCacheDelegateCallbacks = dumpCallbacks; }
  143. bool dumpBackForwardList() const { return m_dumpBackForwardList; }
  144. void setDumpBackForwardList(bool dumpBackForwardList) { m_dumpBackForwardList = dumpBackForwardList; }
  145. bool dumpChildFrameScrollPositions() const { return m_dumpChildFrameScrollPositions; }
  146. void setDumpChildFrameScrollPositions(bool dumpChildFrameScrollPositions) { m_dumpChildFrameScrollPositions = dumpChildFrameScrollPositions; }
  147. bool dumpChildFramesAsText() const { return m_dumpChildFramesAsText; }
  148. void setDumpChildFramesAsText(bool dumpChildFramesAsText) { m_dumpChildFramesAsText = dumpChildFramesAsText; }
  149. bool dumpDatabaseCallbacks() const { return m_dumpDatabaseCallbacks; }
  150. void setDumpDatabaseCallbacks(bool dumpDatabaseCallbacks) { m_dumpDatabaseCallbacks = dumpDatabaseCallbacks; }
  151. bool dumpDOMAsWebArchive() const { return m_dumpDOMAsWebArchive; }
  152. void setDumpDOMAsWebArchive(bool dumpDOMAsWebArchive) { m_dumpDOMAsWebArchive = dumpDOMAsWebArchive; }
  153. bool dumpEditingCallbacks() const { return m_dumpEditingCallbacks; }
  154. void setDumpEditingCallbacks(bool dumpEditingCallbacks) { m_dumpEditingCallbacks = dumpEditingCallbacks; }
  155. bool dumpFrameLoadCallbacks() const { return m_dumpFrameLoadCallbacks; }
  156. void setDumpFrameLoadCallbacks(bool dumpFrameLoadCallbacks) { m_dumpFrameLoadCallbacks = dumpFrameLoadCallbacks; }
  157. bool dumpProgressFinishedCallback() const { return m_dumpProgressFinishedCallback; }
  158. void setDumpProgressFinishedCallback(bool dumpProgressFinishedCallback) { m_dumpProgressFinishedCallback = dumpProgressFinishedCallback; }
  159. bool dumpUserGestureInFrameLoadCallbacks() const { return m_dumpUserGestureInFrameLoadCallbacks; }
  160. void setDumpUserGestureInFrameLoadCallbacks(bool dumpUserGestureInFrameLoadCallbacks) { m_dumpUserGestureInFrameLoadCallbacks = dumpUserGestureInFrameLoadCallbacks; }
  161. bool dumpHistoryDelegateCallbacks() const { return m_dumpHistoryDelegateCallbacks; }
  162. void setDumpHistoryDelegateCallbacks(bool dumpHistoryDelegateCallbacks) { m_dumpHistoryDelegateCallbacks = dumpHistoryDelegateCallbacks; }
  163. bool dumpResourceLoadCallbacks() const { return m_dumpResourceLoadCallbacks; }
  164. void setDumpResourceLoadCallbacks(bool dumpResourceLoadCallbacks) { m_dumpResourceLoadCallbacks = dumpResourceLoadCallbacks; }
  165. bool dumpResourceResponseMIMETypes() const { return m_dumpResourceResponseMIMETypes; }
  166. void setDumpResourceResponseMIMETypes(bool dumpResourceResponseMIMETypes) { m_dumpResourceResponseMIMETypes = dumpResourceResponseMIMETypes; }
  167. bool dumpSelectionRect() const { return m_dumpSelectionRect; }
  168. void setDumpSelectionRect(bool dumpSelectionRect) { m_dumpSelectionRect = dumpSelectionRect; }
  169. bool dumpSourceAsWebArchive() const { return m_dumpSourceAsWebArchive; }
  170. void setDumpSourceAsWebArchive(bool dumpSourceAsWebArchive) { m_dumpSourceAsWebArchive = dumpSourceAsWebArchive; }
  171. bool dumpStatusCallbacks() const { return m_dumpStatusCallbacks; }
  172. void setDumpStatusCallbacks(bool dumpStatusCallbacks) { m_dumpStatusCallbacks = dumpStatusCallbacks; }
  173. bool dumpTitleChanges() const { return m_dumpTitleChanges; }
  174. void setDumpTitleChanges(bool dumpTitleChanges) { m_dumpTitleChanges = dumpTitleChanges; }
  175. bool dumpIconChanges() const { return m_dumpIconChanges; }
  176. void setDumpIconChanges(bool dumpIconChanges) { m_dumpIconChanges = dumpIconChanges; }
  177. bool dumpVisitedLinksCallback() const { return m_dumpVisitedLinksCallback; }
  178. void setDumpVisitedLinksCallback(bool dumpVisitedLinksCallback) { m_dumpVisitedLinksCallback = dumpVisitedLinksCallback; }
  179. bool dumpWillCacheResponse() const { return m_dumpWillCacheResponse; }
  180. void setDumpWillCacheResponse(bool dumpWillCacheResponse) { m_dumpWillCacheResponse = dumpWillCacheResponse; }
  181. bool callCloseOnWebViews() const { return m_callCloseOnWebViews; }
  182. void setCallCloseOnWebViews(bool callCloseOnWebViews) { m_callCloseOnWebViews = callCloseOnWebViews; }
  183. bool canOpenWindows() const { return m_canOpenWindows; }
  184. void setCanOpenWindows(bool canOpenWindows) { m_canOpenWindows = canOpenWindows; }
  185. bool closeRemainingWindowsWhenComplete() const { return m_closeRemainingWindowsWhenComplete; }
  186. void setCloseRemainingWindowsWhenComplete(bool closeRemainingWindowsWhenComplete) { m_closeRemainingWindowsWhenComplete = closeRemainingWindowsWhenComplete; }
  187. bool newWindowsCopyBackForwardList() const { return m_newWindowsCopyBackForwardList; }
  188. void setNewWindowsCopyBackForwardList(bool newWindowsCopyBackForwardList) { m_newWindowsCopyBackForwardList = newWindowsCopyBackForwardList; }
  189. bool stopProvisionalFrameLoads() const { return m_stopProvisionalFrameLoads; }
  190. void setStopProvisionalFrameLoads(bool stopProvisionalFrameLoads) { m_stopProvisionalFrameLoads = stopProvisionalFrameLoads; }
  191. bool testOnscreen() const { return m_testOnscreen; }
  192. void setTestOnscreen(bool testOnscreen) { m_testOnscreen = testOnscreen; }
  193. bool testRepaint() const { return m_testRepaint; }
  194. void setTestRepaint(bool testRepaint) { m_testRepaint = testRepaint; }
  195. bool testRepaintSweepHorizontally() const { return m_testRepaintSweepHorizontally; }
  196. void setTestRepaintSweepHorizontally(bool testRepaintSweepHorizontally) { m_testRepaintSweepHorizontally = testRepaintSweepHorizontally; }
  197. bool waitToDump() const { return m_waitToDump; }
  198. void setWaitToDump(bool);
  199. void waitToDumpWatchdogTimerFired();
  200. const std::set<std::string>& willSendRequestClearHeaders() const { return m_willSendRequestClearHeaders; }
  201. void setWillSendRequestClearHeader(std::string header) { m_willSendRequestClearHeaders.insert(header); }
  202. bool willSendRequestReturnsNull() const { return m_willSendRequestReturnsNull; }
  203. void setWillSendRequestReturnsNull(bool returnsNull) { m_willSendRequestReturnsNull = returnsNull; }
  204. bool willSendRequestReturnsNullOnRedirect() const { return m_willSendRequestReturnsNullOnRedirect; }
  205. void setWillSendRequestReturnsNullOnRedirect(bool returnsNull) { m_willSendRequestReturnsNullOnRedirect = returnsNull; }
  206. bool windowIsKey() const { return m_windowIsKey; }
  207. void setWindowIsKey(bool);
  208. bool alwaysAcceptCookies() const { return m_alwaysAcceptCookies; }
  209. void setAlwaysAcceptCookies(bool);
  210. bool handlesAuthenticationChallenges() const { return m_handlesAuthenticationChallenges; }
  211. void setHandlesAuthenticationChallenges(bool handlesAuthenticationChallenges) { m_handlesAuthenticationChallenges = handlesAuthenticationChallenges; }
  212. bool isPrinting() const { return m_isPrinting; }
  213. void setIsPrinting(bool isPrinting) { m_isPrinting = isPrinting; }
  214. const std::string& authenticationUsername() const { return m_authenticationUsername; }
  215. void setAuthenticationUsername(std::string username) { m_authenticationUsername = username; }
  216. const std::string& authenticationPassword() const { return m_authenticationPassword; }
  217. void setAuthenticationPassword(std::string password) { m_authenticationPassword = password; }
  218. bool globalFlag() const { return m_globalFlag; }
  219. void setGlobalFlag(bool globalFlag) { m_globalFlag = globalFlag; }
  220. bool deferMainResourceDataLoad() const { return m_deferMainResourceDataLoad; }
  221. void setDeferMainResourceDataLoad(bool flag) { m_deferMainResourceDataLoad = flag; }
  222. bool useDeferredFrameLoading() const { return m_useDeferredFrameLoading; }
  223. void setUseDeferredFrameLoading(bool flag) { m_useDeferredFrameLoading = flag; }
  224. const std::string& testPathOrURL() const { return m_testPathOrURL; }
  225. const std::string& expectedPixelHash() const { return m_expectedPixelHash; }
  226. const std::string& encodedAudioData() const { return m_encodedAudioData; }
  227. void setEncodedAudioData(const std::string& encodedAudioData) { m_encodedAudioData = encodedAudioData; }
  228. void addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
  229. void removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
  230. void addUserScript(JSStringRef source, bool runAtStart, bool allFrames);
  231. void addUserStyleSheet(JSStringRef source, bool allFrames);
  232. void setGeolocationPermission(bool allow);
  233. bool isGeolocationPermissionSet() const { return m_isGeolocationPermissionSet; }
  234. bool geolocationPermission() const { return m_geolocationPermission; }
  235. void setDeveloperExtrasEnabled(bool);
  236. void showWebInspector();
  237. void closeWebInspector();
  238. void evaluateInWebInspector(long callId, JSStringRef script);
  239. void evaluateScriptInIsolatedWorld(unsigned worldID, JSObjectRef globalObject, JSStringRef script);
  240. void evaluateScriptInIsolatedWorldAndReturnValue(unsigned worldID, JSObjectRef globalObject, JSStringRef script);
  241. bool shouldStayOnPageAfterHandlingBeforeUnload() const { return m_shouldStayOnPageAfterHandlingBeforeUnload; }
  242. void setShouldStayOnPageAfterHandlingBeforeUnload(bool shouldStayOnPageAfterHandlingBeforeUnload) { m_shouldStayOnPageAfterHandlingBeforeUnload = shouldStayOnPageAfterHandlingBeforeUnload; }
  243. void addChromeInputField();
  244. void removeChromeInputField();
  245. void focusWebView();
  246. void setBackingScaleFactor(double);
  247. void setPOSIXLocale(JSStringRef);
  248. void setWebViewEditable(bool);
  249. void abortModal();
  250. static void setSerializeHTTPLoads(bool);
  251. // The following API test functions should probably be moved to platform-specific
  252. // unit tests outside of DRT once they exist.
  253. void apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL);
  254. void apiTestGoToCurrentBackForwardItem();
  255. // Simulate a request an embedding application could make, populating per-session credential storage.
  256. void authenticateSession(JSStringRef url, JSStringRef username, JSStringRef password);
  257. JSValueRef originsWithLocalStorage(JSContextRef);
  258. void deleteAllLocalStorage();
  259. void deleteLocalStorageForOrigin(JSStringRef originIdentifier);
  260. long long localStorageDiskUsageForOrigin(JSStringRef originIdentifier);
  261. void observeStorageTrackerNotifications(unsigned number);
  262. void syncLocalStorage();
  263. void setShouldPaintBrokenImage(bool);
  264. bool shouldPaintBrokenImage() const { return m_shouldPaintBrokenImage; }
  265. void setTextDirection(JSStringRef);
  266. const std::string& titleTextDirection() const { return m_titleTextDirection; }
  267. void setTitleTextDirection(const std::string& direction) { m_titleTextDirection = direction; }
  268. // Custom full screen behavior.
  269. void setHasCustomFullScreenBehavior(bool value) { m_customFullScreenBehavior = value; }
  270. bool hasCustomFullScreenBehavior() const { return m_customFullScreenBehavior; }
  271. void setStorageDatabaseIdleInterval(double);
  272. void closeIdleLocalStorageDatabases();
  273. bool hasPendingWebNotificationClick() const { return m_hasPendingWebNotificationClick; }
  274. private:
  275. TestRunner(const std::string& testPathOrURL, const std::string& expectedPixelHash);
  276. void setGeolocationPermissionCommon(bool allow);
  277. bool m_disallowIncreaseForApplicationCacheQuota;
  278. bool m_dumpApplicationCacheDelegateCallbacks;
  279. bool m_dumpAsAudio;
  280. bool m_dumpAsPDF;
  281. bool m_dumpAsText;
  282. bool m_dumpBackForwardList;
  283. bool m_dumpChildFrameScrollPositions;
  284. bool m_dumpChildFramesAsText;
  285. bool m_dumpDOMAsWebArchive;
  286. bool m_dumpDatabaseCallbacks;
  287. bool m_dumpEditingCallbacks;
  288. bool m_dumpFrameLoadCallbacks;
  289. bool m_dumpProgressFinishedCallback;
  290. bool m_dumpUserGestureInFrameLoadCallbacks;
  291. bool m_dumpHistoryDelegateCallbacks;
  292. bool m_dumpResourceLoadCallbacks;
  293. bool m_dumpResourceResponseMIMETypes;
  294. bool m_dumpSelectionRect;
  295. bool m_dumpSourceAsWebArchive;
  296. bool m_dumpStatusCallbacks;
  297. bool m_dumpTitleChanges;
  298. bool m_dumpIconChanges;
  299. bool m_dumpVisitedLinksCallback;
  300. bool m_dumpWillCacheResponse;
  301. bool m_generatePixelResults;
  302. bool m_callCloseOnWebViews;
  303. bool m_canOpenWindows;
  304. bool m_closeRemainingWindowsWhenComplete;
  305. bool m_newWindowsCopyBackForwardList;
  306. bool m_stopProvisionalFrameLoads;
  307. bool m_testOnscreen;
  308. bool m_testRepaint;
  309. bool m_testRepaintSweepHorizontally;
  310. bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called.
  311. bool m_willSendRequestReturnsNull;
  312. bool m_willSendRequestReturnsNullOnRedirect;
  313. bool m_windowIsKey;
  314. bool m_alwaysAcceptCookies;
  315. bool m_globalFlag;
  316. bool m_isGeolocationPermissionSet;
  317. bool m_geolocationPermission;
  318. bool m_handlesAuthenticationChallenges;
  319. bool m_isPrinting;
  320. bool m_deferMainResourceDataLoad;
  321. bool m_useDeferredFrameLoading;
  322. bool m_shouldPaintBrokenImage;
  323. bool m_shouldStayOnPageAfterHandlingBeforeUnload;
  324. // FIXME 81697: This variable most likely will be removed once we have migrated the tests from fast/notifications to http/tests/notifications.
  325. bool m_areLegacyWebNotificationPermissionRequestsIgnored;
  326. bool m_customFullScreenBehavior;
  327. bool m_hasPendingWebNotificationClick;
  328. std::string m_authenticationUsername;
  329. std::string m_authenticationPassword;
  330. std::string m_testPathOrURL;
  331. std::string m_expectedPixelHash; // empty string if no hash
  332. std::string m_titleTextDirection;
  333. std::set<std::string> m_willSendRequestClearHeaders;
  334. // base64 encoded WAV audio data is stored here.
  335. std::string m_encodedAudioData;
  336. std::map<std::string, std::string> m_URLsToRedirect;
  337. static JSClassRef getJSClass();
  338. static JSStaticValue* staticValues();
  339. static JSStaticFunction* staticFunctions();
  340. };
  341. #endif // TestRunner_h