From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- .../Tests/WebKit2/SpacebarScrolling.cpp | 27 ++++++++++------------ 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'Tools/TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp') diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp index 577e0d77c..226f52cc2 100644 --- a/Tools/TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp +++ b/Tools/TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp @@ -24,11 +24,14 @@ */ #include "config.h" + +#if WK_HAVE_C_SPI + #include "JavaScriptTest.h" #include "PlatformUtilities.h" #include "PlatformWebView.h" -#include -#include +#include +#include namespace TestWebKitAPI { @@ -86,13 +89,11 @@ TEST(WebKit2, SpacebarScrolling) EXPECT_JS_FALSE(webView.page(), "isDocumentScrolled()"); EXPECT_JS_TRUE(webView.page(), "textFieldContainsSpace()"); - // On Mac, a key down event represents both a raw key down and a key press. On Windows, a key - // down event only represents a raw key down. We expect the key press to be handled (because it - // inserts text into the text field). But the raw key down should not be handled. -#if PLATFORM(MAC) + // On Mac, a key down event represents both a raw key down and a key press. + // We expect the key press to be handled (because it inserts text into the text field), + // but the raw key down should not be handled. +#if PLATFORM(COCOA) EXPECT_FALSE(didNotHandleKeyDownEvent); -#elif PLATFORM(WIN) - EXPECT_TRUE(didNotHandleKeyDownEvent); #endif EXPECT_JS_EQ(webView.page(), "blurTextField()", "undefined"); @@ -100,18 +101,14 @@ TEST(WebKit2, SpacebarScrolling) didNotHandleKeyDownEvent = false; webView.simulateSpacebarKeyPress(); - // This EXPECT_JS_TRUE test fails on Windows port - // https://bugs.webkit.org/show_bug.cgi?id=84961 -#if !PLATFORM(WIN) EXPECT_JS_TRUE(webView.page(), "isDocumentScrolled()"); -#endif EXPECT_JS_TRUE(webView.page(), "textFieldContainsSpace()"); -#if PLATFORM(MAC) +#if PLATFORM(COCOA) EXPECT_FALSE(didNotHandleKeyDownEvent); -#elif PLATFORM(WIN) - EXPECT_TRUE(didNotHandleKeyDownEvent); #endif } } // namespace TestWebKitAPI + +#endif -- cgit v1.2.1