You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cz...@apache.org on 2013/05/22 15:50:54 UTC
[34/41] git commit: added Apache license header
added Apache license header
Project: http://git-wip-us.apache.org/repos/asf/flex-flexunit/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-flexunit/commit/8d0f8f20
Tree: http://git-wip-us.apache.org/repos/asf/flex-flexunit/tree/8d0f8f20
Diff: http://git-wip-us.apache.org/repos/asf/flex-flexunit/diff/8d0f8f20
Branch: refs/heads/makeFlexUnitApacheReady
Commit: 8d0f8f20933281e7ef3a68670629374150aae16b
Parents: 0abaaf7
Author: cyrill.zadra <cy...@gmail.com>
Authored: Sun May 19 22:49:59 2013 +0800
Committer: cyrill.zadra <cy...@gmail.com>
Committed: Sun May 19 22:49:59 2013 +0800
----------------------------------------------------------------------
FlexUnit4/pmd-ruleset.xml | 17 +
FlexUnit4AntTasks/src/TestRunner.template | 16 +
FlexUnit4AntTasks/src/flexUnitDescriptor.template | 16 +
FlexUnit4AntTasks/src/flexUnitTasks.tasks | 15 +
FlexUnit4SampleCIProject/build.air.xml | 17 +
FlexUnit4SampleCIProject/build.browser.xml | 17 +
FlexUnit4SampleCIProject/build.custom.xml | 17 +
FlexUnit4SampleCIProject/build.xml | 17 +
FlexUnit4SampleCIProject/pom.xml | 17 +
.../src/org/flexunit/flexui/TestRunnerBase.mxml | 592 ++++++++++++++-
.../flexunit/flexui/controls/PromptingTextInput.as | 16 +
pom.template | 17 +
utils.xml | 17 +
13 files changed, 775 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/8d0f8f20/FlexUnit4/pmd-ruleset.xml
----------------------------------------------------------------------
diff --git a/FlexUnit4/pmd-ruleset.xml b/FlexUnit4/pmd-ruleset.xml
index c889adb..7334983 100644
--- a/FlexUnit4/pmd-ruleset.xml
+++ b/FlexUnit4/pmd-ruleset.xml
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<ruleset name="All Flex Rules" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd" xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<description/>
<rule since="" class="com.adobe.ac.pmd.rules.architecture.ViewComponentReferencedInModelRule" message="A view component should not be referenced in a model class">
http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/8d0f8f20/FlexUnit4AntTasks/src/TestRunner.template
----------------------------------------------------------------------
diff --git a/FlexUnit4AntTasks/src/TestRunner.template b/FlexUnit4AntTasks/src/TestRunner.template
index b413fbf..8af69ac 100644
--- a/FlexUnit4AntTasks/src/TestRunner.template
+++ b/FlexUnit4AntTasks/src/TestRunner.template
@@ -1,4 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+-->
<@APPLICATION_PREFIX@:@APPLICATION_CLASS@
@NAMESPACES@
creationComplete="runTests();">
http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/8d0f8f20/FlexUnit4AntTasks/src/flexUnitDescriptor.template
----------------------------------------------------------------------
diff --git a/FlexUnit4AntTasks/src/flexUnitDescriptor.template b/FlexUnit4AntTasks/src/flexUnitDescriptor.template
index 9dcf2a4..e38527c 100644
--- a/FlexUnit4AntTasks/src/flexUnitDescriptor.template
+++ b/FlexUnit4AntTasks/src/flexUnitDescriptor.template
@@ -1,4 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--
+ 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.
+-->
<application xmlns="http://ns.adobe.com/air/application/@ADT_VERSION@">
<id>FlexUnit4AdlWrapper</id>
<filename>FlexUnit4AdlWrapper</filename>
http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/8d0f8f20/FlexUnit4AntTasks/src/flexUnitTasks.tasks
----------------------------------------------------------------------
diff --git a/FlexUnit4AntTasks/src/flexUnitTasks.tasks b/FlexUnit4AntTasks/src/flexUnitTasks.tasks
index 4a0339a..9610cf0 100644
--- a/FlexUnit4AntTasks/src/flexUnitTasks.tasks
+++ b/FlexUnit4AntTasks/src/flexUnitTasks.tasks
@@ -1 +1,16 @@
+# 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.
+
flexunit=org.flexunit.ant.tasks.FlexUnitTask
http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/8d0f8f20/FlexUnit4SampleCIProject/build.air.xml
----------------------------------------------------------------------
diff --git a/FlexUnit4SampleCIProject/build.air.xml b/FlexUnit4SampleCIProject/build.air.xml
index c786cac..f957f0a 100644
--- a/FlexUnit4SampleCIProject/build.air.xml
+++ b/FlexUnit4SampleCIProject/build.air.xml
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<!--
This is intended to be a simple build file, created a suggestion for the necessary steps need to utilize the FlexUnit4 Ant task.
For the most detail when running this build, call "ant -v clean package". The build uses a simple lifecycle of:
http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/8d0f8f20/FlexUnit4SampleCIProject/build.browser.xml
----------------------------------------------------------------------
diff --git a/FlexUnit4SampleCIProject/build.browser.xml b/FlexUnit4SampleCIProject/build.browser.xml
index eadf841..c886d5c 100644
--- a/FlexUnit4SampleCIProject/build.browser.xml
+++ b/FlexUnit4SampleCIProject/build.browser.xml
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<!--
This is intended to be a simple build file, created a suggestion for the necessary steps need to utilize the FlexUnit4 Ant task.
For the most detail when running this build, call "ant -v clean package". The build uses a simple lifecycle of:
http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/8d0f8f20/FlexUnit4SampleCIProject/build.custom.xml
----------------------------------------------------------------------
diff --git a/FlexUnit4SampleCIProject/build.custom.xml b/FlexUnit4SampleCIProject/build.custom.xml
index e92d979..db298d6 100644
--- a/FlexUnit4SampleCIProject/build.custom.xml
+++ b/FlexUnit4SampleCIProject/build.custom.xml
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<!--
This is intended to be a simple build file, created a suggestion for the necessary steps need to utilize the FlexUnit4 Ant task.
For the most detail when running this build, call "ant -v clean package". The build uses a simple lifecycle of:
http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/8d0f8f20/FlexUnit4SampleCIProject/build.xml
----------------------------------------------------------------------
diff --git a/FlexUnit4SampleCIProject/build.xml b/FlexUnit4SampleCIProject/build.xml
index cbfe247..339e537 100644
--- a/FlexUnit4SampleCIProject/build.xml
+++ b/FlexUnit4SampleCIProject/build.xml
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<!--
This is intended to be a simple build file, created a suggestion for the necessary steps need to utilize the FlexUnit4 Ant task.
For the most detail when running this build, call "ant -v clean package". The build uses a simple lifecycle of:
http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/8d0f8f20/FlexUnit4SampleCIProject/pom.xml
----------------------------------------------------------------------
diff --git a/FlexUnit4SampleCIProject/pom.xml b/FlexUnit4SampleCIProject/pom.xml
index e4776a8..7e2bed6 100644
--- a/FlexUnit4SampleCIProject/pom.xml
+++ b/FlexUnit4SampleCIProject/pom.xml
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<!--
Please note that this build file is an example of how to implement FlexMojos to execute all tests for a project following
Maven conventions. This is just one possible way to utilize FlexMojos and Maven. Please note, this build will fail
http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/8d0f8f20/FlexUnit4UIListener/src/org/flexunit/flexui/TestRunnerBase.mxml
----------------------------------------------------------------------
diff --git a/FlexUnit4UIListener/src/org/flexunit/flexui/TestRunnerBase.mxml b/FlexUnit4UIListener/src/org/flexunit/flexui/TestRunnerBase.mxml
index c099b0b..80af8f9 100644
--- a/FlexUnit4UIListener/src/org/flexunit/flexui/TestRunnerBase.mxml
+++ b/FlexUnit4UIListener/src/org/flexunit/flexui/TestRunnerBase.mxml
@@ -1,16 +1,576 @@
-<?xml version="1.0" encoding="utf-8"?>
<mx:Panel
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*"
xmlns:data="org.flexunit.flexui.data.*"
xmlns:controls="org.flexunit.flexui.controls.*"
styleName="mainPanel"
width="100%"
height="100%"
minHeight="500"
minWidth="850"
verticalScrollPolicy="off"
horizontalScrollPolicy="off"
modalTransparencyBlur="0"
modalTransparency="0"
implements="org.flexunit.runner.notification.ITemporalRunListener"
creationComplete="handleCreationComplete()" >
<mx:Metadata>
[Event( name="testsComplete", type="org.flexunit.flexui.event.TestsCompleteEvent")]
</mx:Metadata>
<mx:Style>
@font-face {
font-family: "Myriad Pro SemiCond";
src: url("/fonts/fonts.swf");
}
/* Font for anything else */
@font-face {
font-family: "Myriad Pro";
src: url("/fonts/fonts.swf");
}
@font-face {
font-family: "Myriad Pro";
font-weight: bold;
src: url("/fonts/fonts.swf");
}
/* Class-
selectors are the only way to apply styles to components */
.flexUnitApplication {
backgroundColor: #3872b2;
backgroundGradientColors: #3872b2, #0c1a3d;
backgroundGradientAlphas: 1, 1;
themeColor: #ffffff;
color: #444444;
fontFamily: "Myriad Pro";
fontSize: 12;
verticalScrollBarStyleName: flexUnitScrollBar;
horizontalScrollBarStyleName: flexUnitScrollBar;
modal-transparency-blur: 0;
modal-transparency: 0;
}
.myToolTip {
fontFamily: "Myriad Pro";
background-color: #3872b2;
leading: 5;
}
.flexUnitVBox {
verticalScrollBarStyleName: flexUnitScrollBar;
horizontalScrollBarStyleName: flexUnitScrollBar;
}
.flexUnitScrollBar
{
downArrowDisabledSkin: Embed(source="/skins/VScrollBar_downArrowDisabledSkin.png");
downArrowDownSkin: Embed(source="/skins/VScrollBar_downArrowDownSkin.png");
downArrowOverSkin: Embed(source="/skins/VScrollBar_downArrowOverSkin.png");
downArrowUpSkin: Embed(source="/skins/VScrollBa
r_downArrowUpSkin.png");
thumbIcon: Embed(source="/skins/VScrollBar_thumbIcon.png");
trackSkin: Embed(source="/skins/VScrollBar_trackSkin.png");
upArrowDisabledSkin: Embed(source="/skins/VScrollBar_upArrowDisabledSkin.png");
upArrowDownSkin: Embed(source="/skins/VScrollBar_upArrowDownSkin.png");
upArrowOverSkin: Embed(source="/skins/VScrollBar_upArrowOverSkin.png");
upArrowUpSkin: Embed(source="/skins/VScrollBar_upArrowUpSkin.png");
thumbDownSkin: Embed(
source="/skins/VScrollBar_thumbDownSkin.png",
scaleGridLeft="1", scaleGridTop="5",
scaleGridRight="8", scaleGridBottom="44" );
thumbOverSkin: Embed(
source="/skins/VScrollBar_thumbOverSkin.png",
scaleGridLeft="1", scaleGridTop="5",
scaleGridRight="8", scaleGridBottom="44" );
thumbUpSkin: Embed(
source="/skins/VScrollBar_thumbUpSkin.png",
scaleGridLeft="1", scaleGridTop="5",
scaleGridRight="8", scaleGridBottom="44" );
}
.flexUnitDataGrid {
alternatingItemColo
rs: #ffffff, #f6f6f6;
headerColors: #fcfcfc, #e5e5e5;
verticalGridLineColor: #dcdcdc;
useRollOver: false;
rollOverColor: #cccccc;
selectionColor: #2863b4;
textSelectedColor: #ffffff;
}
.flexUnitSlider {
themeColor: #2863b4;
}
.flexUnitTree {
alternatingItemColors: #ffffff, #f6f6f6;
headerColors: #fcfcfc, #e5e5e5;
verticalGridLineColor: #dcdcdc;
useRollOver: false;
rollOverColor: #cccccc;
selectionColor: #2863b4;
textSelectedColor: #ffffff;
verticalScrollBarStyleName: flexUnitScrollBar;
horizontalScrollBarStyleName: flexUnitScrollBar;
}
.mainPanel {
header-height: 0;
vertical-gap: 2;
borderSkin: Embed(
source="/skins/Panel_borderSkin.png",
scaleGridLeft="12", scaleGridTop="31",
scaleGridRight="265", scaleGridBottom="189" );
padding-top: 20;
padding-left: 8;
padding-right: 8;
}
.flexUnitTextInput {
themeColor: #ffffff;
}
.flexUnitTextAreaWithBorder {
borderSkin: E
mbed(
source="/skins/TextArea_borderSkin.png",
scaleGridLeft="4", scaleGridTop="4",
scaleGridRight="150", scaleGridBottom="18" );
paddingTop: 10;
leading: 0;
fontSize: 11;
wordWrap: false;
verticalScrollBarStyleName: flexUnitScrollBar;
horizontalScrollBarStyleName: flexUnitScrollBar;
}
.flexUnitTextArea {
borderStyle: none;
backgroundAlpha: 0;
paddingTop: 10;
leading: 0;
fontSize: 11;
wordWrap: false;
verticalScrollBarStyleName: flexUnitScrollBar;
horizontalScrollBarStyleName: flexUnitScrollBar;
}
.panelTitleStyle {
fontFamily: "Myriad Pro SemiCond";
fontSize: 24;
textIndent: 20;
}
.panelTitleSubStyle {
fontFamily: "Myriad Pro SemiCond";
fontSize: 16;
}
.flexUnitHRule {
strokeColor: #b9b9b9;
strokeWidth: 2;
shadowColor: #FFFFFF;
}
.h1 {
fontFamily: "Myriad Pro SemiCond";
fontSize: 18;
}
.h2 {
fontSize: 13;
}
.flexUnitComboBox {
upSkin: Embed(
source="/skins/ComboBox_upSkin.png",
scaleGridLeft="4", scaleGridTop="4",
scaleGridRight="64", scaleGridBottom="18" );
overSkin: Embed(
source="/skins/ComboBox_overSkin.png",
scaleGridLeft="4", scaleGridTop="4",
scaleGridRight="64", scaleGridBottom="18" );
downSkin: Embed(
source="/skins/ComboBox_downSkin.png",
scaleGridLeft="4", scaleGridTop="4",
scaleGridRight="64", scaleGridBottom="18" );
disabledSkin: Embed(
source="/skins/ComboBox_disabledSkin.png",
scaleGridLeft="4", scaleGridTop="4",
scaleGridRight="64", scaleGridBottom="18" );
themeColor: #2863b4;
}
.flexUnitProgressBar
{
barColor: #51C148;
trackSkin: Embed(
source="/skins/ProgressBar_trackSkin.png",
scaleGridLeft="1", scaleGridTop="0",
scaleGridRight="149", scaleGridBottom="3" );
trackHeight: 11;
}
.flexUnitForm {
paddingTop: 0;
paddingBottom: 0;
paddingLeft: 0;
paddingRight: 0;
verticalGap: -2;
}
.flex
UnitFormItemLabel {
color: #777777;
}
.flexUnitFormItemValue {
color: #444444;
}
.flexUnitButtonBar
{
horizontalGap: -1;
firstButtonStyleName: "firstButtonBarButton";
lastButtonStyleName: "lastButtonBarButton";
}
.firstButtonBarButton
{
disabledSkin: Embed(
source="/skins/ButtonBarFirstButton_disabledSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
downSkin: Embed(
source="/skins/ButtonBarFirstButton_downSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
overSkin: Embed(
source="/skins/ButtonBarFirstButton_overSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
selectedDisabledSkin: Embed(
source="/skins/ButtonBarFirstButton_selectedDisabledSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
selectedDownSkin: Emb
ed(
source="/skins/ButtonBarFirstButton_downSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
selectedOverSkin: Embed(
source="/skins/ButtonBarFirstButton_overSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
selectedUpSkin: Embed(
source="/skins/ButtonBarFirstButton_selectedUpSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
upSkin: Embed(
source="/skins/ButtonBarFirstButton_upSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
}
.lastButtonBarButton
{
disabledSkin: Embed(
source="/skins/ButtonBarLastButton_disabledSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
downSkin: Embed(
source="/skins/ButtonBarLastButton_downSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleG
ridRight="40", scaleGridBottom="16" );
overSkin: Embed(
source="/skins/ButtonBarLastButton_overSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
selectedDisabledSkin: Embed(
source="/skins/ButtonBarLastButton_disabledSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
selectedDownSkin: Embed(
source="/skins/ButtonBarLastButton_downSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
selectedOverSkin: Embed(
source="/skins/ButtonBarLastButton_overSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
selectedUpSkin: Embed(
source="/skins/ButtonBarLastButton_selectedUpSkin.png",
scaleGridLeft="6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
upSkin: Embed(
source="/skins/ButtonBarLastButton_upSkin.png",
scaleGridLeft="
6", scaleGridTop="6",
scaleGridRight="40", scaleGridBottom="16" );
}
.flexUnitControlBar {
paddingTop: 5;
paddingBottom: 2;
paddingLeft: 4;
paddingRight: 12;
borderSkin: Embed(
source="/skins/Panel_controlBarBackgroundSkin.png",
scaleGridLeft="8", scaleGridTop="1",
scaleGridRight="270", scaleGridBottom="17" );
}
</mx:Style>
<mx:Script>
<![CDATA[
import flash.net.navigateToURL;
import mx.controls.ToolTip;
import mx.controls.listClasses.ListBase;
import mx.core.ScrollPolicy;
import mx.managers.ToolTipManager;
import org.flexunit.Assert;
import flexunit.framework.Assert;
import org.flexunit.flexui.controls.FlexUnitLabels;
import org.flexunit.flexui.data.TestFunctionRowData;
import org.flexunit.flexui.event.TestsCompleteEvent;
import org.flexunit.runner.Description;
import org.flexunit.runner.Descriptor;
import org.flexunit.runner.FlexUnitCore;
import org.flexunit.r
unner.IDescription;
import org.flexunit.runner.Result;
import org.flexunit.runner.notification.Failure;
public var test : *;// TODO: [XB] was Test;
/* JT 5/28/09 - added lastFailedTest to handle bugreport FXU-38, the testFinished method of this class
* mistakenly assumed that any test which finished was successful. This is not the case, as failures and
* successes are both valid cases for a finished test. With this variable, we can now prevent counting
* finished failures as successes.
*/
private var lastFailedTest:IDescription;
private function handleCreationComplete() : void
{
ToolTip.maxWidth = 900;
rightHandSide.model = model;
leftHandSide.model = model;
model.filterSectionEnabled = false;
}
public function startTest() : void
{
// if( test != null )
{
// model.totalTests = test.countTestCases(); // TODO:
[XB] reenable this
model.launchTests();
rightHandSide.launchTests();
leftHandSide.launchTests();
}
}
private function addTestToList(
description : IDescription,
failure : Failure = null,
ignored : Boolean = false,
assertionsMade: uint= 0 ) : void
{
var rowAdded : TestFunctionRowData;
rowAdded = model.addTestRowToHierarchicalList( description, failure, ignored, lastRunTime, assertionsMade );
leftHandSide.testCasesContainer.allTestsHierarchyTree.verticalScrollPosition
= leftHandSide.testCasesContainer.allTestsHierarchyTree.maxVerticalScrollPosition;
/*if( ! success )
{
model.rowSelected = rowAdded;
// }*/
}
//---------------------------------------------
------------------------
// IFlexWriter Methods
//---------------------------------------------------------------------
public function testRunStarted( description:IDescription ):void {
model.totalTests = description.testCount;
this.startTest();
}
public function testRunFinished( result:Result ):void {
rightHandSide.onAllTestsEnd();
leftHandSide.onAllTestsEnd();
dispatchEvent( new TestsCompleteEvent() );
}
private var lastRunTime:Number = 0;
public function testStarted( description:IDescription ):void {
}
public function testFinished( description:IDescription ):void {
if( ! leftHandSide.testCasesContainer.allTestsHierarchyTree.selectable )
{
model.numTestsRun++;
/* JT 5/28/09 - added this conditional to handle bugreport FXU-38, the testFinished method of
* this class mistakenly assumed that any test which finished was successful. This is not the
* case, as failures and successes are both valid cases for a finished test.
*/
if(!lastFailedTest || description.displayName != lastFailedTest.displayName){
var totalAssertions:uint = flexunit.framework.Assert.assetionsMade + org.flexunit.Assert.assertionsMade;
addTestToList( description, null, false, totalAssertions );
}
rightHandSide.onTestEnd();
//removed until we can make this work correctly across all cases
rightHandSide.selectedTestCaseForm.assertionsPerTest.invalidateProperties();
}
}
public function testFailure( failure:Failure ):void {
/* JT 5/28/09 - added lastFailedTest to handle bugreport FXU-38, the testFinished method of this class
* mistakenly assumed that any test which finished was successful. This is not the case, as failures and
* successes are both valid cases for a finished test. With this variab
le, we can now prevent counting
* finished failures as successes.
*/
lastFailedTest = failure.description;
model.addFailure();
var totalAssertions:uint = flexunit.framework.Assert.assetionsMade + org.flexunit.Assert.assertionsMade;
addTestToList( failure.description, failure, false, totalAssertions );
rightHandSide.selectedTestCaseViewStack.selectedIndex = 1;
}
public function testAssumptionFailure( failure:Failure ):void {
}
/**
* Called when a test will not be run, generally because a test method is annotated
* with {@link org.junit.Ignore}.
*
* @param description describes the test that will not be run
*/
public function testIgnored( description:IDescription ):void {
model.addIgnore();
addTestToList( description, null, true );
}
public function testTimed( description:IDescription, runTime:Number ):void {
lastRunTime = runTime;
}
/*
public function onSuccess(
test : Test ) : void
{
if( ! leftHandSide.testCasesContainer.allTestsHierarchyTree.selectable )
{
addTestToList( true, test );
}
}
public function onError( test : Test, error : Error ) : void
{
model.addError();
addTestToList( false, test, error );
rightHandSide.selectedTestCaseViewStack.selectedIndex = 1;
}
public function onFailure(
test : Test,
error : AssertionFailedError ) : void
{
model.addFailure();
addTestToList( false, test, error, true );
rightHandSide.selectedTestCaseViewStack.selectedIndex = 1;
}*/
// To replace Binding MetaTag
private function updateRowSummaryToDisplay() : void
{
rightHandSide.updateRowSummaryToDisplay();
leftHandSide.updateScrollPosition();
}
]]>
</mx:Script>
<data:TestRunnerBasePresentationModel
id="model"
rowSelectedChanged="updateRowSummaryToDisplay()"
testSuiteRunDurationChanged="rightHandSide.updateRunDuration()"
totalErrorsChanged="rightHandSide.updateTotalErrorUI()"
totalFailuresChanged="rightHandSide.updateTotalFailureUI()"
totalIgnoredChanged="rightHandSide.updateTotalIgnoredUI()"
progressChanged="rightHandSide.onTestEnd()"
filterEnableChanged="leftHandSide.updateFilterSectionEnable()"
filterChanged="leftHandSide.refreshTree()"
/>
<mx:HBox
verticalAlign="bottom"
horizontalGap="0">
<controls:Title
text="{ FlexUnitLabels.FLEXUNIT } {FlexUnitCore.version} { FlexUnitLabels.RUNNER }"
styleName="panelTitleStyle"
width="275"
/>
<controls:Title
text="{ FlexUnitLabels.POWERED_BY_ADOBE_CONSULTING }"
styleName="panelTitleSubStyle"
useHandCursor="true"
buttonMode="true"
mouseChildren= "false"
click="navigateToURL( new URLRequest( 'http://www.adobe.com/consulting/' ) )"
/>
</mx:HBox>
<mx:HRule
styleName="flexUnitHRule"
width="100%"
/>
<mx:HDividedBox
width="100%" height="100%"
horizontalGap="30"
paddingTop="5"
paddingBottom="30"
paddingLeft="25"
paddingRight="25">
<controls:LeftHandSide
id="leftHandSide"
/>
<controls:RightHandSide
id="rightHandSide"
/>
</mx:HDividedBox>
</mx:Panel><!--
- 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.
--->
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+-->
+<mx:Panel
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns="*"
+ xmlns:data="org.flexunit.flexui.data.*"
+ xmlns:controls="org.flexunit.flexui.controls.*"
+ styleName="mainPanel"
+ width="100%"
+ height="100%"
+ minHeight="500"
+ minWidth="850"
+ verticalScrollPolicy="off"
+ horizontalScrollPolicy="off"
+ modalTransparencyBlur="0"
+ modalTransparency="0"
+ implements="org.flexunit.runner.notification.ITemporalRunListener"
+ creationComplete="handleCreationComplete()" >
+
+ <mx:Metadata>
+ [Event( name="testsComplete", type="org.flexunit.flexui.event.TestsCompleteEvent")]
+ </mx:Metadata>
+ <mx:Style>
+ @font-face {
+ font-family: "Myriad Pro SemiCond";
+ src: url("/fonts/fonts.swf");
+ }
+
+ /* Font for anything else */
+ @font-face {
+ font-family: "Myriad Pro";
+ src: url("/fonts/fonts.swf");
+ }
+
+ @font-face {
+ font-family: "Myriad Pro";
+ font-weight: bold;
+ src: url("/fonts/fonts.swf");
+ }
+
+ /* Class-selectors are the only way to apply styles to components */
+ .flexUnitApplication {
+ backgroundColor: #3872b2;
+ backgroundGradientColors: #3872b2, #0c1a3d;
+ backgroundGradientAlphas: 1, 1;
+ themeColor: #ffffff;
+ color: #444444;
+ fontFamily: "Myriad Pro";
+ fontSize: 12;
+ verticalScrollBarStyleName: flexUnitScrollBar;
+ horizontalScrollBarStyleName: flexUnitScrollBar;
+ modal-transparency-blur: 0;
+ modal-transparency: 0;
+ }
+
+ .myToolTip {
+ fontFamily: "Myriad Pro";
+ background-color: #3872b2;
+ leading: 5;
+ }
+
+ .flexUnitVBox {
+ verticalScrollBarStyleName: flexUnitScrollBar;
+ horizontalScrollBarStyleName: flexUnitScrollBar;
+ }
+
+ .flexUnitScrollBar
+ {
+ downArrowDisabledSkin: Embed(source="/skins/VScrollBar_downArrowDisabledSkin.png");
+ downArrowDownSkin: Embed(source="/skins/VScrollBar_downArrowDownSkin.png");
+ downArrowOverSkin: Embed(source="/skins/VScrollBar_downArrowOverSkin.png");
+ downArrowUpSkin: Embed(source="/skins/VScrollBar_downArrowUpSkin.png");
+ thumbIcon: Embed(source="/skins/VScrollBar_thumbIcon.png");
+ trackSkin: Embed(source="/skins/VScrollBar_trackSkin.png");
+ upArrowDisabledSkin: Embed(source="/skins/VScrollBar_upArrowDisabledSkin.png");
+ upArrowDownSkin: Embed(source="/skins/VScrollBar_upArrowDownSkin.png");
+ upArrowOverSkin: Embed(source="/skins/VScrollBar_upArrowOverSkin.png");
+ upArrowUpSkin: Embed(source="/skins/VScrollBar_upArrowUpSkin.png");
+ thumbDownSkin: Embed(
+ source="/skins/VScrollBar_thumbDownSkin.png",
+ scaleGridLeft="1", scaleGridTop="5",
+ scaleGridRight="8", scaleGridBottom="44" );
+ thumbOverSkin: Embed(
+ source="/skins/VScrollBar_thumbOverSkin.png",
+ scaleGridLeft="1", scaleGridTop="5",
+ scaleGridRight="8", scaleGridBottom="44" );
+ thumbUpSkin: Embed(
+ source="/skins/VScrollBar_thumbUpSkin.png",
+ scaleGridLeft="1", scaleGridTop="5",
+ scaleGridRight="8", scaleGridBottom="44" );
+ }
+
+ .flexUnitDataGrid {
+ alternatingItemColors: #ffffff, #f6f6f6;
+ headerColors: #fcfcfc, #e5e5e5;
+ verticalGridLineColor: #dcdcdc;
+ useRollOver: false;
+ rollOverColor: #cccccc;
+ selectionColor: #2863b4;
+ textSelectedColor: #ffffff;
+ }
+
+ .flexUnitSlider {
+ themeColor: #2863b4;
+ }
+
+ .flexUnitTree {
+ alternatingItemColors: #ffffff, #f6f6f6;
+ headerColors: #fcfcfc, #e5e5e5;
+ verticalGridLineColor: #dcdcdc;
+ useRollOver: false;
+ rollOverColor: #cccccc;
+ selectionColor: #2863b4;
+ textSelectedColor: #ffffff;
+ verticalScrollBarStyleName: flexUnitScrollBar;
+ horizontalScrollBarStyleName: flexUnitScrollBar;
+ }
+
+ .mainPanel {
+ header-height: 0;
+ vertical-gap: 2;
+ borderSkin: Embed(
+ source="/skins/Panel_borderSkin.png",
+ scaleGridLeft="12", scaleGridTop="31",
+ scaleGridRight="265", scaleGridBottom="189" );
+ padding-top: 20;
+ padding-left: 8;
+ padding-right: 8;
+ }
+
+ .flexUnitTextInput {
+ themeColor: #ffffff;
+ }
+
+ .flexUnitTextAreaWithBorder {
+ borderSkin: Embed(
+ source="/skins/TextArea_borderSkin.png",
+ scaleGridLeft="4", scaleGridTop="4",
+ scaleGridRight="150", scaleGridBottom="18" );
+ paddingTop: 10;
+ leading: 0;
+ fontSize: 11;
+ wordWrap: false;
+ verticalScrollBarStyleName: flexUnitScrollBar;
+ horizontalScrollBarStyleName: flexUnitScrollBar;
+ }
+
+ .flexUnitTextArea {
+ borderStyle: none;
+ backgroundAlpha: 0;
+ paddingTop: 10;
+ leading: 0;
+ fontSize: 11;
+ wordWrap: false;
+ verticalScrollBarStyleName: flexUnitScrollBar;
+ horizontalScrollBarStyleName: flexUnitScrollBar;
+ }
+
+ .panelTitleStyle {
+ fontFamily: "Myriad Pro SemiCond";
+ fontSize: 24;
+ textIndent: 20;
+ }
+
+ .panelTitleSubStyle {
+ fontFamily: "Myriad Pro SemiCond";
+ fontSize: 16;
+ }
+
+ .flexUnitHRule {
+ strokeColor: #b9b9b9;
+ strokeWidth: 2;
+ shadowColor: #FFFFFF;
+ }
+
+ .h1 {
+ fontFamily: "Myriad Pro SemiCond";
+ fontSize: 18;
+ }
+
+ .h2 {
+ fontSize: 13;
+ }
+
+ .flexUnitComboBox {
+ upSkin: Embed(
+ source="/skins/ComboBox_upSkin.png",
+ scaleGridLeft="4", scaleGridTop="4",
+ scaleGridRight="64", scaleGridBottom="18" );
+ overSkin: Embed(
+ source="/skins/ComboBox_overSkin.png",
+ scaleGridLeft="4", scaleGridTop="4",
+ scaleGridRight="64", scaleGridBottom="18" );
+ downSkin: Embed(
+ source="/skins/ComboBox_downSkin.png",
+ scaleGridLeft="4", scaleGridTop="4",
+ scaleGridRight="64", scaleGridBottom="18" );
+ disabledSkin: Embed(
+ source="/skins/ComboBox_disabledSkin.png",
+ scaleGridLeft="4", scaleGridTop="4",
+ scaleGridRight="64", scaleGridBottom="18" );
+ themeColor: #2863b4;
+ }
+
+ .flexUnitProgressBar
+ {
+ barColor: #51C148;
+ trackSkin: Embed(
+ source="/skins/ProgressBar_trackSkin.png",
+ scaleGridLeft="1", scaleGridTop="0",
+ scaleGridRight="149", scaleGridBottom="3" );
+ trackHeight: 11;
+ }
+
+ .flexUnitForm {
+ paddingTop: 0;
+ paddingBottom: 0;
+ paddingLeft: 0;
+ paddingRight: 0;
+ verticalGap: -2;
+ }
+
+ .flexUnitFormItemLabel {
+ color: #777777;
+ }
+
+ .flexUnitFormItemValue {
+ color: #444444;
+ }
+
+ .flexUnitButtonBar
+ {
+ horizontalGap: -1;
+ firstButtonStyleName: "firstButtonBarButton";
+ lastButtonStyleName: "lastButtonBarButton";
+ }
+
+ .firstButtonBarButton
+ {
+ disabledSkin: Embed(
+ source="/skins/ButtonBarFirstButton_disabledSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ downSkin: Embed(
+ source="/skins/ButtonBarFirstButton_downSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ overSkin: Embed(
+ source="/skins/ButtonBarFirstButton_overSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedDisabledSkin: Embed(
+ source="/skins/ButtonBarFirstButton_selectedDisabledSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedDownSkin: Embed(
+ source="/skins/ButtonBarFirstButton_downSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedOverSkin: Embed(
+ source="/skins/ButtonBarFirstButton_overSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedUpSkin: Embed(
+ source="/skins/ButtonBarFirstButton_selectedUpSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ upSkin: Embed(
+ source="/skins/ButtonBarFirstButton_upSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ }
+
+ .lastButtonBarButton
+ {
+ disabledSkin: Embed(
+ source="/skins/ButtonBarLastButton_disabledSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ downSkin: Embed(
+ source="/skins/ButtonBarLastButton_downSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ overSkin: Embed(
+ source="/skins/ButtonBarLastButton_overSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedDisabledSkin: Embed(
+ source="/skins/ButtonBarLastButton_disabledSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedDownSkin: Embed(
+ source="/skins/ButtonBarLastButton_downSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedOverSkin: Embed(
+ source="/skins/ButtonBarLastButton_overSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedUpSkin: Embed(
+ source="/skins/ButtonBarLastButton_selectedUpSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ upSkin: Embed(
+ source="/skins/ButtonBarLastButton_upSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ }
+
+ .flexUnitControlBar {
+ paddingTop: 5;
+ paddingBottom: 2;
+ paddingLeft: 4;
+ paddingRight: 12;
+ borderSkin: Embed(
+ source="/skins/Panel_controlBarBackgroundSkin.png",
+ scaleGridLeft="8", scaleGridTop="1",
+ scaleGridRight="270", scaleGridBottom="17" );
+ }
+ </mx:Style>
+
+ <mx:Script>
+ <![CDATA[
+ import flash.net.navigateToURL;
+
+ import mx.controls.ToolTip;
+ import mx.controls.listClasses.ListBase;
+ import mx.core.ScrollPolicy;
+ import mx.managers.ToolTipManager;
+
+ import org.flexunit.Assert;
+ import flexunit.framework.Assert;
+ import org.flexunit.flexui.controls.FlexUnitLabels;
+ import org.flexunit.flexui.data.TestFunctionRowData;
+ import org.flexunit.flexui.event.TestsCompleteEvent;
+ import org.flexunit.runner.Description;
+ import org.flexunit.runner.Descriptor;
+ import org.flexunit.runner.FlexUnitCore;
+ import org.flexunit.runner.IDescription;
+ import org.flexunit.runner.Result;
+ import org.flexunit.runner.notification.Failure;
+
+ public var test : *;// TODO: [XB] was Test;
+
+
+ /* JT 5/28/09 - added lastFailedTest to handle bugreport FXU-38, the testFinished method of this class
+ * mistakenly assumed that any test which finished was successful. This is not the case, as failures and
+ * successes are both valid cases for a finished test. With this variable, we can now prevent counting
+ * finished failures as successes.
+ */
+ private var lastFailedTest:IDescription;
+ private function handleCreationComplete() : void
+ {
+ ToolTip.maxWidth = 900;
+ rightHandSide.model = model;
+ leftHandSide.model = model;
+
+ model.filterSectionEnabled = false;
+ }
+
+ public function startTest() : void
+ {
+ // if( test != null )
+ {
+ // model.totalTests = test.countTestCases(); // TODO: [XB] reenable this
+
+ model.launchTests();
+
+ rightHandSide.launchTests();
+ leftHandSide.launchTests();
+ }
+ }
+
+ private function addTestToList(
+ description : IDescription,
+ failure : Failure = null,
+ ignored : Boolean = false,
+ assertionsMade: uint= 0 ) : void
+ {
+ var rowAdded : TestFunctionRowData;
+
+ rowAdded = model.addTestRowToHierarchicalList( description, failure, ignored, lastRunTime, assertionsMade );
+
+ leftHandSide.testCasesContainer.allTestsHierarchyTree.verticalScrollPosition
+ = leftHandSide.testCasesContainer.allTestsHierarchyTree.maxVerticalScrollPosition;
+
+ /*if( ! success )
+ {
+ model.rowSelected = rowAdded;
+// }*/
+ }
+
+ //---------------------------------------------------------------------
+ // IFlexWriter Methods
+ //---------------------------------------------------------------------
+ public function testRunStarted( description:IDescription ):void {
+ model.totalTests = description.testCount;
+ this.startTest();
+ }
+
+ public function testRunFinished( result:Result ):void {
+ rightHandSide.onAllTestsEnd();
+ leftHandSide.onAllTestsEnd();
+
+ dispatchEvent( new TestsCompleteEvent() );
+ }
+
+ private var lastRunTime:Number = 0;
+ public function testStarted( description:IDescription ):void {
+ }
+
+ public function testFinished( description:IDescription ):void {
+ if( ! leftHandSide.testCasesContainer.allTestsHierarchyTree.selectable )
+ {
+ model.numTestsRun++;
+ /* JT 5/28/09 - added this conditional to handle bugreport FXU-38, the testFinished method of
+ * this class mistakenly assumed that any test which finished was successful. This is not the
+ * case, as failures and successes are both valid cases for a finished test.
+ */
+ if(!lastFailedTest || description.displayName != lastFailedTest.displayName){
+ var totalAssertions:uint = flexunit.framework.Assert.assetionsMade + org.flexunit.Assert.assertionsMade;
+ addTestToList( description, null, false, totalAssertions );
+ }
+
+ rightHandSide.onTestEnd();
+
+ //removed until we can make this work correctly across all cases
+ rightHandSide.selectedTestCaseForm.assertionsPerTest.invalidateProperties();
+ }
+ }
+
+ public function testFailure( failure:Failure ):void {
+ /* JT 5/28/09 - added lastFailedTest to handle bugreport FXU-38, the testFinished method of this class
+ * mistakenly assumed that any test which finished was successful. This is not the case, as failures and
+ * successes are both valid cases for a finished test. With this variable, we can now prevent counting
+ * finished failures as successes.
+ */
+ lastFailedTest = failure.description;
+ model.addFailure();
+
+ var totalAssertions:uint = flexunit.framework.Assert.assetionsMade + org.flexunit.Assert.assertionsMade;
+ addTestToList( failure.description, failure, false, totalAssertions );
+
+ rightHandSide.selectedTestCaseViewStack.selectedIndex = 1;
+ }
+
+ public function testAssumptionFailure( failure:Failure ):void {
+ }
+
+ /**
+ * Called when a test will not be run, generally because a test method is annotated
+ * with {@link org.junit.Ignore}.
+ *
+ * @param description describes the test that will not be run
+ */
+ public function testIgnored( description:IDescription ):void {
+ model.addIgnore();
+
+ addTestToList( description, null, true );
+ }
+
+ public function testTimed( description:IDescription, runTime:Number ):void {
+ lastRunTime = runTime;
+ }
+
+ /*
+ public function onSuccess( test : Test ) : void
+ {
+ if( ! leftHandSide.testCasesContainer.allTestsHierarchyTree.selectable )
+ {
+ addTestToList( true, test );
+ }
+ }
+
+ public function onError( test : Test, error : Error ) : void
+ {
+ model.addError();
+
+ addTestToList( false, test, error );
+
+ rightHandSide.selectedTestCaseViewStack.selectedIndex = 1;
+ }
+
+ public function onFailure(
+ test : Test,
+ error : AssertionFailedError ) : void
+ {
+ model.addFailure();
+
+ addTestToList( false, test, error, true );
+
+ rightHandSide.selectedTestCaseViewStack.selectedIndex = 1;
+ }*/
+
+ // To replace Binding MetaTag
+ private function updateRowSummaryToDisplay() : void
+ {
+ rightHandSide.updateRowSummaryToDisplay();
+ leftHandSide.updateScrollPosition();
+ }
+
+ ]]>
+ </mx:Script>
+
+ <data:TestRunnerBasePresentationModel
+ id="model"
+ rowSelectedChanged="updateRowSummaryToDisplay()"
+ testSuiteRunDurationChanged="rightHandSide.updateRunDuration()"
+ totalErrorsChanged="rightHandSide.updateTotalErrorUI()"
+ totalFailuresChanged="rightHandSide.updateTotalFailureUI()"
+ totalIgnoredChanged="rightHandSide.updateTotalIgnoredUI()"
+ progressChanged="rightHandSide.onTestEnd()"
+ filterEnableChanged="leftHandSide.updateFilterSectionEnable()"
+ filterChanged="leftHandSide.refreshTree()"
+ />
+
+ <mx:HBox
+ verticalAlign="bottom"
+ horizontalGap="0">
+
+ <controls:Title
+ text="{ FlexUnitLabels.FLEXUNIT } {FlexUnitCore.version} { FlexUnitLabels.RUNNER }"
+ styleName="panelTitleStyle"
+ width="275"
+ />
+
+ <controls:Title
+ text="{ FlexUnitLabels.POWERED_BY_ADOBE_CONSULTING }"
+ styleName="panelTitleSubStyle"
+ useHandCursor="true"
+ buttonMode="true"
+ mouseChildren= "false"
+ click="navigateToURL( new URLRequest( 'http://www.adobe.com/consulting/' ) )"
+ />
+
+ </mx:HBox>
+
+ <mx:HRule
+ styleName="flexUnitHRule"
+ width="100%"
+ />
+
+ <mx:HDividedBox
+ width="100%" height="100%"
+ horizontalGap="30"
+ paddingTop="5"
+ paddingBottom="30"
+ paddingLeft="25"
+ paddingRight="25">
+
+ <controls:LeftHandSide
+ id="leftHandSide"
+ />
+
+ <controls:RightHandSide
+ id="rightHandSide"
+ />
+
+ </mx:HDividedBox>
+
+</mx:Panel>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/8d0f8f20/FlexUnit4UIListener/src/org/flexunit/flexui/controls/PromptingTextInput.as
----------------------------------------------------------------------
diff --git a/FlexUnit4UIListener/src/org/flexunit/flexui/controls/PromptingTextInput.as b/FlexUnit4UIListener/src/org/flexunit/flexui/controls/PromptingTextInput.as
index b79f640..27702eb 100644
--- a/FlexUnit4UIListener/src/org/flexunit/flexui/controls/PromptingTextInput.as
+++ b/FlexUnit4UIListener/src/org/flexunit/flexui/controls/PromptingTextInput.as
@@ -1,3 +1,19 @@
+/*
+ * 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 org.flexunit.flexui.controls
{
http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/8d0f8f20/pom.template
----------------------------------------------------------------------
diff --git a/pom.template b/pom.template
index 583eb80..81377e4 100644
--- a/pom.template
+++ b/pom.template
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--
+ 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.
+-->
<project>
<modelVersion>4.0.0</modelVersion>
http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/8d0f8f20/utils.xml
----------------------------------------------------------------------
diff --git a/utils.xml b/utils.xml
index 2ec476a..b4915cb 100644
--- a/utils.xml
+++ b/utils.xml
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<project>
<macrodef name="gpg">
<attribute name="todir" />