Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: content/browser/accessibility/browser_accessibility_win_unittest.cc

Issue 383263002: Fix a use after free crasher in the BrowserAccessibilityManagerWinTest.TestAccessibleHWND test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/accessibility/browser_accessibility_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/browser_accessibility_win_unittest.cc
diff --git a/content/browser/accessibility/browser_accessibility_win_unittest.cc b/content/browser/accessibility/browser_accessibility_win_unittest.cc
index ac5b58f5829c375c8f98953f1c5eb0d36ee15832..7f23dd92be02feba919eca27f7dc83254244330f 100644
--- a/content/browser/accessibility/browser_accessibility_win_unittest.cc
+++ b/content/browser/accessibility/browser_accessibility_win_unittest.cc
@@ -744,8 +744,10 @@ TEST(BrowserAccessibilityManagerWinTest, TestAccessibleHWND) {
ASSERT_NE(0, GetClassName(new_parent_hwnd, hwnd_class_name, 256));
ASSERT_STREQ(L"Chrome_RenderWidgetHostHWND", hwnd_class_name);
- // Destroy the hwnd explicitly; that should trigger clearing parent_hwnd().
- DestroyWindow(new_parent_hwnd);
+ // Destroy the TestLegacyRenderWidgetHostHWND instance. That should in turn
+ // destroy the hwnd, which should clear the parent_hwnd().
+ accessibility_test.reset(NULL);
+ ASSERT_EQ(FALSE, ::IsWindow(new_parent_hwnd));
ASSERT_EQ(NULL, manager->parent_hwnd());
// Now create it again.
« no previous file with comments | « content/browser/accessibility/browser_accessibility_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698