flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [24/50] [abbrv] git commit: [flex-sdk] [refs/heads/master] - FLEX-34625 Reverting unit test to pre-debug version.
Date Mon, 11 Jan 2016 21:55:07 GMT
FLEX-34625
Reverting unit test to pre-debug version.


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

Branch: refs/heads/master
Commit: 9c7d389d218b79a9a7d858cdcdd0130625c681c2
Parents: 994cbce
Author: Mihai Chira <mihaic@apache.org>
Authored: Fri Dec 18 13:22:52 2015 +0200
Committer: Mihai Chira <mihaic@apache.org>
Committed: Fri Dec 18 13:22:52 2015 +0200

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


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/9c7d389d/frameworks/projects/spark/tests/spark/skins/spark/FLEX_34625_Tests.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/tests/spark/skins/spark/FLEX_34625_Tests.as b/frameworks/projects/spark/tests/spark/skins/spark/FLEX_34625_Tests.as
index 9009224..c040b38 100644
--- a/frameworks/projects/spark/tests/spark/skins/spark/FLEX_34625_Tests.as
+++ b/frameworks/projects/spark/tests/spark/skins/spark/FLEX_34625_Tests.as
@@ -18,67 +18,46 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 package 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 {
 
         private static const NO_ENTER_FRAMES_TO_ALLOW:int = 4;
+        private static const _finishNotifier:EventDispatcher = new EventDispatcher();
+        private static var _textInput:TextInput;
         private var noEnterFramesRemaining:int = NaN;
-        private var _finishNotifier:EventDispatcher;
-        private var _textInput:TextInput;
 
         [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;
         }
 
         [After]
         public function tearDown():void
         {
             _textInput = null;
-            _finishNotifier = null;
         }
 
         [Test(async, timeout=500)]
         public function test_focus_skin_with_zero_focus_thickness():void
         {
-            //from setUp(), for debugging
-            trace("UIImpersonator root:" + UIImpersonator.testDisplay);
-
-            assertNotNull("UIImpersonator is not available!", UIImpersonator.testDisplay);
-            assertTrue("It's not a Sprite!", UIImpersonator.testDisplay is Sprite);
-            assertTrue("It's not a Container!", UIImpersonator.testDisplay is Container);
-            assertTrue("It's not a Group!", UIImpersonator.testDisplay is Group);
-            assertTrue("It's not an IFocusManagerContainer!", UIImpersonator.testDisplay
is IFocusManagerContainer);
-
-            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);
 
@@ -95,17 +74,6 @@ package 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);
 
@@ -124,7 +92,6 @@ package spark.skins.spark {
             if(!--noEnterFramesRemaining)
             {
                 UIImpersonator.testDisplay.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
-
                 _finishNotifier.dispatchEvent(new Event(Event.COMPLETE));
             }
         }


Mime
View raw message