The Trunk: ToolsTests-eem.78.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: ToolsTests-eem.78.mcz

commits-2
Eliot Miranda uploaded a new version of ToolsTests to project The Trunk:
http://source.squeak.org/trunk/ToolsTests-eem.78.mcz

==================== Summary ====================

Name: ToolsTests-eem.78
Author: eem
Time: 16 November 2016, 6:08:18.241467 pm
UUID: c2486b83-e269-4b69-bd02-9dab4bc49b24
Ancestors: ToolsTests-pre.77

Fix the BrowseTest in the presence of the openToolsAttachedToMouseCursor preference.

=============== Diff against ToolsTests-pre.77 ===============

Item was changed:
  ----- Method: BrowseTest>>testBrowseClass (in category 'testing') -----
  testBrowseClass
  "self debug: #testBrowseClass"
  | browsersBefore browsersAfter opened |
  self ensureMorphic.
 
  browsersBefore := self currentBrowsers.
+ self withImmediatelyOpeningWindowsDo: [1 class browse].
- 1 class browse.
  browsersAfter := self currentBrowsers.
 
  self assert:  (browsersAfter size  = (browsersBefore size + 1)).
  opened := browsersAfter removeAll: browsersBefore; yourself.
  self assert:  (opened size = 1).
  opened := opened asArray first.
  self assert: (opened model selectedClass == SmallInteger).
 
  opened delete
 
 
  !

Item was changed:
  ----- Method: BrowseTest>>testBrowseHierarchyClass (in category 'testing') -----
  testBrowseHierarchyClass
  "self debug: #testBrowseHierarchyClass"
  | browsersBefore browsersAfter opened |
  self ensureMorphic.
 
  browsersBefore := self currentHierarchyBrowsers.
+ self withImmediatelyOpeningWindowsDo: [1 class browseHierarchy].
- 1 class browseHierarchy.
  browsersAfter := self currentHierarchyBrowsers.
 
  self assert:  (browsersAfter size  = (browsersBefore size + 1)).
  opened := browsersAfter removeAll: browsersBefore; yourself.
  self assert:  (opened size = 1).
  opened := opened asArray first.
  self assert: (opened model selectedClass == SmallInteger).
 
  opened delete
 
 
  !

Item was changed:
  ----- Method: BrowseTest>>testBrowseHierarchyInstance (in category 'testing') -----
  testBrowseHierarchyInstance
  "self debug: #testBrowseHierarchyInstance"
  | browsersBefore browsersAfter opened |
  self ensureMorphic.
 
  browsersBefore := self currentHierarchyBrowsers.
+ self withImmediatelyOpeningWindowsDo: [1 browseHierarchy].
- 1 browseHierarchy.
  browsersAfter := self currentHierarchyBrowsers.
 
  self assert:  (browsersAfter size  = (browsersBefore size + 1)).
  opened := browsersAfter removeAll: browsersBefore; yourself.
  self assert:  (opened size = 1).
  opened := opened asArray first.
  self assert: (opened model selectedClass == SmallInteger).
 
  opened delete
 
 
  !

Item was changed:
  ----- Method: BrowseTest>>testBrowseHierarchyMataclass (in category 'testing') -----
  testBrowseHierarchyMataclass
  "self debug: #testBrowseHierarchyMataclass"
  | browsersBefore browsersAfter opened |
  self ensureMorphic.
 
  browsersBefore := self currentHierarchyBrowsers.
+ self withImmediatelyOpeningWindowsDo: [1 class class browseHierarchy].
- 1 class class browseHierarchy.
  browsersAfter := self currentHierarchyBrowsers.
 
  self assert:  (browsersAfter size  = (browsersBefore size + 1)).
  opened := browsersAfter removeAll: browsersBefore; yourself.
  self assert:  (opened size = 1).
  opened := opened asArray first.
  self assert: (opened model selectedClass == Metaclass).
 
  opened delete
 
 
  !

Item was changed:
  ----- Method: BrowseTest>>testBrowseInstance (in category 'testing') -----
  testBrowseInstance
  "self debug: #testBrowseInstance"
  | browsersBefore browsersAfter opened |
  self ensureMorphic.
 
  browsersBefore := self currentBrowsers.
+ self withImmediatelyOpeningWindowsDo: [1 browse].
- 1 browse.
  browsersAfter := self currentBrowsers.
 
  self assert:  (browsersAfter size  = (browsersBefore size + 1)).
  opened := browsersAfter removeAll: browsersBefore; yourself.
  self assert:  (opened size = 1).
  opened := opened asArray first.
  self assert: (opened model selectedClass == SmallInteger).
 
  opened delete
 
 
  !

Item was changed:
  ----- Method: BrowseTest>>testBrowseMetaclass (in category 'testing') -----
  testBrowseMetaclass
  "self debug: #testBrowseMetaclass"
  | browsersBefore browsersAfter opened |
  self ensureMorphic.
 
  browsersBefore := self currentBrowsers.
+ self withImmediatelyOpeningWindowsDo: [1 class class browse].
- 1 class class browse.
  browsersAfter := self currentBrowsers.
 
  self assert:  (browsersAfter size  = (browsersBefore size + 1)).
  opened := browsersAfter removeAll: browsersBefore; yourself.
  self assert:  (opened size = 1).
  opened := opened asArray first.
  self assert: (opened model selectedClass == SmallInteger).
 
  opened delete
 
 
  !

Item was added:
+ ----- Method: BrowseTest>>withImmediatelyOpeningWindowsDo: (in category 'private') -----
+ withImmediatelyOpeningWindowsDo: aBlock
+ "Turn off any preferences that defer to the user to open a window."
+ | openToolsAttachedToMouseCursor |
+ (UIManager default respondsTo: #openToolsAttachedToMouseCursor:) ifFalse:
+ [^aBlock value].
+
+ openToolsAttachedToMouseCursor := UIManager default openToolsAttachedToMouseCursor.
+ UIManager default openToolsAttachedToMouseCursor: false.
+ ^aBlock ensure:
+ [UIManager default openToolsAttachedToMouseCursor: openToolsAttachedToMouseCursor]!