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 17:15:20 UTC

git commit: [flex-sdk] [refs/heads/develop] - FLEX-34721 In order to support Squiggly to run its own unit tests via flexunit-tests.xml, we had to make some changes: -all the existing unit tests have been moved to a directory called 'tests' on the same le

Repository: flex-sdk
Updated Branches:
  refs/heads/develop 6614d52d2 -> 89b1aa1e3


FLEX-34721 In order to support Squiggly to run its own unit tests via flexunit-tests.xml, we had to make some changes:
-all the existing unit tests have been moved to a directory called 'tests' on the same level as the 'src' directory of each project. That's because other projects (in this case, Squiggly) don't compile their sources based on a manifest.xml file, or on a main .as file that links in all the classes. This means that if the 'src' folder will contain unit tests in Squiggly, they will be compiled into the swc, which we don't want. Also it's generally better to assume that tests do not reside in the 'src' directory of the project.
-as a result, flexunit-tests.xml looks for unit tests in project.root/tests, instead of project.root/src.
-the 'test-run' target of flexunit-tests.xml was split into four targets, which mapped onto what that targed used to do before. The exception is -test-run-execute-with-extra-lib, which only runs if the target was called from a project which needs to specify an additional libraries folder (different Squiggly sub-projects need this, because they depend on other sub-projects).


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

Branch: refs/heads/develop
Commit: 89b1aa1e37e7f6ac615d2f33a4c303fd4265bbf0
Parents: 6614d52
Author: Mihai Chira <mi...@apache.org>
Authored: Wed Jan 21 16:14:59 2015 +0000
Committer: Mihai Chira <mi...@apache.org>
Committed: Wed Jan 21 16:14:59 2015 +0000

----------------------------------------------------------------------
 flexunit-tests.xml                              |  55 +++-
 .../src/tests/promises/PromisesTestSuite.as     |  33 --
 .../tests/promises/cases/PromisesBasicTests.as  | 321 -------------------
 .../apache/tests/promises/PromisesTestSuite.as  |  33 ++
 .../tests/promises/cases/PromisesBasicTests.as  | 321 +++++++++++++++++++
 .../tests/spark/skins/spark/FLEX_34625_Tests.as | 138 --------
 .../tests/spark/skins/spark/FLEX_34625_Tests.as | 138 ++++++++
 7 files changed, 534 insertions(+), 505 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/89b1aa1e/flexunit-tests.xml
----------------------------------------------------------------------
diff --git a/flexunit-tests.xml b/flexunit-tests.xml
index 8681b86..38de0ab 100644
--- a/flexunit-tests.xml
+++ b/flexunit-tests.xml
@@ -21,7 +21,7 @@
 <project name="flexunit-tests" default="test">
 
   <property name="FLEX_HOME" location="${basedir}"/>
-  <property name="FLEXUNIT_HOME" value="${FLEX_HOME}/../flex-flexunit"/>
+  <property name="FLEXUNIT_HOME" value="${FLEX_HOME}/../flexunit"/>
 
   <property name="exit" value="false"/>
   
@@ -49,10 +49,14 @@
     <echo message="'project.root' is set: ${project.root}"/>
 
   </target>
-  
-  <target name="test-run" unless="${exit}">
+
+
+  <target name="-test-run-prepare">
 
     <property name="tests.bin" location="${basedir}/bin-tests"/>
+    <condition property="project.needs.extra.libs">
+      <isset property="project.libs"/>
+    </condition>
 
     <taskdef resource="flexUnitTasks.tasks">
       <classpath>
@@ -65,24 +69,48 @@
     <echo message="Unit tests for '${project.root}'"/>
 
     <mkdir dir="${tests.bin}"/>
+  </target>
+
+  <target name="-test-run-execute" unless="project.needs.extra.libs">
+    <flexunit
+            workingDir="${tests.bin}"
+            toDir="${tests.bin}/report"
+            haltonfailure="false"
+            verbose="true"
+            localTrusted="true">
+
+      <source dir="${project.root}/src"/>
+
+      <testSource dir="${project.root}/tests">
+        <include name="**/*Tests.as"/>
+      </testSource>
 
