-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
383 additions
and
68 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
" | ||
A ToOverlayWindowManagerTest is a test class for testing the behavior of ToOverlayWindowManager | ||
" | ||
Class { | ||
#name : 'ToOverlayWindowManagerTest', | ||
#superclass : 'ToParameterizedHostTest', | ||
#instVars : [ | ||
'space' | ||
], | ||
#category : 'Toplo-Tests-Core-Window', | ||
#package : 'Toplo-Tests', | ||
#tag : 'Core-Window' | ||
} | ||
|
||
{ #category : 'running' } | ||
ToOverlayWindowManagerTest >> setUp [ | ||
|
||
super setUp. | ||
space := self newTestingSpace. | ||
|
||
] | ||
|
||
{ #category : 'tests' } | ||
ToOverlayWindowManagerTest >> testDefaultSizeHook [ | ||
|
||
| e windowManager win | | ||
e := ToElement new. | ||
space root addChild: e. | ||
e position: 10 asPoint. | ||
e size: 10 asPoint. | ||
windowManager := ToOverlayWindowManager new. | ||
windowManager element: e. | ||
self assert: (windowManager defaultSizeHook isKindOf: BlockClosure). | ||
win := windowManager newWindowEvent: nil. | ||
win popup. | ||
self waitTestingSpaces. | ||
self assert: win bounds inSpace extent equals: e bounds inSpace extent | ||
] | ||
|
||
{ #category : 'tests' } | ||
ToOverlayWindowManagerTest >> testElementEventHandlerClass [ | ||
|
||
| win e windowManager | | ||
e := ToElement new. | ||
space root addChild: e. | ||
self waitTestingSpaces. | ||
|
||
windowManager := ToOverlayWindowManager new builder: [ :anchWin :element | ]. | ||
windowManager element: e. | ||
win := windowManager newWindowEvent: nil. | ||
win popup. | ||
self assert: win element equals: e. | ||
self assert: (e eventDispatcher hasEventHandlerSuchThat: [ :eh | | ||
eh isKindOf: ToOverlayedEventHandler ]). | ||
win close. | ||
self assert: (e eventDispatcher hasEventHandlerSuchThat: [ :eh | | ||
eh isKindOf: ToOverlayedEventHandler ]) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters