-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #619 from pharo-graphics/618-Bloc-Main-Thread-shou…
…ld-be-stopped-and-restarted-in-shutdownstartup 618-Bloc-Main-Thread-should-be-stopped-and-restarted-in-shutdownstartup
- Loading branch information
Showing
11 changed files
with
234 additions
and
96 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
Class { | ||
#name : #BlSpaceVisibilityTest, | ||
#superclass : #BlParameterizedHostTest, | ||
#category : #'Bloc-Tests-Space' | ||
} | ||
|
||
{ #category : #tests } | ||
BlSpaceVisibilityTest >> testHidingAnOpenSpaceHidesTheWindow [ | ||
|
||
| aSpace | | ||
|
||
Smalltalk vm operatingSystemName = 'unix' ifTrue: [ ^ self skip ]. | ||
|
||
aSpace := self newTestingSpace. | ||
|
||
aSpace show. | ||
self waitTestingOpenedSpaces. | ||
|
||
self assert: aSpace hostSpace isVisible. | ||
|
||
aSpace hide. | ||
|
||
self deny: aSpace hostSpace isVisible. | ||
|
||
] | ||
|
||
{ #category : #tests } | ||
BlSpaceVisibilityTest >> testHidingAndShowingAnOpenSpaceShowsTheWindow [ | ||
|
||
| aSpace | | ||
|
||
Smalltalk vm operatingSystemName = 'unix' ifTrue: [ ^ self skip ]. | ||
|
||
aSpace := self newTestingSpace. | ||
|
||
aSpace show. | ||
self waitTestingOpenedSpaces. | ||
|
||
self assert: aSpace hostSpace isVisible. | ||
|
||
aSpace hide. | ||
|
||
self deny: aSpace hostSpace isVisible. | ||
|
||
aSpace show. | ||
self waitTestingOpenedSpaces. | ||
|
||
self assert: aSpace hostSpace isVisible. | ||
|
||
] |
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,81 @@ | ||
Class { | ||
#name : #BlStartupShutdownTest, | ||
#superclass : #BlParameterizedHostTest, | ||
#category : #'Bloc-Tests-Space' | ||
} | ||
|
||
{ #category : #running } | ||
BlStartupShutdownTest >> runCaseManaged [ | ||
|
||
^ self runCase | ||
] | ||
|
||
{ #category : #tests } | ||
BlStartupShutdownTest >> testShutdownAndStartupKeepsSpacesInSamePosition [ | ||
|
||
| aSpace | | ||
|
||
hostClass = BlMorphicWindowHost ifTrue: [ ^ self skip ]. | ||
Smalltalk vm operatingSystemName = 'unix' ifTrue: [ ^ self skip ]. | ||
|
||
aSpace := self newTestingSpace. | ||
|
||
aSpace show. | ||
self waitTestingOpenedSpaces. | ||
aSpace position: 100@100. | ||
aSpace extent: 200@200. | ||
|
||
self assert: aSpace position equals: 100@100. | ||
self assert: aSpace extent equals: 200@200. | ||
|
||
aSpace universe stopUniverse. | ||
aSpace universe startUniverse. | ||
|
||
self assert: aSpace position equals: 100@100. | ||
self assert: aSpace extent equals: 200@200. | ||
|
||
] | ||
|
||
{ #category : #tests } | ||
BlStartupShutdownTest >> testShutdownAndStartupKeepsSpacesOpen [ | ||
|
||
| aSpace | | ||
|
||
hostClass = BlMorphicWindowHost ifTrue: [ ^ self skip ]. | ||
Smalltalk vm operatingSystemName = 'unix' ifTrue: [ ^ self skip ]. | ||
|
||
aSpace := self newTestingSpace. | ||
|
||
aSpace show. | ||
self waitTestingOpenedSpaces. | ||
self assert: aSpace isVisible. | ||
|
||
aSpace universe stopUniverse. | ||
aSpace universe startUniverse. | ||
|
||
self assert: aSpace isVisible. | ||
|
||
] | ||
|
||
{ #category : #tests } | ||
BlStartupShutdownTest >> testShutdownAndStartupKeepsSpacesOpenWithInvalidation [ | ||
|
||
| aSpace | | ||
|
||
hostClass = BlMorphicWindowHost ifTrue: [ ^ self skip ]. | ||
Smalltalk vm operatingSystemName = 'unix' ifTrue: [ ^ self skip ]. | ||
|
||
aSpace := self newTestingSpace. | ||
|
||
aSpace show. | ||
self waitTestingOpenedSpaces. | ||
self assert: aSpace isVisible. | ||
|
||
aSpace universe stopUniverse. | ||
aSpace hostSpace invalidate. | ||
|
||
aSpace universe startUniverse. | ||
|
||
self assert: aSpace isVisible. | ||
|
||
] |
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
Oops, something went wrong.