summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorculler <culler>2019-01-23 17:45:28 (GMT)
committerculler <culler>2019-01-23 17:45:28 (GMT)
commit375b837a661f0c2f82e6fc3c530261fedbf065d2 (patch)
tree8dd8870204f6bb185095cebc1041da2f06cd9ed4 /tests
parent3aad3f0079a265973e03eb8bf7f2d6c0b31beb96 (diff)
downloadtk-375b837a661f0c2f82e6fc3c530261fedbf065d2.zip
tk-375b837a661f0c2f82e6fc3c530261fedbf065d2.tar.gz
tk-375b837a661f0c2f82e6fc3c530261fedbf065d2.tar.bz2
Fix bug [58665b91dd]: unixEmbed tests fail on macOS due to use of dobg.
Diffstat (limited to 'tests')
-rw-r--r--tests/unixEmbed.test619
1 files changed, 576 insertions, 43 deletions
diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test
index 8aaa3c4..0894365 100644
--- a/tests/unixEmbed.test
+++ b/tests/unixEmbed.test
@@ -1,4 +1,4 @@
-# This file is a Tcl script to test out the procedures in the file
+# This file is a Tcl script to test out the procedures in the file
# tkUnixEmbed.c. It is organized in the standard fashion for Tcl
# tests.
#
@@ -55,14 +55,14 @@ proc colorsFree {w {red 31} {green 245} {blue 192}} {
}
test unixEmbed-1.1 {TkpUseWindow procedure, bad window identifier} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
toplevel .t -use xyz
} -returnCodes error -result {expected integer but got "xyz"}
test unixEmbed-1.2 {TkpUseWindow procedure, bad window identifier} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -97,7 +97,7 @@ test unixEmbed-1.4 {TkpUseWindow procedure, inheriting colormap} -constraints {
} -result {1}
test unixEmbed-1.5 {TkpUseWindow procedure, creating Container records} -constraints {
- unix testembed
+ unix testembed notAqua
} -setup {
deleteWindows
} -body {
@@ -113,8 +113,29 @@ test unixEmbed-1.5 {TkpUseWindow procedure, creating Container records} -constra
} -cleanup {
deleteWindows
} -result {{{XXX {} {} .t}} 0}
+test unixEmbed-1.5a {TkpUseWindow procedure, creating Container records} -constraints {
+ unix testembed
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ frame .f2 -container 1 -width 200 -height 50
+ pack .f1 .f2
+ slave alias w winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t -use [w]
+ list [testembed] [expr {[lindex [lindex [testembed all] 0] 0] - [w]}]
+ }
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {{{XXX {} {} .t}} 0}
test unixEmbed-1.6 {TkpUseWindow procedure, creating Container records} -constraints {
- unix testembed
+ unix testembed notAqua
} -setup {
deleteWindows
} -body {
@@ -132,6 +153,29 @@ test unixEmbed-1.6 {TkpUseWindow procedure, creating Container records} -constra
} -cleanup {
deleteWindows
} -result {{XXX {} {} .t2} {XXX {} {} .t1}}
+test unixEmbed-1.6a {TkpUseWindow procedure, creating Container records} -constraints {
+ unix testembed
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ frame .f2 -container 1 -width 200 -height 50
+ pack .f1 .f2
+ slave alias w1 winfo id .f1
+ slave alias w2 winfo id .f2
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ toplevel .t2 -use [w2]
+ testembed
+ }
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {{XXX {} {} .t2} {XXX {} {} .t1}}
test unixEmbed-1.7 {TkpUseWindow procedure, container and embedded in same app} -constraints {
unix testembed
} -setup {
@@ -152,7 +196,7 @@ test unixEmbed-1.7 {TkpUseWindow procedure, container and embedded in same app}
test unixEmbed-2.1 {EmbeddedEventProc procedure} -constraints {
- unix testembed
+ unix testembed notAqua
} -setup {
deleteWindows
} -body {
@@ -172,8 +216,32 @@ test unixEmbed-2.1 {EmbeddedEventProc procedure} -constraints {
} -cleanup {
deleteWindows
} -result {}
+test unixEmbed-2.1a {EmbeddedEventProc procedure} -constraints {
+ unix testembed
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ testembed
+ }
+ destroy .f1
+ update
+ slave eval {
+ testembed
+ }
+} -cleanup {
+ deleteWindows
+} -result {}
test unixEmbed-2.2 {EmbeddedEventProc procedure} -constraints {
- unix testembed
+ unix testembed notAqua
} -setup {
deleteWindows
} -body {
@@ -190,8 +258,30 @@ test unixEmbed-2.2 {EmbeddedEventProc procedure} -constraints {
} -cleanup {
deleteWindows
} -result {}
+test unixEmbed-2.2a {EmbeddedEventProc procedure} -constraints {
+ unix testembed
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ testembed
+ destroy .t1
+ testembed
+ }
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {}
test unixEmbed-2.3 {EmbeddedEventProc procedure} -constraints {
- unix testembed
+ unix testembed notAqua
} -setup {
deleteWindows
} -body {
@@ -202,26 +292,30 @@ test unixEmbed-2.3 {EmbeddedEventProc procedure} -constraints {
destroy .f1
testembed
} -result {}
+if {[tk windowingsystem] eq "aqua"} {
+ set wrapperId {{}}
+} else {
+ set wrapperId XXX
+}
test unixEmbed-2.4 {EmbeddedEventProc procedure} -constraints {
unix testembed
} -setup {
deleteWindows
} -body {
- frame .f1 -container 1 -width 200 -height 50
- pack .f1
+ pack [frame .f1 -container 1 -width 200 -height 50]
toplevel .t1 -use [winfo id .f1]
+ set x [testembed]
update
destroy .t1
- set x [testembed]
update
- list $x [testembed]
+ list $x [winfo exists .t1] [winfo exists .f1] [testembed]
} -cleanup {
deleteWindows
-} -result {{{XXX .f1 {} {}}} {}}
+} -result "{{XXX .f1 $wrapperId .t1}} 0 0 {}"
test unixEmbed-3.1 {ContainerEventProc procedure, detect creation} -constraints {
- unix testembed nonPortable
+ unix testembed notPortable
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
@@ -236,21 +330,44 @@ test unixEmbed-3.1 {ContainerEventProc procedure, detect creation} -constraints
} -cleanup {
deleteWindows
} -result {{{XXX .f1 {} {}}} {{XXX .f1 XXX {}}}}
+test unixEmbed-3.1a {ContainerEventProc procedure, detect creation} -constraints {
+ unix testembed
+} -setup {
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ set x [testembed]
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ wm withdraw .t1
+ }
+ list $x [testembed]
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {{{XXX .f1 {} {}}} {{XXX .f1 {} {}}}}
test unixEmbed-3.2 {ContainerEventProc procedure, set size on creation} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
toplevel .t1 -container 1
wm geometry .t1 +0+0
toplevel .t2 -use [winfo id .t1] -bg red
- update
+ while {[winfo exists .t2] == 0} {
+ update
+ }
wm geometry .t2
} -cleanup {
deleteWindows
} -result {200x200+0+0}
test unixEmbed-3.3 {ContainerEventProc procedure, disallow position changes} -constraints {
- unix
+ unix notAqua
} -setup {
deleteWindows
} -body {
@@ -270,8 +387,31 @@ test unixEmbed-3.3 {ContainerEventProc procedure, disallow position changes} -co
} -cleanup {
deleteWindows
} -result {200x200+0+0}
+test unixEmbed-3.3a {ContainerEventProc procedure, disallow position changes} -constraints {
+ unix
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1] -bd 2 -relief raised
+ update
+ wm geometry .t1 +30+40
+ update
+ wm geometry .t1
+ }
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {200x200+0+0}
test unixEmbed-3.4 {ContainerEventProc procedure, disallow position changes} -constraints {
- unix
+ unix notAqua
} -setup {
deleteWindows
} -body {
@@ -291,8 +431,31 @@ test unixEmbed-3.4 {ContainerEventProc procedure, disallow position changes} -co
} -cleanup {
deleteWindows
} -result {300x100+0+0}
+test unixEmbed-3.4a {ContainerEventProc procedure, disallow position changes} -constraints {
+ unix
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ update
+ wm geometry .t1 300x100+30+40
+ update
+ wm geometry .t1
+ }
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {300x100+0+0}
test unixEmbed-3.5 {ContainerEventProc procedure, geometry requests} -constraints {
- unix
+ unix notAqua
} -setup {
deleteWindows
} -body {
@@ -312,8 +475,30 @@ test unixEmbed-3.5 {ContainerEventProc procedure, geometry requests} -constraint
} -cleanup {
deleteWindows
} -result {300 80 300x80+0+0}
+test unixEmbed-3.5a {ContainerEventProc procedure, geometry requests} -constraints {
+ unix
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ .t1 configure -width 300 -height 80
+ update
+ }
+ list [winfo width .f1] [winfo height .f1] [slave eval {wm geometry .t1}]
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {300 80 300x80+0+0}
test unixEmbed-3.6 {ContainerEventProc procedure, map requests} -constraints {
- unix
+ unix notAqua
} -setup {
deleteWindows
} -body {
@@ -335,8 +520,33 @@ test unixEmbed-3.6 {ContainerEventProc procedure, map requests} -constraints {
} -cleanup {
deleteWindows
} -result {mapped}
+test unixEmbed-3.6a {ContainerEventProc procedure, map requests} -constraints {
+ unix
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ set x unmapped
+ bind .t1 <Map> {set x mapped}
+ update
+ after 100
+ update
+ set x
+ }
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {mapped}
test unixEmbed-3.7 {ContainerEventProc procedure, destroy events} -constraints {
- unix
+ unix notAqua
} -setup {
deleteWindows
} -body {
@@ -358,10 +568,34 @@ test unixEmbed-3.7 {ContainerEventProc procedure, destroy events} -constraints {
} -cleanup {
deleteWindows
} -result {dead 0}
-
+test unixEmbed-3.7a {ContainerEventProc procedure, destroy events} -constraints {
+ unix
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ bind .f1 <Destroy> {set x dead}
+ set x alive
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ update
+ destroy .t1
+ }
+ update
+ list $x [winfo exists .f1]
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {dead 0}
test unixEmbed-4.1 {EmbedStructureProc procedure, configure events} -constraints {
- unix
+ unix notAqua
} -setup {
deleteWindows
} -body {
@@ -383,8 +617,31 @@ test unixEmbed-4.1 {EmbedStructureProc procedure, configure events} -constraints
} -cleanup {
deleteWindows
} -result {180x100+0+0}
+test unixEmbed-4.1a {EmbedStructureProc procedure, configure events} -constraints {
+ unix
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ update
+ .t1 configure -width 180 -height 100
+ update
+ winfo geometry .t1
+ }
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {180x100+0+0}
test unixEmbed-4.2 {EmbedStructureProc procedure, destroy events} -constraints {
- unix testembed
+ unix testembed notAqua
} -setup {
deleteWindows
} -body {
@@ -398,14 +655,38 @@ test unixEmbed-4.2 {EmbedStructureProc procedure, destroy events} -constraints {
update
set x [testembed]
destroy .f1
+ update
list $x [testembed]
} -cleanup {
deleteWindows
} -result {{{XXX .f1 XXX {}}} {}}
+test unixEmbed-4.2a {EmbedStructureProc procedure, destroy events} -constraints {
+ unix testembed
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ update
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ }
+ set x [testembed]
+ destroy .f1
+ list $x [testembed]
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result "{{XXX .f1 {} {}}} {}"
test unixEmbed-5.1 {EmbedFocusProc procedure, FocusIn events} -constraints {
- unix
+ unix notAqua
} -setup {
deleteWindows
} -body {
@@ -425,8 +706,33 @@ test unixEmbed-5.1 {EmbedFocusProc procedure, FocusIn events} -constraints {
} -cleanup {
deleteWindows
} -result {{focus in .t1}}
+test unixEmbed-5.1a {EmbedFocusProc procedure, FocusIn events} -constraints {
+ unix
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ bind .t1 <FocusIn> {lappend x "focus in %W"}
+ bind .t1 <FocusOut> {lappend x "focus out %W"}
+ set x {}
+ }
+ focus -force .f1
+ update
+ slave eval {set x}
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {{focus in .t1}}
test unixEmbed-5.2 {EmbedFocusProc procedure, focusing on dead window} -constraints {
- unix
+ unix notAqua
} -setup {
deleteWindows
} -body {
@@ -447,8 +753,32 @@ test unixEmbed-5.2 {EmbedFocusProc procedure, focusing on dead window} -constrai
} -cleanup {
deleteWindows
} -result {}
+test unixEmbed-5.2a {EmbedFocusProc procedure, focusing on dead window} -constraints {
+ unix
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ update
+ after 200 {destroy .t1}
+ }
+ after 400
+ focus -force .f1
+ update
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {}
test unixEmbed-5.3 {EmbedFocusProc procedure, FocusOut events} -constraints {
- unix
+ unix notAqua
} -setup {
deleteWindows
} -body {
@@ -471,10 +801,39 @@ test unixEmbed-5.3 {EmbedFocusProc procedure, FocusOut events} -constraints {
} -cleanup {
deleteWindows
} -result {{{focus in .t1}} {{focus in .t1} {focus out .t1}}}
+test unixEmbed-5.3a {EmbedFocusProc procedure, FocusOut events} -constraints {
+ unix
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ set x {}
+ bind .t1 <FocusIn> {lappend x "focus in %W"}
+ bind .t1 <FocusOut> {lappend x "focus out %W"}
+ update
+ }
+ focus -force .f1
+ update
+ set x [slave eval {update; set x }]
+ focus .
+ update
+ list $x [slave eval {update; set x}]
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {{{focus in .t1}} {{focus in .t1} {focus out .t1}}}
test unixEmbed-6.1 {EmbedGeometryRequest procedure, window changes size} -constraints {
- unix
+ unix notAqua
} -setup {
deleteWindows
} -body {
@@ -496,8 +855,33 @@ test unixEmbed-6.1 {EmbedGeometryRequest procedure, window changes size} -constr
} -cleanup {
deleteWindows
} -result {{{configure .t1 300 120}} 300x120+0+0}
+test unixEmbed-6.1a {EmbedGeometryRequest procedure, window changes size} -constraints {
+ unix
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ update
+ bind .t1 <Configure> {lappend x {configure .t1 %w %h}}
+ set x {}
+ .t1 configure -width 300 -height 120
+ update
+ list $x [winfo geom .t1]
+ }
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {{{configure .t1 300 120}} 300x120+0+0}
test unixEmbed-6.2 {EmbedGeometryRequest procedure, window changes size} -constraints {
- unix
+ unix notAqua
} -setup {
deleteWindows
} -body {
@@ -514,18 +898,47 @@ test unixEmbed-6.2 {EmbedGeometryRequest procedure, window changes size} -constr
bind .t1 <Configure> {lappend x {configure .t1 %w %h}}
set x {}
.t1 configure -width 300 -height 120
- update
+ after 300 {set y done}
+ vwait y
list $x [winfo geom .t1]
}
} -cleanup {
deleteWindows
} -result {{{configure .t1 200 200}} 200x200+0+0}
+test unixEmbed-6.2a {EmbedGeometryRequest procedure, window changes size} -constraints {
+ unix
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ place .f1 -width 200 -height 200
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ }
+ after 300 {set x done}
+ vwait x
+ slave eval {
+ bind .t1 <Configure> {lappend x {configure .t1 %w %h}}
+ update
+ set x {}
+ .t1 configure -width 300 -height 120
+ update
+ list $x [winfo geom .t1]
+ }
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {{{configure .t1 200 200}} 200x200+0+0}
# Can't think up any tests for TkpGetOtherWindow procedure.
-
test unixEmbed-7.1 {TkpRedirectKeyEvent procedure, forward keystroke} -constraints {
- unix
+ unix notAqua
} -setup {
deleteWindows
} -body {
@@ -553,8 +966,41 @@ test unixEmbed-7.1 {TkpRedirectKeyEvent procedure, forward keystroke} -constrain
deleteWindows
bind . <KeyPress> {}
} -result {{{key a 1}} {}}
+test unixEmbed-7.1a {TkpRedirectKeyEvent procedure, forward keystroke} -constraints {
+ unix
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ deleteWindows
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ }
+ focus -force .
+ bind . <KeyPress> {lappend x {key %A %E}}
+ set x {}
+ set y [slave eval {
+ update
+ bind .t1 <KeyPress> {lappend y {key %A}}
+ set y {}
+ event generate .t1 <KeyPress> -keysym a
+ set y
+ }]
+ update
+ list $x $y
+} -cleanup {
+ interp delete slave
+ deleteWindows
+ bind . <KeyPress> {}
+} -result {{{key a 1}} {}}
test unixEmbed-7.2 {TkpRedirectKeyEvent procedure, don't forward keystroke width} -constraints {
- unix
+ unix notAqua
} -setup {
deleteWindows
} -body {
@@ -583,9 +1029,44 @@ test unixEmbed-7.2 {TkpRedirectKeyEvent procedure, don't forward keystroke width
deleteWindows
bind . <KeyPress> {}
} -result {{} {{key b}}}
+test unixEmbed-7.2a {TkpRedirectKeyEvent procedure, don't forward keystroke width} -constraints {
+ unix
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1]
+ }
+ update
+ focus -force .f1
+ update
+ bind . <KeyPress> {lappend x {key %A}}
+ set x {}
+ set y [slave eval {
+ update
+ bind .t1 <KeyPress> {lappend y {key %A}}
+ set y {}
+ event generate .t1 <KeyPress> -keysym b
+ set y
+ }]
+ update
+ list $x $y
+} -cleanup {
+ interp delete slave
+ deleteWindows
+ bind . <KeyPress> {}
+} -result {{} {{key b}}}
-
-test unixEmbed-8.1 {TkpClaimFocus procedure} -constraints unix -setup {
+test unixEmbed-8.1 {TkpClaimFocus procedure} -constraints {
+ unix notAqua
+} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
@@ -609,15 +1090,44 @@ test unixEmbed-8.1 {TkpClaimFocus procedure} -constraints unix -setup {
} -cleanup {
deleteWindows
} -result {{{} .t1} .f1}
-test unixEmbed-8.2 {TkpClaimFocus procedure} -constraints unix -setup {
- deleteWindows
- catch {interp delete child}
+test unixEmbed-8.1a {TkpClaimFocus procedure} -constraints unix -setup {
deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
} -body {
frame .f1 -container 1 -width 200 -height 50
frame .f2 -width 200 -height 50
pack .f1 .f2
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1] -highlightthickness 2 -bd 2 -relief sunken
+ }
+ focus -force .f2
+ update
+ list [slave eval {
+ focus .t1
+ set x [list [focus]]
+ update
+ after 500
+ update
+ lappend x [focus]
+ }] [focus]
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {{{} .t1} .f1}
+test unixEmbed-8.2 {TkpClaimFocus procedure} -constraints unix -setup {
+ deleteWindows
+ catch {interp delete child}
interp create child
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ frame .f2 -width 200 -height 50
+ pack .f1 .f2
+ update
+ set w1 [winfo id .f1]
child eval "set argv {-use [winfo id .f1]}"
load {} Tk child
child eval {
@@ -636,7 +1146,6 @@ test unixEmbed-8.2 {TkpClaimFocus procedure} -constraints unix -setup {
} -result {{{} .} .f1}
catch {interp delete child}
-
test unixEmbed-9.1 {EmbedWindowDeleted procedure, check parentPtr} -constraints {
unix testembed
} -setup {
@@ -658,12 +1167,13 @@ test unixEmbed-9.1 {EmbedWindowDeleted procedure, check parentPtr} -constraints
deleteWindows
} -result {{{XXX .f4 {} {}} {XXX .f3 {} {}} {XXX .f2 {} {}} {XXX .f1 {} {}}} {{XXX .f4 {} {}} {XXX .f2 {} {}} {XXX .f1 {} {}}} {{XXX .f2 {} {}} {XXX .f1 {} {}}} {{XXX .f2 {} {}}} {}}
test unixEmbed-9.2 {EmbedWindowDeleted procedure, check embeddedPtr} -constraints {
- unix testembed
+ unix testembed notAqua
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
+ update
dobg "set w1 [winfo id .f1]"
dobg {
eval destroy [winfo child .]
@@ -676,15 +1186,39 @@ test unixEmbed-9.2 {EmbedWindowDeleted procedure, check embeddedPtr} -constraint
} -cleanup {
deleteWindows
} -result {{{XXX {} {} .t1}} {}}
+test unixEmbed-9.2a {EmbedWindowDeleted procedure, check embeddedPtr} -constraints {
+ unix testembed
+} -setup {
+ deleteWindows
+ catch {interp delete slave}
+ interp create slave
+ load {} Tktest slave
+} -body {
+ frame .f1 -container 1 -width 200 -height 50
+ pack .f1
+ slave alias w1 winfo id .f1
+ slave eval {
+ destroy [winfo child .]
+ toplevel .t1 -use [w1] -highlightthickness 2 -bd 2 -relief sunken
+ set x {}
+ lappend x [testembed]
+ destroy .t1
+ lappend x [testembed]
+ }
+} -cleanup {
+ interp delete slave
+ deleteWindows
+} -result {{{XXX {} {} .t1}} {}}
test unixEmbed-10.1 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
+ update
toplevel .t1 -use [winfo id .f1] -width 150 -height 80
update
wm geometry .t1 +40+50
@@ -694,7 +1228,7 @@ test unixEmbed-10.1 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -con
deleteWindows
} -result {150x80+0+0}
test unixEmbed-10.2 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -714,4 +1248,3 @@ deleteWindows
cleanupbg
cleanupTests
return
-