diff options
author | fvogel <fvogelnew1@free.fr> | 2018-09-23 20:15:00 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2018-09-23 20:15:00 (GMT) |
commit | ce1fc458c9ce9c755fa91b34ddbe3b4af85a49e2 (patch) | |
tree | 3774f5331e562560595abbf2c6fbcb3db65ff92f | |
parent | 5536df435087a7ece35d42904bf948af3240e7a5 (diff) | |
parent | 92f92ea4339a5946f1fd60897bed4d43ddfe68dc (diff) | |
download | tk-ce1fc458c9ce9c755fa91b34ddbe3b4af85a49e2.zip tk-ce1fc458c9ce9c755fa91b34ddbe3b4af85a49e2.tar.gz tk-ce1fc458c9ce9c755fa91b34ddbe3b4af85a49e2.tar.bz2 |
Merge bugfix branch bug-874dca4873 (scrollbar-10.[12] fail on macOS)
-rw-r--r-- | tests/scrollbar.test | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/tests/scrollbar.test b/tests/scrollbar.test index bd14067..e4fdc0e 100644 --- a/tests/scrollbar.test +++ b/tests/scrollbar.test @@ -632,7 +632,7 @@ test scrollbar-9.1 {scrollbar widget vs hidden commands} { list [winfo children .] [interp hidden] } [list {} $l] -test scrollbar-10.1 {<MouseWheel> event on scrollbar} -constraints {win|unix} -setup { +test scrollbar-10.1.1 {<MouseWheel> event on scrollbar} -constraints {notAqua} -setup { destroy .t .s } -body { pack [text .t -yscrollcommand {.s set}] -side left @@ -646,8 +646,22 @@ test scrollbar-10.1 {<MouseWheel> event on scrollbar} -constraints {win|unix} -s } -cleanup { destroy .t .s } -result {5.0} +test scrollbar-10.1.2 {<MouseWheel> event on scrollbar} -constraints {aqua} -setup { + destroy .t .s +} -body { + pack [text .t -yscrollcommand {.s set}] -side left + for {set i 1} {$i < 100} {incr i} {.t insert end "Line $i\n"} + pack [scrollbar .s -command {.t yview}] -fill y -expand 1 -side left + update + focus -force .s + event generate .s <MouseWheel> -delta -4 + after 200 {set eventprocessed 1} ; vwait eventprocessed + .t index @0,0 +} -cleanup { + destroy .t .s +} -result {5.0} -test scrollbar-10.2 {<MouseWheel> event on scrollbar} -constraints {win|unix} -setup { +test scrollbar-10.2.1 {<MouseWheel> event on scrollbar} -constraints {notAqua} -setup { destroy .t .s } -body { pack [text .t -xscrollcommand {.s set} -wrap none] -side top @@ -661,6 +675,20 @@ test scrollbar-10.2 {<MouseWheel> event on scrollbar} -constraints {win|unix} -s } -cleanup { destroy .t .s } -result {1.4} +test scrollbar-10.2.2 {<MouseWheel> event on scrollbar} -constraints {aqua} -setup { + destroy .t .s +} -body { + pack [text .t -xscrollcommand {.s set} -wrap none] -side top + for {set i 1} {$i < 100} {incr i} {.t insert end "Char $i "} + pack [scrollbar .s -command {.t xview} -orient horizontal] -fill x -expand 1 -side top + update + focus -force .s + event generate .s <Shift-MouseWheel> -delta -4 + after 200 {set eventprocessed 1} ; vwait eventprocessed + .t index @0,0 +} -cleanup { + destroy .t .s +} -result {1.4} test scrollbar-11.1 {bug fix: [011706ec42] Scrollbar unsafe wrt widget destruction} -body { proc destroy_scrollbar {} { |