WebKitTestRunner does not correctly resize WebView for W3C SVG tests
authorjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Aug 2010 03:47:23 +0000 (03:47 +0000)
committerjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Aug 2010 03:47:23 +0000 (03:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=43945

Reviewed by Sam Weinig.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::sizeWebViewForCurrentTest):
Allow for a Windows-style path.

* WebKitTestRunner/win/PlatformWebViewWin.cpp:
(WTR::PlatformWebView::resizeTo):
Call SetWindowPos to resize the view window.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@65294 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/WebKitTestRunner/TestInvocation.cpp
WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp

index f8d1d88..cec8350 100644 (file)
@@ -1,3 +1,18 @@
+2010-08-12  Jon Honeycutt  <jhoneycutt@apple.com>
+
+        WebKitTestRunner does not correctly resize WebView for W3C SVG tests
+        https://bugs.webkit.org/show_bug.cgi?id=43945
+
+        Reviewed by Sam Weinig.
+
+        * WebKitTestRunner/TestInvocation.cpp:
+        (WTR::sizeWebViewForCurrentTest):
+        Allow for a Windows-style path.
+
+        * WebKitTestRunner/win/PlatformWebViewWin.cpp:
+        (WTR::PlatformWebView::resizeTo):
+        Call SetWindowPos to resize the view window.
+
 2010-08-12  David Levin  <levin@chromium.org>
 
         Build break fix.
index fd02335..47df66b 100644 (file)
@@ -58,7 +58,7 @@ static const unsigned normalHeight = 600;
 
 static void sizeWebViewForCurrentTest(char* pathOrURL)
 {
-    bool isSVGW3CTest = strstr(pathOrURL, "svg/W3C-SVG-1.1");
+    bool isSVGW3CTest = strstr(pathOrURL, "svg/W3C-SVG-1.1") || strstr(pathOrURL, "svg\\W3C-SVG-1.1");
 
     if (isSVGW3CTest)
         TestController::shared().mainWebView()->resizeTo(w3cSVGWidth, w3cSVGHeight);
index e602d0e..0f22842 100644 (file)
@@ -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()