You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by mi...@apache.org on 2015/01/21 12:53:56 UTC

git commit: [flex-sdk] [refs/heads/develop] - FLEX-34625 Adding some asserts in order to debug the type of UIImpersonator.testDisplay, which seems to be different than when the test runs locally.

Repository: flex-sdk
Updated Branches:
  refs/heads/develop 5762e7355 -> e11ab8a72


FLEX-34625 Adding some asserts in order to debug the type of UIImpersonator.testDisplay, which seems to be different than when the test runs locally.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/e11ab8a7
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/e11ab8a7
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/e11ab8a7

Branch: refs/heads/develop
Commit: e11ab8a724a23930f3219c00d23e6f3b91979f1a
Parents: 5762e73
Author: Mihai Chira <mi...@apache.org>
Authored: Wed Jan 21 11:52:22 2015 +0000
Committer: Mihai Chira <mi...@apache.org>
Committed: Wed Jan 21 11:52:59 2015 +0000

----------------------------------------------------------------------
 .../tests/spark/skins/spark/FLEX_34625_Tests.as | 42 ++++++++++++++++----
 1 file changed, 34 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e11ab8a7/frameworks/projects/spark/src/tests/spark/skins/spark/FLEX_34625_Tests.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/tests/spark/skins/spark/FLEX_34625_Tests.as b/frameworks/projects/spark/src/tests/spark/skins/spark/FLEX_34625_Tests.as
index cac0112..cf94b9e 100644
--- a/frameworks/projects/spark/src/tests/spark/skins/spark/FLEX_34625_Tests.as
+++ b/frameworks/projects/spark/src/tests/spark/skins/spark/FLEX_34625_Tests.as
@@ -18,16 +18,23 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 package tests.spark.skins.spark {
+    import flash.display.Sprite;
     import flash.events.Event;
     import flash.events.EventDispatcher;
 
+    import mx.core.Container;
+
     import mx.managers.FocusManager;
     import mx.managers.IFocusManagerContainer;
 
+    import org.flexunit.asserts.assertNotNull;
+
     import org.flexunit.asserts.assertTrue;
     import org.flexunit.async.Async;
     import org.fluint.uiImpersonation.UIImpersonator;
 
+    import spark.components.Group;
+
     import spark.components.TextInput;
 
     public class FLEX_34625_Tests {
@@ -40,15 +47,7 @@ package tests.spark.skins.spark {
         [Before]
         public function setUp():void
         {
-            var focusManager:FocusManager = new FocusManager(UIImpersonator.testDisplay as IFocusManagerContainer);
-            focusManager.showFocusIndicator = true;
-
-            _textInput = new TextInput();
-            _textInput.width = 0;
-            _textInput.height = 0;
-            _textInput.focusManager = focusManager;
 
-            _finishNotifier = new EventDispatcher();
         }
 
         [After]
@@ -61,6 +60,22 @@ package tests.spark.skins.spark {
         [Test(async, timeout=500)]
         public function test_focus_skin_with_zero_focus_thickness():void
         {
+            //from setUp(), for debugging
+            assertNotNull("UIImpersonator is not available!", UIImpersonator.testDisplay);
+            assertTrue(UIImpersonator.testDisplay is Sprite);
+            assertTrue(UIImpersonator.testDisplay is Container);
+            assertTrue(UIImpersonator.testDisplay is Group);
+
+            var focusManager:FocusManager = new FocusManager(UIImpersonator.testDisplay as IFocusManagerContainer);
+            focusManager.showFocusIndicator = true;
+
+            _textInput = new TextInput();
+            _textInput.width = 0;
+            _textInput.height = 0;
+            _textInput.focusManager = focusManager;
+
+            _finishNotifier = new EventDispatcher();
+
             //given
             UIImpersonator.addChild(_textInput);
 
@@ -77,6 +92,17 @@ package tests.spark.skins.spark {
         [Test(async, timeout=500)]
         public function test_focus_skin_with_NaN_focus_thickness():void
         {
+            //from setUp(), for debugging
+            var focusManager:FocusManager = new FocusManager(UIImpersonator.testDisplay as IFocusManagerContainer);
+            focusManager.showFocusIndicator = true;
+
+            _textInput = new TextInput();
+            _textInput.width = 0;
+            _textInput.height = 0;
+            _textInput.focusManager = focusManager;
+
+            _finishNotifier = new EventDispatcher();
+
             //given
             UIImpersonator.addChild(_textInput);