diff options
author | patthoyts <patthoyts@noemail.net> | 2008-08-01 20:24:47 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@noemail.net> | 2008-08-01 20:24:47 (GMT) |
commit | 2dd8d6f9988653f4dd84903904e500b0fdbbf8ad (patch) | |
tree | 3d3883042dc282218ebe4f6086aa1fb57b6f3420 /tests/wm.test | |
parent | 90cb2b99f15380c605cf7c9210e59e2b1d2a46b3 (diff) | |
download | tk-2dd8d6f9988653f4dd84903904e500b0fdbbf8ad.zip tk-2dd8d6f9988653f4dd84903904e500b0fdbbf8ad.tar.gz tk-2dd8d6f9988653f4dd84903904e500b0fdbbf8ad.tar.bz2 |
Backported fixes for handling unmapped parent toplevels. [Bug 2009788, 2028703]
FossilOrigin-Name: 07f30a6983c9b6d12fd10976f43e212840d73e93
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 |