[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
aroben at apple.com
aroben at apple.com
Wed Jan 20 22:13:23 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit cf11e58422164de1f7347bdbe3fa7d54fec3272b
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 5 23:06:44 2010 +0000
Add more WebViewDestruction tests
Fixes <http://webkit.org/b/33216>.
Reviewed by Eric Seidel.
* WebKitAPITest/tests/WebViewDestruction.cpp:
(WebKitAPITest::NoInitWithFrame):
(WebKitAPITest::CloseThenDestroyViewWindow):
(WebKitAPITest::DestroyViewWindowThenClose):
(WebKitAPITest::DestroyHostWindow):
(WebKitAPITest::DestroyHostWindowThenClose):
(WebKitAPITest::CloseThenDestroyHostWindow):
Added these tests that exercise tearing down a WebView in various
ways, all of which we eventually want to have work. Some of them
currently crash or leak.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 9d1a1b7..c759531 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,22 @@
+2010-01-05 Adam Roben <aroben at apple.com>
+
+ Add more WebViewDestruction tests
+
+ Fixes <http://webkit.org/b/33216>.
+
+ Reviewed by Eric Seidel.
+
+ * WebKitAPITest/tests/WebViewDestruction.cpp:
+ (WebKitAPITest::NoInitWithFrame):
+ (WebKitAPITest::CloseThenDestroyViewWindow):
+ (WebKitAPITest::DestroyViewWindowThenClose):
+ (WebKitAPITest::DestroyHostWindow):
+ (WebKitAPITest::DestroyHostWindowThenClose):
+ (WebKitAPITest::CloseThenDestroyHostWindow):
+ Added these tests that exercise tearing down a WebView in various
+ ways, all of which we eventually want to have work. Some of them
+ currently crash or leak.
+
2010-01-05 Robert Hogan <robert at roberthogan.net>
Reviewed by Eric Seidel.
diff --git a/WebKitTools/WebKitAPITest/tests/WebViewDestruction.cpp b/WebKitTools/WebKitAPITest/tests/WebViewDestruction.cpp
index 0c4637e..280acac 100644
--- a/WebKitTools/WebKitAPITest/tests/WebViewDestruction.cpp
+++ b/WebKitTools/WebKitAPITest/tests/WebViewDestruction.cpp
@@ -93,6 +93,26 @@ static void finishWebViewDestructionTest(COMPtr<IWebView>& webView, HWND viewWin
TEST_ASSERT(!IsWindow(viewWindow));
}
+// Tests that releasing a WebView without calling IWebView::initWithFrame works.
+TEST(WebViewDestruction, NoInitWithFrame)
+{
+ COMPtr<IWebView> webView;
+ TEST_ASSERT(SUCCEEDED(WebKitCreateInstance(__uuidof(WebView), &webView)));
+
+ finishWebViewDestructionTest(webView, 0);
+}
+
+// Tests that releasing a WebView without calling IWebView::close or DestroyWindow doesn't leak. <http://webkit.org/b/33162>
+TEST(WebViewDestruction, NoCloseOrDestroyViewWindow)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
// Tests that calling IWebView::close without calling DestroyWindow, then releasing a WebView doesn't crash. <http://webkit.org/b/32827>
TEST(WebViewDestruction, CloseWithoutDestroyViewWindow)
{
@@ -106,8 +126,19 @@ TEST(WebViewDestruction, CloseWithoutDestroyViewWindow)
finishWebViewDestructionTest(webView, viewWindow);
}
-// Tests that calling IWebView::mainFrame after calling IWebView::close doesn't crash. <http://webkit.org/b/32868>
-TEST(WebViewDestruction, MainFrameAfterClose)
+TEST(WebViewDestruction, DestroyViewWindowWithoutClose)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ DestroyWindow(viewWindow);
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
+TEST(WebViewDestruction, CloseThenDestroyViewWindow)
{
COMPtr<IWebView> webView;
HostWindow window;
@@ -115,20 +146,74 @@ TEST(WebViewDestruction, MainFrameAfterClose)
createAndInitializeWebView(webView, window, viewWindow);
TEST_ASSERT(SUCCEEDED(webView->close()));
- COMPtr<IWebFrame> mainFrame;
- TEST_ASSERT(SUCCEEDED(webView->mainFrame(&mainFrame)));
+ DestroyWindow(viewWindow);
finishWebViewDestructionTest(webView, viewWindow);
}
-// Tests that releasing a WebView without calling IWebView::close or DestroyWindow doesn't leak. <http://webkit.org/b/33162>
-TEST(WebViewDestruction, NoCloseOrDestroyViewWindow)
+TEST(WebViewDestruction, DestroyViewWindowThenClose)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ DestroyWindow(viewWindow);
+ TEST_ASSERT(SUCCEEDED(webView->close()));
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
+TEST(WebViewDestruction, DestroyHostWindow)
{
COMPtr<IWebView> webView;
HostWindow window;
HWND viewWindow;
createAndInitializeWebView(webView, window, viewWindow);
+ DestroyWindow(window.window());
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
+TEST(WebViewDestruction, DestroyHostWindowThenClose)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ DestroyWindow(window.window());
+ TEST_ASSERT(SUCCEEDED(webView->close()));
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
+TEST(WebViewDestruction, CloseThenDestroyHostWindow)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ TEST_ASSERT(SUCCEEDED(webView->close()));
+ DestroyWindow(window.window());
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
+// Tests that calling IWebView::mainFrame after calling IWebView::close doesn't crash. <http://webkit.org/b/32868>
+TEST(WebViewDestruction, MainFrameAfterClose)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ TEST_ASSERT(SUCCEEDED(webView->close()));
+ COMPtr<IWebFrame> mainFrame;
+ TEST_ASSERT(SUCCEEDED(webView->mainFrame(&mainFrame)));
+
finishWebViewDestructionTest(webView, viewWindow);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list