diff options
author | culler <culler> | 2021-04-25 15:36:39 (GMT) |
---|---|---|
committer | culler <culler> | 2021-04-25 15:36:39 (GMT) |
commit | 79f3f632a93e76d6d696ae190b69c030f3bc3821 (patch) | |
tree | 0da304ded357d2e48537143b60eff28fa654114e /tests | |
parent | 8822888c8757a09d5a6322d1458512095ac1f2f0 (diff) | |
download | tk-79f3f632a93e76d6d696ae190b69c030f3bc3821.zip tk-79f3f632a93e76d6d696ae190b69c030f3bc3821.tar.gz tk-79f3f632a93e76d6d696ae190b69c030f3bc3821.tar.bz2 |
Using the CALayer changes some timings -- make some small adjustments to a few tests to avoid sporadic timing-related failures.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/entry.test | 1 | ||||
-rw-r--r-- | tests/font.test | 6 | ||||
-rw-r--r-- | tests/textWind.test | 10 | ||||
-rw-r--r-- | tests/unixEmbed.test | 1 |
4 files changed, 12 insertions, 6 deletions
diff --git a/tests/entry.test b/tests/entry.test index ef70a9e..a72d36a 100644 --- a/tests/entry.test +++ b/tests/entry.test @@ -2968,6 +2968,7 @@ test entry-17.2 {EntryUpdateScrollbar procedure} -body { test entry-17.3 {EntryUpdateScrollbar procedure} -body { entry .e -width 10 -xscrollcommand scroll -font {Courier -12} pack .e + update idletasks set timeout [after 500 {set scrollInfo {-1000000 -1000000}}] .e insert 0 abcdefghijklmnopqrs .e xview 6 diff --git a/tests/font.test b/tests/font.test index 6995a7b..5af2dbb 100644 --- a/tests/font.test +++ b/tests/font.test @@ -523,16 +523,16 @@ test font-12.2 {UpdateDependantFonts procedure: pings the widgets} -setup { destroy .t.f catch {font delete xyz} pack [label .t.f] - update + update idletasks } -body { font create xyz -family times -size 20 .t.f config -font xyz -text "abcd" -padx 0 -bd 0 -highlightthickness 0 set a1 [font measure xyz "abcd"] - update + update idletasks set b1 [winfo reqwidth .t.f] font configure xyz -family helvetica -size 20 set a2 [font measure xyz "abcd"] - update + update idletasks set b2 [winfo reqwidth .t.f] expr {$a1==$b1 && $a2==$b2} } -cleanup { diff --git a/tests/textWind.test b/tests/textWind.test index a11a418..11f8eb8 100644 --- a/tests/textWind.test +++ b/tests/textWind.test @@ -1526,13 +1526,15 @@ test textWind-17.9 {peer widget window configuration} -setup { destroy .t .tt } -body { pack [text .t] + update idletasks .t delete 1.0 end .t insert 1.0 "Some sample text" toplevel .tt pack [.t peer create .tt.t] + update idletasks .t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue] - update ; update .tt.t window configure 1.2 -window [frame .tt.t.f -width 10 -height 20 -bg red] + update idletasks list [.t window configure 1.2 -window] [.tt.t window configure 1.2 -window] } -cleanup { destroy .tt .t @@ -1542,20 +1544,22 @@ test textWind-17.10 {peer widget window configuration} -setup { destroy .t .tt } -body { pack [text .t] + update idletasks .t delete 1.0 end .t insert 1.0 "Some sample text" toplevel .tt pack [.t peer create .tt.t] + update idletasks .t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue] .tt.t window create 1.2 -window [frame .tt.t.f -width 25 -height 20 -bg blue] - update ; update + update idletasks .t window configure 1.2 -create \ {destroy %W.f ; frame %W.f -width 50 -height 7 -bg red} .tt.t window configure 1.2 -window {} .t window configure 1.2 -window {} set res [list [.t window configure 1.2 -window] \ [.tt.t window configure 1.2 -window]] - update + update idletasks lappend res [.t window configure 1.2 -window] \ [.tt.t window configure 1.2 -window] } -cleanup { diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test index bb7edc5..d5f6ee3 100644 --- a/tests/unixEmbed.test +++ b/tests/unixEmbed.test @@ -1301,6 +1301,7 @@ test unixEmbed-11.2 {mouse coordinates in embedded toplevels} -constraints { wm geometry .main 200x400+100+100 update idletasks focus -force .main + after 100 set x [expr {[winfo x .main ] + [winfo x .main.b] + 40}] set y [expr {[winfo y .main ] + [winfo y .main.b] + 38}] lappend result [winfo containing $x $y] |