| <?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. |
| |
| --> |
| <UnitTester xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:mx="library://ns.adobe.com/flex/mx" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns="*" |
| testDir="mobile/ViewAndViewNavigator/tests/" |
| testSWF="ViewAndViewNavigatorNoView.mxml"> |
| |
| <fx:Script source="globalNotTabbed.as" /> |
| |
| <fx:Script> |
| <![CDATA[ |
| |
| import mx.core.FlexGlobals; |
| import views.*; |
| import spark.components.ViewNavigator; |
| import mx.core.mx_internal; |
| |
| use namespace mx_internal; |
| |
| public static function init(o:DisplayObject):void { } |
| |
| /* |
| public function resetApp():void { |
| if(FlexGlobals.topLevelApplication.navigator.activeView is Sect1View1) { |
| FlexGlobals.topLevelApplication.navigator.dispatchEvent( new Event("complete") ); |
| } else { |
| FlexGlobals.topLevelApplication.navigator.selectedIndex = 0; |
| FlexGlobals.topLevelApplication.navigator.popToFirstView(); |
| } |
| } |
| */ |
| |
| ]]> |
| </fx:Script> |
| |
| <fx:Metadata><![CDATA[ [Mixin] ]]></fx:Metadata> |
| |
| <testCases> |
| |
| <TestCase testID="noView" keywords="[view, tabBar]" description="Verify when no section or view is specified, a new section is created and and empty view is shown"> |
| |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.resetApp()" waitTarget="navigator" waitEvent="myEvent" /> |
| </setup> |
| |
| <body> |
| <AssertMethodValue method="value = FlexGlobals.topLevelApplication.navigator.mx_internal::navigationStack != null" value="true" /> |
| <AssertMethodValue method="value = ViewNavigator(FlexGlobals.topLevelApplication.navigator).firstView == null" value="true" /> |
| </body> |
| |
| </TestCase> |
| |
| |
| </testCases> |
| </UnitTester> |