You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2012/11/27 08:07:35 UTC
svn commit: r1414003 - in
/incubator/flex/sdk/branches/develop/mustella/tests/apollo:
WindowedApplication/SWFs/ WindowedApplication/Styles/
WindowedApplication/Styles/baselines/ spark/components/Window/SWFs/comps/
spark/components/Window/integration/ s...
Author: aharui
Date: Tue Nov 27 07:07:32 2012
New Revision: 1414003
URL: http://svn.apache.org/viewvc?rev=1414003&view=rev
Log:
Fix apollo tests on Windows
Added:
incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/SWFs/MyCompareBitmap.as
incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_wa_backgroundColor_backgroundAlpha_setStyle_runtime_1_win.png (with props)
incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_wa_backgroundColor_backgroundAlpha_setStyle_runtime_2_win.png (with props)
incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_window_backgroundColor_backgroundAlpha_setStyle_runtime_1_win.png (with props)
incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_window_backgroundColor_backgroundAlpha_setStyle_runtime_2_win.png (with props)
Modified:
incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/WindowedApp_backgroundStyles_tester.mxml
incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/SWFs/comps/WindowWithModule.mxml
incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/integration/baselines/Window_integration_module_1.png
incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/integration/window_integration_module.mxml
incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/methods/baselines/method_addElement_test1.png
incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/methods/window_methods_elementRelated.mxml
incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/baselines/maximizable_false_test4_SparkChrome.png
incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/baselines/maximizable_true_test4_SparkChrome.png
incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/window_properties_maximizable_false.mxml
incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/window_properties_maximizable_true.mxml
incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_mxml_tests.mxml
Added: incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/SWFs/MyCompareBitmap.as
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/SWFs/MyCompareBitmap.as?rev=1414003&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/SWFs/MyCompareBitmap.as (added)
+++ incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/SWFs/MyCompareBitmap.as Tue Nov 27 07:07:32 2012
@@ -0,0 +1,58 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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
+{
+ import flash.system.Capabilities;
+ import flash.display.DisplayObject;
+ public class MyCompareBitmap extends CompareBitmap
+ {
+ //add mac_url, linux_url property, also make sure they are set when
+ //execute is called. when os is mac or linux, if the value mac_url, linux_url is set,
+ //test assumes the image will be different than the one created in window, so
+ // the bitmap image will be read/created from mac_url or linux_url.
+
+ public var mac_url:String;
+ public var linux_url:String;
+ public var isURLConfigured:Boolean=false;
+
+ public function configureURL():void
+ {
+ trace("###configureURL is called");
+ var current_os:String=Capabilities.os.toLowerCase();
+ if (current_os.indexOf("window")>-1)
+ {
+ trace("###url="+url);
+ }else if (current_os.indexOf("mac")>-1 && mac_url!="")
+ {
+ url=mac_url;
+ }else if (current_os.indexOf("linux")>-1 && linux_url!="")
+ {
+ url=linux_url;
+ }
+ isURLConfigured=true;
+ }
+ override public function execute(root:DisplayObject, context:UnitTester,testCase:TestCase,
+ testResult:TestResult):Boolean
+ {
+ if (!isURLConfigured)
+ configureURL();
+ return super.execute(root,context,testCase,testResult);
+ }
+ }
+}
\ No newline at end of file
Modified: incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/WindowedApp_backgroundStyles_tester.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/WindowedApp_backgroundStyles_tester.mxml?rev=1414003&r1=1414002&r2=1414003&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/WindowedApp_backgroundStyles_tester.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/WindowedApp_backgroundStyles_tester.mxml Tue Nov 27 07:07:32 2012
@@ -53,11 +53,11 @@
<AssertStyleValue styleName="backgroundColor" target="" value="255" />
<AssertStyleValue styleName="backgroundAlpha" target="" value="0.5" />
- <CompareBitmap target="" url="../styles/baselines/$testID_1.png"/>
+ <MyCompareBitmap target="" url="../Styles/baselines/$testID_1_win.png" mac_url="../Styles/baselines/$testID_1.png" />
<SetStyle styleName="backgroundAlpha" target="" value="0.2" waitEvent="updateComplete" waitTarget=""/>
<SetStyle styleName="backgroundColor" target="" value="0x00FF00" waitEvent="updateComplete" waitTarget=""/>
- <CompareBitmap target="" url="../styles/baselines/$testID_2.png"/>
+ <MyCompareBitmap target="" url="../Styles/baselines/$testID_2_win.png" mac_url="../Styles/baselines/$testID_2.png" />
<AssertStyleValue styleName="backgroundColor" target="" value="65280" />
<AssertStyleValue styleName="backgroundAlpha" target="" value="0.2" />
</body>
@@ -70,12 +70,12 @@
<SetProperty propertyName="visible" target="" value="false"/>
<AssertStyleValue styleName="backgroundColor" target="myWin" value="16711680" />
<AssertStyleValue styleName="backgroundAlpha" target="myWin" value="0.2" />
- <CompareBitmap target="myWin" url="../styles/baselines/$testID_1.png"/>
+ <MyCompareBitmap target="" url="../Styles/baselines/$testID_1_win.png" mac_url="../Styles/baselines/$testID_1.png" />
<SetStyle styleName="backgroundAlpha" target="myWin" value="0.2" />
<SetStyle styleName="backgroundColor" target="myWin" value="0x00FF00" waitEvent="updateComplete" waitTarget="myWin"/>
- <CompareBitmap target="myWin" url="../styles/baselines/$testID_2.png"/>
+ <MyCompareBitmap target="myWin" url="../Styles/baselines/$testID_2_win.png" mac_url="../Styles/baselines/$testID_2.png" />
<AssertStyleValue styleName="backgroundColor" target="myWin" value="65280" />
<AssertStyleValue styleName="backgroundAlpha" target="myWin" value="0.2" />
Added: incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_wa_backgroundColor_backgroundAlpha_setStyle_runtime_1_win.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_wa_backgroundColor_backgroundAlpha_setStyle_runtime_1_win.png?rev=1414003&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_wa_backgroundColor_backgroundAlpha_setStyle_runtime_1_win.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_wa_backgroundColor_backgroundAlpha_setStyle_runtime_2_win.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_wa_backgroundColor_backgroundAlpha_setStyle_runtime_2_win.png?rev=1414003&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_wa_backgroundColor_backgroundAlpha_setStyle_runtime_2_win.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_window_backgroundColor_backgroundAlpha_setStyle_runtime_1_win.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_window_backgroundColor_backgroundAlpha_setStyle_runtime_1_win.png?rev=1414003&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_window_backgroundColor_backgroundAlpha_setStyle_runtime_1_win.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_window_backgroundColor_backgroundAlpha_setStyle_runtime_2_win.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_window_backgroundColor_backgroundAlpha_setStyle_runtime_2_win.png?rev=1414003&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/apollo/WindowedApplication/Styles/baselines/mx_window_backgroundColor_backgroundAlpha_setStyle_runtime_2_win.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/SWFs/comps/WindowWithModule.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/SWFs/comps/WindowWithModule.mxml?rev=1414003&r1=1414002&r2=1414003&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/SWFs/comps/WindowWithModule.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/SWFs/comps/WindowWithModule.mxml Tue Nov 27 07:07:32 2012
@@ -22,6 +22,6 @@
<mx:Label text="loading module..." />
- <mx:ModuleLoader url="./assets/testmodule.swf" />
+ <mx:ModuleLoader id="ml" url="./assets/testmodule.swf" />
</s:Group>
</s:Window>
Modified: incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/integration/baselines/Window_integration_module_1.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/integration/baselines/Window_integration_module_1.png?rev=1414003&r1=1414002&r2=1414003&view=diff
==============================================================================
Binary files - no diff available.
Modified: incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/integration/window_integration_module.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/integration/window_integration_module.mxml?rev=1414003&r1=1414002&r2=1414003&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/integration/window_integration_module.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/integration/window_integration_module.mxml Tue Nov 27 07:07:32 2012
@@ -87,6 +87,7 @@
<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createAWindowByClass(WindowWithModule,'window1');" waitTarget="" waitEvent="myWindowComplete"/>
<!-- module should be loaded inside of the window -->
+ <WaitForEvent target="windowObj.ml" eventName="ready" />
</setup>
Modified: incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/methods/baselines/method_addElement_test1.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/methods/baselines/method_addElement_test1.png?rev=1414003&r1=1414002&r2=1414003&view=diff
==============================================================================
Binary files - no diff available.
Modified: incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/methods/window_methods_elementRelated.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/methods/window_methods_elementRelated.mxml?rev=1414003&r1=1414002&r2=1414003&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/methods/window_methods_elementRelated.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/methods/window_methods_elementRelated.mxml Tue Nov 27 07:07:32 2012
@@ -113,6 +113,7 @@
<WaitForEvent numExpectedEvents="-1" eventName="updateComplete" target="myWin" timeout="2000" />
<WaitForLayoutManager />
+ <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="5"/>
<MyCompareBitmap target="myWin" numColorVariances="15" maxColorVariance="20" url="../methods/baselines/$testID.png" mac_url="../methods/baselines/$testID_mac.png" />
Modified: incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/baselines/maximizable_false_test4_SparkChrome.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/baselines/maximizable_false_test4_SparkChrome.png?rev=1414003&r1=1414002&r2=1414003&view=diff
==============================================================================
Binary files - no diff available.
Modified: incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/baselines/maximizable_true_test4_SparkChrome.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/baselines/maximizable_true_test4_SparkChrome.png?rev=1414003&r1=1414002&r2=1414003&view=diff
==============================================================================
Binary files - no diff available.
Modified: incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/window_properties_maximizable_false.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/window_properties_maximizable_false.mxml?rev=1414003&r1=1414002&r2=1414003&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/window_properties_maximizable_false.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/window_properties_maximizable_false.mxml Tue Nov 27 07:07:32 2012
@@ -156,6 +156,7 @@
<body>
<RunCode code="FlexGlobals.topLevelApplication.myWin.maximizable='false'"/>
<RunCode code="FlexGlobals.topLevelApplication.myWin.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+ <WaitForLayoutManager />
<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
<MyCompareBitmap url="../Properties/Baselines/$testID.png" mac_url="../Properties/Baselines/$testID_mac.png" target="myWin.skin.titleBar.maximizeButton" />
</body>
Modified: incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/window_properties_maximizable_true.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/window_properties_maximizable_true.mxml?rev=1414003&r1=1414002&r2=1414003&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/window_properties_maximizable_true.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/Window/properties/window_properties_maximizable_true.mxml Tue Nov 27 07:07:32 2012
@@ -134,6 +134,8 @@
</setup>
<body>
<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
+ <WaitForLayoutManager />
+ <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
<MyCompareBitmap url="../Properties/Baselines/$testID.png" mac_url="../Properties/Baselines/$testID_mac.png" target="windowObj.skin.titleBar.maximizeButton" />
</body>
</TestCase>
Modified: incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_mxml_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_mxml_tests.mxml?rev=1414003&r1=1414002&r2=1414003&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_mxml_tests.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_mxml_tests.mxml Tue Nov 27 07:07:32 2012
@@ -71,6 +71,8 @@ testSWF="wa_styles_mxml.mxml">
<TestCase testID="style_focusColor_mxml_test1" keywords="[WindowedApplication,style,focusColor]" description="Set focusColor with setStyle().">
<body>
<RunCode code="FlexGlobals.topLevelApplication.group1.btn1.focusManager.setFocus(FlexGlobals.topLevelApplication.group1.btn1); FlexGlobals.topLevelApplication.group1.btn1.focusManager.showFocus()" />
+ <WaitForLayoutManager />
+ <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
<CompareBitmap target="group1" url="../styles/baselines/$testID.png" />
</body>
</TestCase>