From 1033e6d7c39f1dbcc91c064e85a622ff802c42b5 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Thu, 26 Aug 2021 09:51:56 -0700 Subject: [PATCH] Tests can be run in AIR instead of Flash Player --- test/source/TestFeathers-app.xml | 19 +++++++++++++++++++ test/source/TestFeathers.as | 15 ++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 test/source/TestFeathers-app.xml diff --git a/test/source/TestFeathers-app.xml b/test/source/TestFeathers-app.xml new file mode 100644 index 0000000000..9cb84e1241 --- /dev/null +++ b/test/source/TestFeathers-app.xml @@ -0,0 +1,19 @@ + + + com.feathersui.TestFeathers + TestFeathers + TestFeathers + 1.0.0 + Test runner for Feathers UI controls for Starling + 2021 Bowler Hat LLC + + + TestFeathers.swf + true + false + true + direct + + + en + \ No newline at end of file diff --git a/test/source/TestFeathers.as b/test/source/TestFeathers.as index eb4488fca8..85c1128d9e 100644 --- a/test/source/TestFeathers.as +++ b/test/source/TestFeathers.as @@ -150,7 +150,9 @@ package import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; + import flash.system.Capabilities; import flash.system.fscommand; + import flash.utils.getDefinitionByName; import org.flexunit.internals.TraceListener; import org.flexunit.listeners.CIListener; @@ -365,7 +367,18 @@ package private function flexunit_testsCompleteHandler(event:flash.events.Event):void { - fscommand("quit"); + if(Capabilities.playerType == "Desktop") + { + var NativeApplication:Class = Class(getDefinitionByName("flash.desktop.NativeApplication")); + if(NativeApplication) + { + NativeApplication.nativeApplication.exit(); + } + } + else + { + fscommand("quit"); + } } }