[squeak-dev] The Trunk: CollectionsTests-mt.379.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jun 16 13:14:45 UTC 2022


Marcel Taeumel uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-mt.379.mcz

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

Name: CollectionsTests-mt.379
Author: mt
Time: 16 June 2022, 3:14:44.575458 pm
UUID: cbf88333-cada-3f4b-a835-e0464f0fe8ed
Ancestors: CollectionsTests-ct.378

Make #test17ImgTagDataUri compatible with #scaleFactor.

=============== Diff against CollectionsTests-ct.378 ===============

Item was changed:
  ----- Method: HtmlReadWriterTest>>test17ImgTagDataUri (in category 'tests') -----
  test17ImgTagDataUri
  
  	| form |
  	form := Form dotOfSize: 16 color: Color maroon.
  	
  	{
  		'data:image/png;base64,{1}' format: {
  			(ByteArray streamContents: [:stream |
  				PNGReadWriter putForm: form onStream: stream]) base64Encoded}.
  		'data:image/jpeg;base64,{1}' format: {
  			(ByteArray streamContents: [:stream |
  				PNGReadWriter putForm: form onStream: stream]) base64Encoded}.
  	} do: [:uri | | expectedHtml expectedText |
  		expectedHtml := 'Hello <img src="{1}" alt="Red dot" /> World' format: {uri}.
  		expectedText := ('Hello {1} World' format: {Character startOfHeader}) asText
+ 			addAttribute: form scaleIconToDisplay asTextAnchor from: 7 to: 7;
- 			addAttribute: form asTextAnchor from: 7 to: 7;
  			addAttribute: (TextColor color: Color transparent) from: 7 to: 7.
  		
  		self convertHtml: expectedHtml.
  		self assert: expectedText string equals: text string.
  		expectedText runs with: text runs do: [:expectedAttributes :actualAttributes |
  			expectedAttributes with: actualAttributes do: [:expectedAttribute :actualAttribute |
  				self assert: (expectedAttribute = actualAttribute or: [
  					((expectedAttribute respondsTo: #anchoredMorph)
  						and: [actualAttribute respondsTo: #anchoredMorph])
  						and: [(expectedAttribute anchoredMorph "aForm" unhibernate; bits)
  							= (actualAttribute anchoredMorph "aForm" unhibernate; bits)]  ]) ]]].!



More information about the Squeak-dev mailing list