Mihai, Thanks for taking the effort to figure out how to automate the FlexUnit tests using the new framework. I'm sorry you had to figure it out on your own. However, it did shame me into 'finishing' the Wiki entry on the subject. Maybe you can have a look at it and see if it makes sense from your experience?
https://cwiki.apache.org/confluence/x/c4H_Ag Thanks, EdB On Tue, Jan 6, 2015 at 7:12 PM, Mihai Chira <mih...@apache.org> wrote: > If this bug fix looks all right to everyone, maybe it could be merged > into the release branch? If we're unsure about it, we could wait for > FLEX-34711 to be resolved, so that we can run its unit test in ant (it > passes locally for me, of course). > > On 6 January 2015 at 15:43, <mih...@apache.org> wrote: >> FLEX-34625 >> CAUSE: When focusThickness is set to 0, the BitmapData that >> HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width >> and height, which results in a fatal error. >> SOLUTION: check whether the width and the height of the BitmapData we want >> to construct are 0, and, if so, return. >> >> >> Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo >> Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/685aeb3f >> Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/685aeb3f >> Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/685aeb3f >> >> Branch: refs/heads/develop >> Commit: 685aeb3fc7b5a3e37b7766e7f0ca63af837e8cab >> Parents: 6a031b4 >> Author: Mihai Chira <mih...@apache.org> >> Authored: Tue Jan 6 15:40:45 2015 +0000 >> Committer: Mihai Chira <mih...@apache.org> >> Committed: Tue Jan 6 15:40:45 2015 +0000 >> >> ---------------------------------------------------------------------- >> .../mx/logging/targets/LineFormattedTarget.as | 2 +- >> .../skins/spark/HighlightBitmapCaptureSkin.as | 20 +++++++++++--------- >> 2 files changed, 12 insertions(+), 10 deletions(-) >> ---------------------------------------------------------------------- >> >> >> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/685aeb3f/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as >> ---------------------------------------------------------------------- >> diff --git >> a/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as >> >> b/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as >> index 2e1b328..9f9e230 100644 >> --- >> a/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as >> +++ >> b/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as >> @@ -178,7 +178,7 @@ public class LineFormattedTarget extends AbstractTarget >> */ >> override public function logEvent(event:LogEvent):void >> { >> - var date:String = "" >> + var date:String = ""; >> if (includeDate || includeTime) >> { >> var d:Date = new Date(); >> >> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/685aeb3f/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as >> ---------------------------------------------------------------------- >> diff --git >> a/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as >> >> b/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as >> index 9de2387..077f14a 100644 >> --- >> a/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as >> +++ >> b/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as >> @@ -19,7 +19,7 @@ >> >> package spark.skins.spark >> { >> - >> + >> import flash.display.Bitmap; >> import flash.display.BitmapData; >> import flash.display.DisplayObject; >> @@ -29,15 +29,14 @@ package spark.skins.spark >> import flash.geom.Matrix; >> import flash.geom.Matrix3D; >> import flash.geom.Rectangle; >> - >> + >> import mx.core.UIComponent; >> import mx.core.mx_internal; >> import mx.events.FlexEvent; >> - >> - import spark.components.supportClasses.Skin; >> + >> import spark.components.supportClasses.SkinnableComponent; >> import spark.skins.IHighlightBitmapCaptureClient; >> - >> + >> use namespace mx_internal; >> >> /** >> @@ -161,9 +160,12 @@ package spark.skins.spark >> if (!target) >> return; >> >> - var bitmapData:BitmapData = new BitmapData( >> - target.width + (borderWeight * 2), >> - target.height + (borderWeight * 2), true, 0); >> + var bdWidth:Number = target.width + borderWeight * 2; >> + var bdHeight:Number = target.height + borderWeight * 2; >> + if(bdWidth < 1 || bdHeight < 1) >> + return; >> + >> + var bitmapData:BitmapData = new BitmapData(bdWidth, bdHeight, >> true, 0); >> var m:Matrix = new Matrix(); >> >> capturingBitmap = true; >> @@ -199,7 +201,7 @@ package spark.skins.spark >> catch (e:SecurityError) >> { >> // If capture fails, substitute with a Rect >> - var fillRect:Rectangle >> + var fillRect:Rectangle; >> var skin:DisplayObject = target.skin; >> >> if (skin) >> -- Ix Multimedia Software Jan Luykenstraat 27 3521 VB Utrecht T. 06-51952295 I. www.ixsoftware.nl