summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2004-09-24 14:43:28 (GMT)
committervincentdarley <vincentdarley>2004-09-24 14:43:28 (GMT)
commit46f87c9b9cda4cba54a8ff5c2bb3125106fe1a3b (patch)
treeab9312a555ad17a539323d76457c691bc01f9490
parent00f74438c9deed2111133ed89d2fedab3ff1990d (diff)
downloadtk-46f87c9b9cda4cba54a8ff5c2bb3125106fe1a3b.zip
tk-46f87c9b9cda4cba54a8ff5c2bb3125106fe1a3b.tar.gz
tk-46f87c9b9cda4cba54a8ff5c2bb3125106fe1a3b.tar.bz2
more robust text widget display tests
-rw-r--r--ChangeLog3
-rw-r--r--tests/textDisp.test12
2 files changed, 9 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 7d2bc60..49e37d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
* library/text.tcl: corrected mousewheel scrolling [Bug 960190]
+ * tests/textDisp.test: made some tests more robust to slowness
+ in asynchronous height calculation callbacks [Bug 1025781]
+
2004-09-24 Pat Thoyts <patthoyts@users.sourceforge.net>
* win/tkWinX.c: Added declaration for advapi32 now that this file
diff --git a/tests/textDisp.test b/tests/textDisp.test
index 2e94e2f..2cbb613 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: textDisp.test,v 1.29 2004/06/24 12:46:30 dkf Exp $
+# RCS: @(#) $Id: textDisp.test,v 1.30 2004/09/24 14:43:30 vincentdarley Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -914,7 +914,7 @@ test textDisp-6.6 {scrolling in DisplayText, Expose events after scroll} {unix n
test textDisp-6.7 {DisplayText, vertical scrollbar updates} {
.t configure -wrap char
.t delete 1.0 end
- update
+ update ; .t count -update -ypixels 1.0 end ; update
set scrollInfo
} {0.0 1.0}
test textDisp-6.8 {DisplayText, vertical scrollbar updates} {
@@ -926,7 +926,7 @@ test textDisp-6.8 {DisplayText, vertical scrollbar updates} {
foreach i {2 3 4 5 6 7 8 9 10 11 12 13} {
.t insert end "\nLine $i"
}
- update
+ update ; .t count -update -ypixels 1.0 end ; update
set scrollInfo
} {0.0 0.769230769231}
.t configure -yscrollcommand {} -xscrollcommand scroll
@@ -1145,7 +1145,7 @@ test textDisp-8.11 {TkTextChanged, scrollbar notification when changes are off-s
.t insert end "a\nb\nc\n"
# We need to wait for our asychronous callbacks to update the
# scrollbar
- update ; after 50; update
+ update ; .t count -update -ypixels 1.0 end ; update
.t configure -yscrollcommand ""
set scrollInfo
} {0.0 0.625}
@@ -2506,7 +2506,7 @@ test textDisp-19.16 {count -ypixels} {
.t insert end "\nThis last line wraps around four "
.t insert end "times with a bit left on the last line."
# Need to update so everything is calculated.
- update
+ update ; .t count -update -ypixels 1.0 end ; update
set res {}
lappend res \
[.t count -ypixels 1.0 end] \
@@ -3548,7 +3548,7 @@ test textDisp-33.3 {one line longer than fits in the widget} {
.tt debug 1
set tk_textHeightCalc ""
.tt insert 1.0 [string repeat "more wrap + " 300]
- after 100 ; update
+ update ; .tt count -update -ypixels 1.0 end ; update
# Each line should have been recalculated just once
.tt debug 0
expr {[llength $tk_textHeightCalc] == [.tt count -displaylines 1.0 end]}