summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2008-08-01 20:24:48 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2008-08-01 20:24:48 (GMT)
commitacf4293cf37a201ebfa87e6e659bf7cfc9535963 (patch)
tree3d3883042dc282218ebe4f6086aa1fb57b6f3420 /tests
parentf02960739692cea710d87f40a460c9564e8cc10c (diff)
downloadtk-acf4293cf37a201ebfa87e6e659bf7cfc9535963.zip
tk-acf4293cf37a201ebfa87e6e659bf7cfc9535963.tar.gz
tk-acf4293cf37a201ebfa87e6e659bf7cfc9535963.tar.bz2
Backported fixes for handling unmapped parent toplevels. [Bug 2009788, 2028703]
Diffstat (limited to 'tests')
-rw-r--r--tests/wm.test39
1 files changed, 38 insertions, 1 deletions
diff --git a/tests/wm.test b/tests/wm.test
index a5586bd..7e2e484 100644
--- a/tests/wm.test
+++ b/tests/wm.test
@@ -7,7 +7,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: wm.test,v 1.39 2008/03/20 13:23:20 dkf Exp $
+# RCS: @(#) $Id: wm.test,v 1.39.2.1 2008/08/01 20:24:48 patthoyts Exp $
# This file tests window manager interactions that work across platforms.
# Window manager tests that only work on a specific platform should be placed
@@ -2138,6 +2138,43 @@ test wm-manage-1.2 {unmanaging a toplevel} -setup {
deleteWindows
} -result {wm .t.t pack .t wm .t.t}
+test wm-forget-1.1 "bug #2009788: forget toplevel can cause crash" -body {
+ toplevel .parent
+ toplevel .parent.child
+ wm forget .parent.child
+ winfo exists .parent.child
+} -cleanup {
+ deleteWindows
+} -result {1}
+test wm-forget-1.2 "bug #2009788: forget toplevel can cause crash" -body {
+ toplevel .parent
+ update
+ toplevel .parent.child
+ wm forget .parent.child
+ winfo exists .parent.child
+} -cleanup {
+ deleteWindows
+} -result {1}
+test wm-forget-1.3 "bug #2009788: forget toplevel can cause crash" -body {
+ toplevel .parent
+ toplevel .parent.child
+ wm forget .parent.child
+ wm manage .parent.child
+ winfo exists .parent.child
+} -cleanup {
+ deleteWindows
+} -result {1}
+test wm-forget-1.4 "pack into unmapped toplevel causes crash" -body {
+ toplevel .parent
+ toplevel .parent.child
+ wm forget .parent.child
+ pack [button .parent.child.button -text Hello]
+ after 250 {destroy .parent}
+ tkwait window .parent
+} -cleanup {
+ deleteWindows
+} -result {}
+
# FIXME:
# Test delivery of virtual events to the WM. We could check to see if the