summaryrefslogtreecommitdiffstats
path: root/tests/wm.test
diff options
context:
space:
mode:
authorhobbs <hobbs>2007-10-15 20:52:46 (GMT)
committerhobbs <hobbs>2007-10-15 20:52:46 (GMT)
commitadaeb1b2d2e9f439ab072349dedd7bd0f414394d (patch)
tree0b6519680e9c83fec3e54dacfb130e98d65f0296 /tests/wm.test
parent410da9d556a7306f0b2bea77db33c15a7375c315 (diff)
downloadtk-adaeb1b2d2e9f439ab072349dedd7bd0f414394d.zip
tk-adaeb1b2d2e9f439ab072349dedd7bd0f414394d.tar.gz
tk-adaeb1b2d2e9f439ab072349dedd7bd0f414394d.tar.bz2
* generic/tkFocus.c, generic/tkFrame.c, generic/tkInt.h:
* macosx/tkMacOSXButton.c, macosx/tkMacOSXMenubutton.c: * macosx/tkMacOSXWm.c, unix/tkUnixWm.c, win/tkWinWm.c: * doc/wm.n, tests/wm.test: TIP #125 implementation [Bug 998125] Adds [wm manage|forget] for dockable frames. Finished X11 and Windows code, needs OS X completion.
Diffstat (limited to 'tests/wm.test')
-rw-r--r--tests/wm.test50
1 files changed, 48 insertions, 2 deletions
diff --git a/tests/wm.test b/tests/wm.test
index 39e5596..e5c5aef 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.37 2006/12/28 21:15:14 mdejong Exp $
+# RCS: @(#) $Id: wm.test,v 1.38 2007/10/15 20:52:48 hobbs Exp $
# This file tests window manager interactions that work across
# platforms. Window manager tests that only work on a specific
@@ -47,7 +47,7 @@ test wm-1.1 {Tk_WmObjCmd procedure, miscellaneous errors} {
} {1 {wrong # args: should be "wm option window ?arg ...?"}}
test wm-1.2 {Tk_WmObjCmd procedure, miscellaneous errors} {
list [catch {wm foo} msg] $msg
-} {1 {bad option "foo": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
+} {1 {bad option "foo": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, forget, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, manage, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
test wm-1.3 {Tk_WmObjCmd procedure, miscellaneous errors} {
list [catch {wm command} msg] $msg
} {1 {wrong # args: should be "wm option window ?arg ...?"}}
@@ -2033,6 +2033,52 @@ test wm-deletion-epoch-1.1 {Deletion epoch on multiple displays} -constraints al
wm deiconify $w
} -returnCodes error -result {bad window path name ".t"}
+### Docking test (manage, forget) ###
+test wm-manage-1.1 {} {
+ deleteWindows
+ set result [list]
+ toplevel .t
+ button .t.b -text "Manage This"
+ pack .t.b
+ update
+ lappend result [winfo manage .t.b]
+ lappend result [winfo toplevel .t.b]
+ wm manage .t.b
+ update
+ lappend result [winfo manage .t.b]
+ lappend result [winfo toplevel .t.b]
+ wm forget .t.b
+ pack .t.b
+ update
+ lappend result [winfo manage .t.b]
+ lappend result [winfo toplevel .t.b]
+ set result
+} {pack .t wm .t.b pack .t}
+
+test wm-manage-1.2 {} {
+ deleteWindows
+ set result [list]
+ toplevel .t
+ toplevel .t.t
+ button .t.t.b -text "Manage This"
+ pack .t.t.b
+ update
+ lappend result [winfo manage .t.t]
+ lappend result [winfo toplevel .t.t.b]
+ wm forget .t.t
+ wm forget .t.t ; # second call should be a no-op
+ pack .t.t
+ update
+ lappend result [winfo manage .t.t]
+ lappend result [winfo toplevel .t.t.b]
+ wm manage .t.t
+ wm manage .t.t ; # second call should be a no-op
+ wm deiconify .t.t
+ update
+ lappend result [winfo manage .t.t]
+ lappend result [winfo toplevel .t.t.b]
+} {wm .t.t pack .t wm .t.t}
+
# FIXME:
# Test delivery of virtual events to the WM. We could check to see