diff options
author | patthoyts@users.sourceforge.net <patthoyts> | 2008-08-01 20:24:48 (GMT) |
---|---|---|
committer | patthoyts@users.sourceforge.net <patthoyts> | 2008-08-01 20:24:48 (GMT) |
commit | b1e42738f7d00306929ac3d422832145aa737f8f (patch) | |
tree | 3d3883042dc282218ebe4f6086aa1fb57b6f3420 /tests/wm.test | |
parent | c587af613aac550cb8011639952859ca3d437aa7 (diff) | |
download | tk-b1e42738f7d00306929ac3d422832145aa737f8f.zip tk-b1e42738f7d00306929ac3d422832145aa737f8f.tar.gz tk-b1e42738f7d00306929ac3d422832145aa737f8f.tar.bz2 |
Backported fixes for handling unmapped parent toplevels. [Bug 2009788, 2028703]
Diffstat (limited to 'tests/wm.test')
-rw-r--r-- | tests/wm.test | 39 |
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 |