summaryrefslogtreecommitdiff
path: root/Tools/DumpRenderTree/TestRunner.h
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/DumpRenderTree/TestRunner.h')
-rw-r--r--Tools/DumpRenderTree/TestRunner.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/Tools/DumpRenderTree/TestRunner.h b/Tools/DumpRenderTree/TestRunner.h
index 882c0e96c..d51ac6feb 100644
--- a/Tools/DumpRenderTree/TestRunner.h
+++ b/Tools/DumpRenderTree/TestRunner.h
@@ -10,7 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
@@ -39,7 +39,7 @@
class TestRunner : public RefCounted<TestRunner> {
public:
- static PassRefPtr<TestRunner> create(const std::string& testPathOrURL, const std::string& expectedPixelHash);
+ static PassRefPtr<TestRunner> create(const std::string& testURL, const std::string& expectedPixelHash);
static const unsigned viewWidth;
static const unsigned viewHeight;
@@ -52,6 +52,8 @@ public:
void makeWindowObject(JSContextRef, JSObjectRef windowObject, JSValueRef* exception);
void addDisallowedURL(JSStringRef url);
+ const std::set<std::string>& allowedHosts() const { return m_allowedHosts; }
+ void setAllowedHosts(std::set<std::string> hosts) { m_allowedHosts = WTFMove(hosts); }
void addURLToRedirect(std::string origin, std::string destination);
const std::string& redirectionDestinationForURL(std::string);
void clearAllApplicationCaches();
@@ -74,6 +76,7 @@ public:
void keepWebHistory();
void notifyDone();
int numberOfPendingGeolocationPermissionRequests();
+ bool isGeolocationProviderActive();
void overridePreference(JSStringRef key, JSStringRef value);
JSStringRef pathToLocalResource(JSContextRef, JSStringRef url);
void queueBackNavigation(int howFarBackward);
@@ -102,8 +105,6 @@ public:
void setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma);
void setMockGeolocationPosition(double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed);
void setMockGeolocationPositionUnavailableError(JSStringRef message);
- void addMockSpeechInputResult(JSStringRef result, double confidence, JSStringRef language);
- void setMockSpeechInputDumpRect(bool flag);
void setPersistentUserStyleSheetLocation(JSStringRef path);
void setPluginsEnabled(bool);
void setPopupBlockingEnabled(bool);
@@ -117,7 +118,6 @@ public:
void setXSSAuditorEnabled(bool flag);
void setSpatialNavigationEnabled(bool);
void setScrollbarPolicy(JSStringRef orientation, JSStringRef policy);
- void startSpeechInput(JSContextRef inputElement);
#if PLATFORM(IOS)
void setTelephoneNumberParsingEnabled(bool enable);
void setPagePaused(bool paused);
@@ -288,7 +288,7 @@ public:
bool useDeferredFrameLoading() const { return m_useDeferredFrameLoading; }
void setUseDeferredFrameLoading(bool flag) { m_useDeferredFrameLoading = flag; }
- const std::string& testPathOrURL() const { return m_testPathOrURL; }
+ const std::string& testURL() const { return m_testURL; }
const std::string& expectedPixelHash() const { return m_expectedPixelHash; }
const std::vector<char>& audioResult() const { return m_audioResult; }
@@ -307,7 +307,9 @@ public:
void setDeveloperExtrasEnabled(bool);
void showWebInspector();
void closeWebInspector();
- void evaluateInWebInspector(long callId, JSStringRef script);
+ void evaluateInWebInspector(JSStringRef script);
+ JSStringRef inspectorTestStubURL();
+
void evaluateScriptInIsolatedWorld(unsigned worldID, JSObjectRef globalObject, JSStringRef script);
void evaluateScriptInIsolatedWorldAndReturnValue(unsigned worldID, JSObjectRef globalObject, JSStringRef script);
@@ -336,13 +338,6 @@ public:
// Simulate a request an embedding application could make, populating per-session credential storage.
void authenticateSession(JSStringRef url, JSStringRef username, JSStringRef password);
- JSValueRef originsWithLocalStorage(JSContextRef);
- void deleteAllLocalStorage();
- void deleteLocalStorageForOrigin(JSStringRef originIdentifier);
- long long localStorageDiskUsageForOrigin(JSStringRef originIdentifier);
- void observeStorageTrackerNotifications(unsigned number);
- void syncLocalStorage();
-
void setShouldPaintBrokenImage(bool);
bool shouldPaintBrokenImage() const { return m_shouldPaintBrokenImage; }
@@ -359,8 +354,10 @@ public:
bool hasPendingWebNotificationClick() const { return m_hasPendingWebNotificationClick; }
+ void setCustomTimeout(int duration) { m_timeout = duration; }
+
private:
- TestRunner(const std::string& testPathOrURL, const std::string& expectedPixelHash);
+ TestRunner(const std::string& testURL, const std::string& expectedPixelHash);
void setGeolocationPermissionCommon(bool allow);
@@ -421,19 +418,22 @@ private:
std::string m_authenticationUsername;
std::string m_authenticationPassword;
- std::string m_testPathOrURL;
+ std::string m_testURL;
std::string m_expectedPixelHash; // empty string if no hash
std::string m_titleTextDirection;
std::set<std::string> m_willSendRequestClearHeaders;
+ std::set<std::string> m_allowedHosts;
std::vector<char> m_audioResult;
std::map<std::string, std::string> m_URLsToRedirect;
-
+
static JSClassRef getJSClass();
static JSStaticValue* staticValues();
static JSStaticFunction* staticFunctions();
+
+ int m_timeout;
};
#endif // TestRunner_h