Changeset 52826 in webkit
- Timestamp:
- Jan 5, 2010 3:06:44 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r52825 r52826 1 2010-01-05 Adam Roben <aroben@apple.com> 2 3 Add more WebViewDestruction tests 4 5 Fixes <http://webkit.org/b/33216>. 6 7 Reviewed by Eric Seidel. 8 9 * WebKitAPITest/tests/WebViewDestruction.cpp: 10 (WebKitAPITest::NoInitWithFrame): 11 (WebKitAPITest::CloseThenDestroyViewWindow): 12 (WebKitAPITest::DestroyViewWindowThenClose): 13 (WebKitAPITest::DestroyHostWindow): 14 (WebKitAPITest::DestroyHostWindowThenClose): 15 (WebKitAPITest::CloseThenDestroyHostWindow): 16 Added these tests that exercise tearing down a WebView in various 17 ways, all of which we eventually want to have work. Some of them 18 currently crash or leak. 19 1 20 2010-01-05 Robert Hogan <robert@roberthogan.net> 2 21 -
trunk/WebKitTools/WebKitAPITest/tests/WebViewDestruction.cpp
r52805 r52826 94 94 } 95 95 96 // Tests that releasing a WebView without calling IWebView::initWithFrame works. 97 TEST(WebViewDestruction, NoInitWithFrame) 98 { 99 COMPtr<IWebView> webView; 100 TEST_ASSERT(SUCCEEDED(WebKitCreateInstance(__uuidof(WebView), &webView))); 101 102 finishWebViewDestructionTest(webView, 0); 103 } 104 105 // Tests that releasing a WebView without calling IWebView::close or DestroyWindow doesn't leak. <http://webkit.org/b/33162> 106 TEST(WebViewDestruction, NoCloseOrDestroyViewWindow) 107 { 108 COMPtr<IWebView> webView; 109 HostWindow window; 110 HWND viewWindow; 111 createAndInitializeWebView(webView, window, viewWindow); 112 113 finishWebViewDestructionTest(webView, viewWindow); 114 } 115 96 116 // Tests that calling IWebView::close without calling DestroyWindow, then releasing a WebView doesn't crash. <http://webkit.org/b/32827> 97 117 TEST(WebViewDestruction, CloseWithoutDestroyViewWindow) … … 107 127 } 108 128 129 TEST(WebViewDestruction, DestroyViewWindowWithoutClose) 130 { 131 COMPtr<IWebView> webView; 132 HostWindow window; 133 HWND viewWindow; 134 createAndInitializeWebView(webView, window, viewWindow); 135 136 DestroyWindow(viewWindow); 137 138 finishWebViewDestructionTest(webView, viewWindow); 139 } 140 141 TEST(WebViewDestruction, CloseThenDestroyViewWindow) 142 { 143 COMPtr<IWebView> webView; 144 HostWindow window; 145 HWND viewWindow; 146 createAndInitializeWebView(webView, window, viewWindow); 147 148 TEST_ASSERT(SUCCEEDED(webView->close())); 149 DestroyWindow(viewWindow); 150 151 finishWebViewDestructionTest(webView, viewWindow); 152 } 153 154 TEST(WebViewDestruction, DestroyViewWindowThenClose) 155 { 156 COMPtr<IWebView> webView; 157 HostWindow window; 158 HWND viewWindow; 159 createAndInitializeWebView(webView, window, viewWindow); 160 161 DestroyWindow(viewWindow); 162 TEST_ASSERT(SUCCEEDED(webView->close())); 163 164 finishWebViewDestructionTest(webView, viewWindow); 165 } 166 167 TEST(WebViewDestruction, DestroyHostWindow) 168 { 169 COMPtr<IWebView> webView; 170 HostWindow window; 171 HWND viewWindow; 172 createAndInitializeWebView(webView, window, viewWindow); 173 174 DestroyWindow(window.window()); 175 176 finishWebViewDestructionTest(webView, viewWindow); 177 } 178 179 TEST(WebViewDestruction, DestroyHostWindowThenClose) 180 { 181 COMPtr<IWebView> webView; 182 HostWindow window; 183 HWND viewWindow; 184 createAndInitializeWebView(webView, window, viewWindow); 185 186 DestroyWindow(window.window()); 187 TEST_ASSERT(SUCCEEDED(webView->close())); 188 189 finishWebViewDestructionTest(webView, viewWindow); 190 } 191 192 TEST(WebViewDestruction, CloseThenDestroyHostWindow) 193 { 194 COMPtr<IWebView> webView; 195 HostWindow window; 196 HWND viewWindow; 197 createAndInitializeWebView(webView, window, viewWindow); 198 199 TEST_ASSERT(SUCCEEDED(webView->close())); 200 DestroyWindow(window.window()); 201 202 finishWebViewDestructionTest(webView, viewWindow); 203 } 204 109 205 // Tests that calling IWebView::mainFrame after calling IWebView::close doesn't crash. <http://webkit.org/b/32868> 110 206 TEST(WebViewDestruction, MainFrameAfterClose) … … 122 218 } 123 219 124 // Tests that releasing a WebView without calling IWebView::close or DestroyWindow doesn't leak. <http://webkit.org/b/33162>125 TEST(WebViewDestruction, NoCloseOrDestroyViewWindow)126 {127 COMPtr<IWebView> webView;128 HostWindow window;129 HWND viewWindow;130 createAndInitializeWebView(webView, window, viewWindow);131 132 finishWebViewDestructionTest(webView, viewWindow);133 }134 135 220 } // namespace WebKitAPITest
Note: See TracChangeset
for help on using the changeset viewer.