File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package starling.unit
22{
33 import flash.utils.getDefinitionByName ;
4+ import flash.utils.setTimeout ;
45
56 import starling.display.Sprite ;
67 import starling.text.TextField ;
78 import starling.utils.Align ;
89 import starling.utils.Color ;
910 import starling.utils.StringUtil ;
11+ import starling.utils.SystemUtil ;
1012
1113 public class SimpleTestGui extends TestGui
1214 {
@@ -38,12 +40,12 @@ package starling.unit
3840
3941 override public function onFinished ():void
4042 {
41- try
43+ if (SystemUtil . isAIR)
4244 {
43- var nativeApp: Class = getDefinitionByName ("flash.desktop.NativeApplication" ) as Class ;
44- nativeApp[ "nativeApplication" ] . exit ((testCount == successCount) ? 0 : 1 );
45+ var nativeAppClass: Object = getDefinitionByName ("flash.desktop::NativeApplication" );
46+ var nativeApp: Object = nativeAppClass[ "nativeApplication" ];
47+ setTimeout(nativeApp. exit , 5000 , (testCount == successCount) ? 0 : 1 );
4548 }
46- catch (e: Error ) {}
4749 }
4850
4951 override public function log (message :String , color :uint = 0xffffff ):void
You can’t perform that action at this time.
0 commit comments