+      <library dir="${FLEXUNIT_HOME}/FlexUnit4/target"/>
+      <library dir="${FLEXUNIT_HOME}/FlexUnit4CIListener/target"/>
+    </flexunit>
+  </target>
+
+  <target name="-test-run-execute-with-extra-lib" if="project.needs.extra.libs">
     <flexunit
-      workingDir="${tests.bin}" 
-      toDir="${tests.bin}/report" 
-      haltonfailure="false" 
-      verbose="true" 
-      localTrusted="true">
-      
+            workingDir="${tests.bin}"
+            toDir="${tests.bin}/report"
+            haltonfailure="false"
+            verbose="true"
+            localTrusted="true">
+
       <source dir="${project.root}/src"/>
-      
-      <testSource dir="${project.root}/src">
+
+      <testSource dir="${project.root}/tests">
         <include name="**/*Tests.as"/>
       </testSource>
-      
+
       <library dir="${FLEXUNIT_HOME}/FlexUnit4/target"/>
       <library dir="${FLEXUNIT_HOME}/FlexUnit4CIListener/target"/>
+      <library dir="${project.libs}"/>
     </flexunit>
+  </target>
 
+  <target name="-test-run-report">
     <mkdir dir="${FLEX_HOME}/test-reports"/>
 
     <copy todir="${FLEX_HOME}/test-reports">
@@ -90,9 +118,10 @@
         <include name="TEST-*.xml" />
       </fileset>
     </copy>
-
   </target>
 
