diff options
Diffstat (limited to 'Source/WebCore/testing/js/WebCoreTestSupport.h')
-rw-r--r-- | Source/WebCore/testing/js/WebCoreTestSupport.h | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/Source/WebCore/testing/js/WebCoreTestSupport.h b/Source/WebCore/testing/js/WebCoreTestSupport.h index de7fc747f..564094a52 100644 --- a/Source/WebCore/testing/js/WebCoreTestSupport.h +++ b/Source/WebCore/testing/js/WebCoreTestSupport.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2011 Google Inc. All rights reserved. + * Copyright (C) 2011, 2015 Google Inc. All rights reserved. + * Copyright (C) 2016 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,22 +24,43 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebCoreTestSupport_h -#define WebCoreTestSupport_h +#pragma once typedef const struct OpaqueJSContext* JSContextRef; +typedef struct OpaqueJSString* JSStringRef; +typedef struct OpaqueJSValue* JSObjectRef; -#if PLATFORM(MAC) +#if PLATFORM(COCOA) #define TEST_SUPPORT_EXPORT WTF_EXPORT_PRIVATE #else #define TEST_SUPPORT_EXPORT #endif +namespace WTF { +class String; +} + +namespace WebCore { +class Frame; +} + namespace WebCoreTestSupport { void injectInternalsObject(JSContextRef) TEST_SUPPORT_EXPORT; void resetInternalsObject(JSContextRef) TEST_SUPPORT_EXPORT; +void monitorWheelEvents(WebCore::Frame&) TEST_SUPPORT_EXPORT; +void setTestCallbackAndStartNotificationTimer(WebCore::Frame&, JSContextRef, JSObjectRef) TEST_SUPPORT_EXPORT; +void clearWheelEventTestTrigger(WebCore::Frame&) TEST_SUPPORT_EXPORT; -} // namespace WebCore +void setLogChannelToAccumulate(const WTF::String& name) TEST_SUPPORT_EXPORT; +void initializeLogChannelsIfNecessary() TEST_SUPPORT_EXPORT; +void setAllowsAnySSLCertificate(bool) TEST_SUPPORT_EXPORT; -#endif +void installMockGamepadProvider() TEST_SUPPORT_EXPORT; +void connectMockGamepad(unsigned index) TEST_SUPPORT_EXPORT; +void disconnectMockGamepad(unsigned index) TEST_SUPPORT_EXPORT; +void setMockGamepadDetails(unsigned index, const WTF::String& gamepadID, unsigned axisCount, unsigned buttonCount) TEST_SUPPORT_EXPORT; +void setMockGamepadAxisValue(unsigned index, unsigned axisIndex, double value) TEST_SUPPORT_EXPORT; +void setMockGamepadButtonValue(unsigned index, unsigned buttonIndex, double value) TEST_SUPPORT_EXPORT; + +} // namespace WebCoreTestSupport |