summaryrefslogtreecommitdiffstats
path: root/WebKitTools/WebKitTestRunner/win
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/WebKitTestRunner/win')
-rw-r--r--WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp7
-rw-r--r--WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp28
-rw-r--r--WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp42
-rw-r--r--WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj4
4 files changed, 34 insertions, 47 deletions
diff --git a/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp b/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp
index e602d0e..deed4ab 100644
--- a/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp
+++ b/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp
@@ -65,7 +65,7 @@ PlatformWebView::~PlatformWebView()
void PlatformWebView::resizeTo(unsigned width, unsigned height)
{
- // Implement
+ ::SetWindowPos(WKViewGetWindow(m_view), 0, 0, 0, width, height, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS);
}
WKPageRef PlatformWebView::page()
@@ -73,4 +73,9 @@ WKPageRef PlatformWebView::page()
return WKViewGetPage(m_view);
}
+void PlatformWebView::focus()
+{
+ ::SetFocus(::WKViewGetWindow(m_view));
+}
+
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp b/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
index f650d7f..e35ee22 100644
--- a/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
+++ b/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
@@ -29,6 +29,7 @@
#include <io.h>
#include <shlwapi.h>
#include <string>
+#include <WebKit2/WKContextPrivateWin.h>
#include <WebKit2/WKStringCF.h>
#include <wtf/RetainPtr.h>
#include <wtf/Vector.h>
@@ -80,8 +81,17 @@ static void addQTDirToPATH()
::SetEnvironmentVariableW(pathEnvironmentVariable, newPath.data());
}
+static LONG WINAPI exceptionFilter(EXCEPTION_POINTERS*)
+{
+ fputs("#CRASHED\n", stderr);
+ fflush(stderr);
+ return EXCEPTION_CONTINUE_SEARCH;
+}
+
void TestController::platformInitialize()
{
+ ::SetUnhandledExceptionFilter(exceptionFilter);
+
_setmode(1, _O_BINARY);
_setmode(2, _O_BINARY);
@@ -113,4 +123,22 @@ void TestController::initializeTestPluginDirectory()
m_testPluginDirectory.adopt(WKStringCreateWithCFString(testPluginDirectoryPath.get()));
}
+void TestController::runUntil(bool& done)
+{
+ while (!done) {
+ MSG msg;
+ BOOL result = GetMessage(&msg, 0, 0, 0);
+ if (result == -1)
+ return;
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+}
+
+void TestController::platformInitializeContext()
+{
+ // FIXME: Make DRT pass with Windows native controls. <http://webkit.org/b/25592>
+ WKContextSetShouldPaintNativeControls(m_context.get(), false);
+}
+
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp b/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp
deleted file mode 100644
index cfeebcc..0000000
--- a/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "TestInvocation.h"
-
-namespace WTR {
-
-void TestInvocation::runUntil(bool& done)
-{
- while (!done) {
- MSG msg;
- BOOL result = GetMessage(&msg, 0, 0, 0);
- if (result == -1)
- return;
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
-}
-
-} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj
index 7375bd4..d7ddd5c 100644
--- a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj
+++ b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj
@@ -317,10 +317,6 @@
RelativePath=".\TestControllerWin.cpp"
>
</File>
- <File
- RelativePath=".\TestInvocationWin.cpp"
- >
- </File>
</Filter>
<File
RelativePath="..\PlatformWebView.h"