+  <target name="test-run" depends="-test-run-prepare, -test-run-execute, -test-run-execute-with-extra-lib, -test-run-report" unless="${exit}"/>
+
   <target name="test-clean" unless="${exit}">
 
     <echo message="Clean up test artefacts"/>

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/89b1aa1e/frameworks/projects/apache/src/tests/promises/PromisesTestSuite.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/apache/src/tests/promises/PromisesTestSuite.as b/frameworks/projects/apache/src/tests/promises/PromisesTestSuite.as
deleted file mode 100644
index 57d6766..0000000
--- a/frameworks/projects/apache/src/tests/promises/PromisesTestSuite.as
+++ /dev/null
@@ -1,33 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package tests.promises
-{
-
-import tests.promises.cases.PromisesBasicTests;
-
-[Suite]
-[RunWith("org.flexunit.runners.Suite")]
-public class PromisesTestSuite
-{
-
-	public var promisesBasic:PromisesBasicTests;
-
-}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/89b1aa1e/frameworks/projects/apache/src/tests/promises/cases/PromisesBasicTests.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/apache/src/tests/promises/cases/PromisesBasicTests.as b/frameworks/projects/apache/src/tests/promises/cases/PromisesBasicTests.as
deleted file mode 100644
index 978795e..0000000
--- a/frameworks/projects/apache/src/tests/promises/cases/PromisesBasicTests.as
+++ /dev/null
@@ -1,321 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package tests.promises.cases
-{
-
-import flash.events.TimerEvent;
-import flash.utils.Timer;
-import flash.utils.setTimeout;
-
-import flexunit.framework.Assert;
-
-import org.apache.flex.promises.Promise;
-import org.apache.flex.promises.interfaces.IThenable;
-import org.flexunit.asserts.assertEquals;
-import org.flexunit.asserts.assertNotNull;
-import org.flexunit.asserts.assertTrue;
-import org.flexunit.async.Async;
-
-public class PromisesBasicTests
-{
-
-	//--------------------------------------------------------------------------
-	//
-	//    Variables
-	//
-	//--------------------------------------------------------------------------
-	
-	private var expected_:*;
-	
-	private var promise_:IThenable;
-	
-	private var got_:*;
-	
-	private var timer_:Timer;
-	
-	
-	
-	//--------------------------------------------------------------------------
-	//
-	//    Methods
-	//
-	//--------------------------------------------------------------------------
-	
-	//----------------------------------
-	//    parseErrorGot_
-	//----------------------------------
-	
-	private function parseErrorGot_(value:*):void {
-		this.got_ = Error(value).message;
-	}
-	
-	//----------------------------------
-	//    parseGot_
-	//----------------------------------
-	
-	private function parseGot_(value:*):void {
-		this.got_ = value;
-	}
-	
-	//----------------------------------
-	//    setUp
-	//----------------------------------
-	
-	[Before(async)]
-	public function setUp():void
-	{
-		this.timer_ = new Timer(100, 1);
-	}
-	
-	//----------------------------------
-	//    tearDown
-	//----------------------------------
-	
-	[After(async)]
-	public function tearDown():void
-	{
-		this.promise_ = null;
-		
-		if (this.timer_)
-		{
-			this.timer_.stop();
-			this.timer_ = null;
-		}
-	}
-	
-	//----------------------------------
-	//    verifyGot_
-	//----------------------------------
-	
-	private function verifyGot_(event:TimerEvent, result:*):void {
-		assertEquals(this.expected_, this.got_);
-	}
-	
-
-	
-	//--------------------------------------------------------------------------
-	//
-	//    Tests
-	//
-	//--------------------------------------------------------------------------
-	
-	//----------------------------------
-	//    test_Create
-	//----------------------------------
-	
-	[Test]
-	public function test_Create():void
-	{
-		promise_ = new Promise(null);
-		
-		Assert.assertNotUndefined(promise_);
-		
-		assertNotNull(promise_);
-		
-		assertTrue(promise_ is IThenable);
-		assertTrue(promise_ is Promise);
-	}
-	
-	//----------------------------------
-	//    test_SimpleSyncThen_FulFill
-	//----------------------------------
-	
-	[Test(async)]
-	public function test_SimpleSyncThen_FulFill():void
-	{
-		Async.handleEvent(this, timer_, TimerEvent.TIMER_COMPLETE, verifyGot_);
-		
-		timer_.start();
-		
-		promise_ = new Promise(function (fulfill:Function = null, reject:Function = null):*
-		{
-			fulfill('Hello world');
-		});
-		
-		expected_ = 'Hello world';
-		promise_.then(parseGot_);
-	}
-	
-	//----------------------------------
-	//    test_SimpleSyncThen_Reject
-	//----------------------------------
-	
-	[Test(async)]
-	public function test_SimpleSyncThen_Reject():void
-	{
-		Async.handleEvent(this, timer_, TimerEvent.TIMER_COMPLETE, verifyGot_);
-		
-		timer_.start();
-		
-		promise_ = new Promise(function (fulfill:Function = null, reject:Function = null):*
-		{
-			reject(new Error('reject'));
-		});
-		
-		expected_ = 'Error: reject';
-		promise_.then(null, parseErrorGot_);
-	}
-	
-	//----------------------------------
-	//    test_SimpleASyncThen_FulFill
-	//----------------------------------
-	
-	[Test(async)]
-	public function test_SimpleASyncThen_FulFill():void
-	{
-		Async.handleEvent(this, timer_, TimerEvent.TIMER_COMPLETE, verifyGot_);
-		
-		timer_.start();
-		
-		this.promise_ = new Promise(function (fulfill:Function = null, 
-											  reject:Function = null):*
-		{
-			setTimeout(function ():void { fulfill('Hello world'); }, 10);
-		});
-		
-		expected_ = 'Hello world';
-		promise_.then(parseGot_);
-	}
-	
-	//----------------------------------
-	//    test_SimpleASyncThen_Reject
-	//----------------------------------
-	
-	[Test(async)]
-	public function test_SimpleASyncThen_Reject():void
-	{
-		Async.handleEvent(this, timer_, TimerEvent.TIMER_COMPLETE, verifyGot_);
-		
-		timer_.start();
-		
-		this.promise_ = new Promise(function (fulfill:Function = null, 
-											  reject:Function = null):*
-		{
-			setTimeout(function ():void { reject(new Error('reject')); }, 10);
-		});
-		
-		expected_ = 'Error: reject';
-		promise_.then(null, parseErrorGot_);
-	}
-	
-	
-	//----------------------------------
-	//    test_MultipleASyncThen_FulFill
-	//----------------------------------
-	
-	[Test(async)]
-	public function test_MultipleASyncThen_FulFill():void
-	{
-		Async.handleEvent(this, timer_, TimerEvent.TIMER_COMPLETE, verifyGot_);
-		
-		timer_.start();
-		
-		var anotherStep:Function = function (value:*):IThenable
-		{
-			return new Promise(function (fulfill:Function = null, 
-										 reject:Function = null):*
-			{
-				setTimeout(function ():void { 
-					fulfill(value + ' ... again'); 
-				}, 10);
-			});
-		}
-		
-		promise_ = new Promise(function (fulfill:Function = null, 
-										 reject:Function = null):*
-		{
-			setTimeout(function ():void { 
-				fulfill('Hello world'); 
-			}, 10);
-		});
-		
-		expected_ = 'Hello world ... again';
-		promise_.then(anotherStep).then(parseGot_);
-	}
-	
-	//----------------------------------
-	//    test_MultipleASyncThen_RejectLast
-	//----------------------------------
-	
-	[Test(async)]
-	public function test_MultipleASyncThen_RejectLast():void
-	{
-		Async.handleEvent(this, timer_, TimerEvent.TIMER_COMPLETE, verifyGot_);
-		
-		timer_.start();
-		
-		var anotherStep:Function = function (value:*):IThenable
-		{
-			return new Promise(function (fulfill:Function = null, 
-										 reject:Function = null):*
-			{
-				setTimeout(function ():void { 
-					reject(new Error('reject')); 
-				}, 10);
-			});
-		}
-		
-		promise_ = new Promise(function (fulfill:Function = null, 
-										 reject:Function = null):*
-		{
-			setTimeout(function ():void { 
-				fulfill('Hello world'); 
-			}, 10);
-		});
-		
-		expected_ = 'Error: reject';
-		promise_.then(anotherStep).then(null, parseErrorGot_);
-	}
-	
-	//----------------------------------
-	//    test_MultipleASyncThen_RejectFirst
-	//----------------------------------
-	
-	[Test(async)]
-	public function test_MultipleASyncThen_Reject():void
-	{
-		Async.handleEvent(this, timer_, TimerEvent.TIMER_COMPLETE, verifyGot_);
-		
-		timer_.start();
-		
-		var anotherStep:Function = function (value:*):IThenable
-		{
-			return new Promise(function (fulfill:Function = null, 
-										 reject:Function = null):*
-			{
-				setTimeout(function ():void { 
-					fulfill(value + ' ... again'); 
-				}, 10);
-			});
-		}
-		
-		promise_ = new Promise(function (fulfill:Function = null, 
-										 reject:Function = null):*
-		{
-			setTimeout(function ():void { 
-				reject(new Error('reject')); 
-			}, 10);
-		});
-		
-		expected_ = 'Error: reject';
-		promise_.then(anotherStep).then(null, parseErrorGot_);
-	}
-	
-}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/89b1aa1e/frameworks/projects/apache/tests/promises/PromisesTestSuite.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/apache/tests/promises/PromisesTestSuite.as b/frameworks/projects/apache/tests/promises/PromisesTestSuite.as
new file mode 100644
index 0000000..2fbb424
--- /dev/null
+++ b/frameworks/projects/apache/tests/promises/PromisesTestSuite.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package promises
+{
+
+import promises.cases.PromisesBasicTests;
+
+[Suite]
+[RunWith("org.flexunit.runners.Suite")]
+public class PromisesTestSuite
+{
+
+	public var promisesBasic:PromisesBasicTests;
+
+}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/89b1aa1e/frameworks/projects/apache/tests/promises/cases/PromisesBasicTests.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/apache/tests/promises/cases/PromisesBasicTests.as b/frameworks/projects/apache/tests/promises/cases/PromisesBasicTests.as
new file mode 100644
index 0000000..968a555
--- /dev/null
+++ b/frameworks/projects/apache/tests/promises/cases/PromisesBasicTests.as
@@ -0,0 +1,321 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package promises.cases
+{
+
+import flash.events.TimerEvent;
+import flash.utils.Timer;
+import flash.utils.setTimeout;
+
+import flexunit.framework.Assert;
+
+import org.apache.flex.promises.Promise;
+import org.apache.flex.promises.interfaces.IThenable;
+import org.flexunit.asserts.assertEquals;
+import org.flexunit.asserts.assertNotNull;
+import org.flexunit.asserts.assertTrue;
+import org.flexunit.async.Async;
+
+public class PromisesBasicTests
+{
+
+	//--------------------------------------------------------------------------
+	//
+	//    Variables
+	//
+	//--------------------------------------------------------------------------
+	
+	private var expected_:*;
+	
+	private var promise_:IThenable;
+	
+	private var got_:*;
+	
+	private var timer_:Timer;
+	
+	
+	
+	//--------------------------------------------------------------------------
+	//
+	//    Methods
+	//
+	//--------------------------------------------------------------------------
+	
+	//----------------------------------
+	//    parseErrorGot_
+	//----------------------------------
+	
+	private function parseErrorGot_(value:*):void {
+		this.got_ = Error(value).message;
+	}
+	
+	//----------------------------------
+	//    parseGot_
+	//----------------------------------
+	
+	private function parseGot_(value:*):void {
+		this.got_ = value;
+	}
+	
+	//----------------------------------
+	//    setUp
+	//----------------------------------
+	
+	[Before(async)]
+	public function setUp():void
+	{
+		this.timer_ = new Timer(100, 1);
+	}
+	
+	//----------------------------------
+	//    tearDown
+	//----------------------------------
+	
+	[After(async)]
+	public function tearDown():void
+	{
+		this.promise_ = null;
+		
+		if (this.timer_)
+		{
+			this.timer_.stop();
+			this.timer_ = null;
+		}
+	}
+	
+	//----------------------------------
+	//    verifyGot_
+	//----------------------------------
+	
+	private function verifyGot_(event:TimerEvent, result:*):void {
+		assertEquals(this.expected_, this.got_);
+	}
+	
+
+	
+	//--------------------------------------------------------------------------
+	//
+	//    Tests
+	//
+	//--------------------------------------------------------------------------
+	
+	//----------------------------------
+	//    test_Create
+	//----------------------------------
+	
+	[Test]
+	public function test_Create():void
+	{
+		promise_ = new Promise(null);
+		
+		Assert.assertNotUndefined(promise_);
+		
+		assertNotNull(promise_);
+		
+		assertTrue(promise_ is IThenable);
+		assertTrue(promise_ is Promise);
+	}
+	
+	//----------------------------------
+	//    test_SimpleSyncThen_FulFill
+	//----------------------------------
+	
+	[Test(async)]
+	public function test_SimpleSyncThen_FulFill():void
+	{
+		Async.handleEvent(this, timer_, TimerEvent.TIMER_COMPLETE, verifyGot_);
+		
+		timer_.start();
+		
+		promise_ = new Promise(function (fulfill:Function = null, reject:Function = null):*
+		{
+			fulfill('Hello world');
+		});
+		
+		expected_ = 'Hello world';
+		promise_.then(parseGot_);
+	}
+	
+	//----------------------------------
+	//    test_SimpleSyncThen_Reject
+	//----------------------------------
+	
+	[Test(async)]
+	public function test_SimpleSyncThen_Reject():void
+	{
+		Async.handleEvent(this, timer_, TimerEvent.TIMER_COMPLETE, verifyGot_);
+		
+		timer_.start();
+		
+		promise_ = new Promise(function (fulfill:Function = null, reject:Function = null):*
+		{
+			reject(new Error('reject'));
+		});
+		
+		expected_ = 'Error: reject';
+		promise_.then(null, parseErrorGot_);
+	}
+	
+	//----------------------------------
+	//    test_SimpleASyncThen_FulFill
+	//----------------------------------
+	
+	[Test(async)]
+	public function test_SimpleASyncThen_FulFill():void
+	{
+		Async.handleEvent(this, timer_, TimerEvent.TIMER_COMPLETE, verifyGot_);
+		
+		timer_.start();
+		
+		this.promise_ = new Promise(function (fulfill:Function = null, 
+											  reject:Function = null):*
+		{
+			setTimeout(function ():void { fulfill('Hello world'); }, 10);
+		});
+		
+		expected_ = 'Hello world';
+		promise_.then(parseGot_);
+	}
+	
+	//----------------------------------
+	//    test_SimpleASyncThen_Reject
+	//----------------------------------
+	
+	[Test(async)]
+	public function test_SimpleASyncThen_Reject():void
+	{
+		Async.handleEvent(this, timer_, TimerEvent.TIMER_COMPLETE, verifyGot_);
+		
+		timer_.start();
+		
+		this.promise_ = new Promise(function (fulfill:Function = null, 
+											  reject:Function = null):*
+		{
+			setTimeout(function ():void { reject(new Error('reject')); }, 10);
+		});
+		
+		expected_ = 'Error: reject';
+		promise_.then(null, parseErrorGot_);
+	}
+	
+	
+	//----------------------------------
+	//    test_MultipleASyncThen_FulFill
+	//----------------------------------
+	
+	[Test(async)]
+	public function test_MultipleASyncThen_FulFill():void
+	{
+		Async.handleEvent(this, timer_, TimerEvent.TIMER_COMPLETE, verifyGot_);
+		
+		timer_.start();
+		
+		var anotherStep:Function = function (value:*):IThenable
+		{
+			return new Promise(function (fulfill:Function = null, 
+										 reject:Function = null):*
+			{
+				setTimeout(function ():void { 
+					fulfill(value + ' ... again'); 
+				}, 10);
+			});
+		}
+		
+		promise_ = new Promise(function (fulfill:Function = null, 
+										 reject:Function = null):*
+		{
+			setTimeout(function ():void { 
+				fulfill('Hello world'); 
+			}, 10);
+		});
+		
+		expected_ = 'Hello world ... again';
+		promise_.then(anotherStep).then(parseGot_);
+	}
+	
+	//----------------------------------
+	//    test_MultipleASyncThen_RejectLast
+	//----------------------------------
+	
+	[Test(async)]
+	public function test_MultipleASyncThen_RejectLast():void
+	{
+		Async.handleEvent(this, timer_, TimerEvent.TIMER_COMPLETE, verifyGot_);
+		
+		timer_.start();
+		
+		var anotherStep:Function = function (value:*):IThenable
+		{
+			return new Promise(function (fulfill:Function = null, 
+										 reject:Function = null):*
+			{
+				setTimeout(function ():void { 
+					reject(new Error('reject')); 
+				}, 10);
+			});
+		}
+		
+		promise_ = new Promise(function (fulfill:Function = null, 
+										 reject:Function = null):*
+		{
+			setTimeout(function ():void { 
+				fulfill('Hello world'); 
+			}, 10);
+		});
+		
+		expected_ = 'Error: reject';
+		promise_.then(anotherStep).then(null, parseErrorGot_);
+	}
+	
+	//----------------------------------
+	//    test_MultipleASyncThen_RejectFirst
+	//----------------------------------
+	
+	[Test(async)]
+	public function test_MultipleASyncThen_Reject():void
+	{
+		Async.handleEvent(this, timer_, TimerEvent.TIMER_COMPLETE, verifyGot_);
+		
+		timer_.start();
+		
+		var anotherStep:Function = function (value:*):IThenable
+		{
+			return new Promise(function (fulfill:Function = null, 
+										 reject:Function = null):*
+			{
+				setTimeout(function ():void { 
+					fulfill(value + ' ... again'); 
+				}, 10);
+			});
+		}
+		
+		promise_ = new Promise(function (fulfill:Function = null, 
+										 reject:Function = null):*
+		{
+			setTimeout(function ():void { 
+				reject(new Error('reject')); 
+			}, 10);
+		});
+		
+		expected_ = 'Error: reject';
+		promise_.then(anotherStep).then(null, parseErrorGot_);
+	}
+	
+}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/89b1aa1e/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
deleted file mode 100644
index 9c8193d..0000000
--- a/frameworks/projects/spark/src/tests/spark/skins/spark/FLEX_34625_Tests.as
+++ /dev/null
@@ -1,138 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-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 {
-
-        private static const NO_ENTER_FRAMES_TO_ALLOW:int = 4;
-        private var noEnterFramesRemaining:int = NaN;
-        private var _finishNotifier:EventDispatcher;
-        private var _textInput:TextInput;
-
-        [Before]
-        public function setUp():void
-        {
-
-        }
-
-        [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);
-
-            //when
-            _textInput.setStyle("focusThickness", 0);
-            _textInput.setFocus();
-
-            //then wait for the focus skin to show
-            noEnterFramesRemaining = NO_ENTER_FRAMES_TO_ALLOW;
-            UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, onEnterFrame);
-            Async.handleEvent(this, _finishNotifier, Event.COMPLETE, onTestComplete);
-        }
-
-        [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);
-
-            //when
-            _textInput.setStyle("focusThickness", NaN);
-            _textInput.setFocus();
-
-            //then wait for the focus skin to show
-            noEnterFramesRemaining = NO_ENTER_FRAMES_TO_ALLOW;
-            UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, onEnterFrame);
-            Async.handleEvent(this, _finishNotifier, Event.COMPLETE, onTestComplete);
-        }
-
-        private function onEnterFrame(event:Event):void
-        {
-            if(!--noEnterFramesRemaining)
-            {
-                UIImpersonator.testDisplay.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
-
-                _finishNotifier.dispatchEvent(new Event(Event.COMPLETE));
-            }
-        }
-
-        private static function onTestComplete(event:Event, passThroughData:Object):void
-        {
-            //if we get here it means no error has been thrown
-            assertTrue(true);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/89b1aa1e/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
new file mode 100644
index 0000000..9009224
--- /dev/null
+++ b/frameworks/projects/spark/tests/spark/skins/spark/FLEX_34625_Tests.as
@@ -0,0 +1,138 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+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 var noEnterFramesRemaining:int = NaN;
+        private var _finishNotifier:EventDispatcher;
+        private var _textInput:TextInput;
+
+        [Before]
+        public function setUp():void
+        {
+
+        }
+
+        [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);
+
+            //when
+            _textInput.setStyle("focusThickness", 0);
+            _textInput.setFocus();
+
+            //then wait for the focus skin to show
+            noEnterFramesRemaining = NO_ENTER_FRAMES_TO_ALLOW;
+            UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, onEnterFrame);
+            Async.handleEvent(this, _finishNotifier, Event.COMPLETE, onTestComplete);
+        }
+
+        [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);
+
+            //when
+            _textInput.setStyle("focusThickness", NaN);
+            _textInput.setFocus();
+
+            //then wait for the focus skin to show
+            noEnterFramesRemaining = NO_ENTER_FRAMES_TO_ALLOW;
+            UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, onEnterFrame);
+            Async.handleEvent(this, _finishNotifier, Event.COMPLETE, onTestComplete);
+        }
+
+        private function onEnterFrame(event:Event):void
+        {
+            if(!--noEnterFramesRemaining)
+            {
+                UIImpersonator.testDisplay.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
+
+                _finishNotifier.dispatchEvent(new Event(Event.COMPLETE));
+            }
+        }
+
+        private static function onTestComplete(event:Event, passThroughData:Object):void
+        {
+            //if we get here it means no error has been thrown
+            assertTrue(true);
+        }
+    }
+}