summaryrefslogtreecommitdiffstats
path: root/tests/focus.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/focus.test')
-rw-r--r--tests/focus.test27
1 files changed, 9 insertions, 18 deletions
diff --git a/tests/focus.test b/tests/focus.test
index 45cf73b..3a71d3a 100644
--- a/tests/focus.test
+++ b/tests/focus.test
@@ -16,7 +16,7 @@ proc focusSetup {} {
toplevel .t
wm geom .t +0+0
foreach i {b1 b2 b3 b4} {
- button .t.$i -text .t.$i -relief raised -bd 2
+ button .t.$i -text .t.$i -relief raised -borderwidth 2
pack .t.$i
}
tkwait visibility .t.b4
@@ -26,7 +26,7 @@ proc focusSetupAlt {} {
destroy .alt
toplevel .alt -screen $env(TK_ALT_DISPLAY)
foreach i {a b c d} {
- button .alt.$i -text .alt.$i -relief raised -bd 2
+ button .alt.$i -text .alt.$i -relief raised -borderwidth 2
pack .alt.$i
}
tkwait visibility .alt.d
@@ -47,9 +47,8 @@ proc focusClear {} {
update
}
-
# Button used in some tests in the whole test file
-button .b -text .b -relief raised -bd 2
+button .b -text .b -relief raised -borderwidth 2
pack .b
# Make sure the window manager knows who has focus
@@ -72,7 +71,6 @@ if {[testConstraint altDisplay]} {
focusSetupAlt
}
-
test focus-1.1 {Tk_FocusCmd procedure} -constraints unix -body {
focusClear
focus
@@ -111,8 +109,8 @@ test focus-1.8 {Tk_FocusCmd procedure, focussing on dead window} -constraints {
focusClear
toplevel .t2
wm geom .t2 +10+10
- frame .t2.f -width 200 -height 100 -bd 2 -relief raised
- frame .t2.f2 -width 200 -height 100 -bd 2 -relief raised
+ frame .t2.f -width 200 -height 100 -borderwidth 2 -relief raised
+ frame .t2.f2 -width 200 -height 100 -borderwidth 2 -relief raised
pack .t2.f .t2.f2
bind .t2.f <Destroy> {focus .t2.f}
bind .t2.f2 <Destroy> {focus .t2}
@@ -220,7 +218,6 @@ test focus-1.25 {Tk_FocusCmd procedure} -constraints unix -body {
focus -unknown
} -returnCodes error -result {bad option "-unknown": must be -displayof, -force, or -lastfor}
-
focusSetup
test focus-2.1 {TkFocusFilterEvent procedure} -constraints {
unix nonPortable testwrapper
@@ -455,7 +452,6 @@ test focus-2.17 {TkFocusFilterEvent procedure, Leave events} -constraints {
out .t NotifyVirtual
} {}}
-
test focus-3.1 {SetFocus procedure, create record on focus} -constraints {
unix testwrapper
} -body {
@@ -546,7 +542,6 @@ unix nonPortable testwrapper
return $focusInfo
} -result {}
-
test focus-4.1 {TkFocusDeadWindow procedure} -constraints {
unix testwrapper
} -body {
@@ -593,7 +588,6 @@ test focus-4.4 {TkFocusDeadWindow procedure} -constraints {
} -result {.t}
cleanupbg
-
# I don't know how to test most of the remaining procedures of this file
# explicitly; they've already been exercised by the preceding tests.
@@ -619,7 +613,6 @@ bind all <FocusIn> {}
bind all <FocusOut> {}
bind all <KeyPress> {}
-
fixfocus
test focus-6.1 {miscellaneous - embedded application in same process} -constraints {
unix testwrapper
@@ -631,7 +624,7 @@ test focus-6.1 {miscellaneous - embedded application in same process} -constrain
frame .t.f1 -container 1
frame .t.f2
pack .t.f1 .t.f2
- entry .t.f2.e1 -bg red
+ entry .t.f2.e1 -background red
pack .t.f2.e1
bind all <FocusIn> {lappend x "focus in %W %d"}
bind all <FocusOut> {lappend x "focus out %W %d"}
@@ -639,7 +632,7 @@ test focus-6.1 {miscellaneous - embedded application in same process} -constrain
child eval "set argv {-use [winfo id .t.f1]}"
load {} Tk child
child eval {
- entry .e1 -bg lightBlue
+ entry .e1 -background lightBlue
pack .e1
bind all <FocusIn> {lappend x "focus in %W %d"}
bind all <FocusOut> {lappend x "focus out %W %d"}
@@ -686,13 +679,13 @@ test focus-6.2 {miscellaneous - embedded application in different process} -cons
frame .t.f1 -container 1
frame .t.f2
pack .t.f1 .t.f2
- entry .t.f2.e1 -bg red
+ entry .t.f2.e1 -background red
pack .t.f2.e1
bind all <FocusIn> {lappend x "focus in %W %d"}
bind all <FocusOut> {lappend x "focus out %W %d"}
setupbg -use [winfo id .t.f1]
dobg {
- entry .e1 -bg lightBlue
+ entry .e1 -background lightBlue
pack .e1
bind all <FocusIn> {lappend x "focus in %W %d"}
bind all <FocusOut> {lappend x "focus out %W %d"}
@@ -730,8 +723,6 @@ test focus-6.2 {miscellaneous - embedded application in different process} -cons
bind all <FocusOut> {}
} -result {{.t.f2.e1 {} {focus out .t.f2.e1 NotifyNonlinear} {focus out .t.f2 NotifyNonlinearVirtual} {focus in .t.f1 NotifyNonlinear} | {focus out .t.f1 NotifyNonlinear} {focus in .t.f2 NotifyNonlinearVirtual} {focus in .t.f2.e1 NotifyNonlinear}} {{focus in . NotifyVirtual} {focus in .e1 NotifyAncestor} | {focus out .e1 NotifyAncestor} {focus out . NotifyVirtual}}}
-
-
deleteWindows
# cleanup