blob: 128965eefe66326c0941101e45e386040244b4ef [file] [log] [blame]
<?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 testDir="apollo/HTML/Events/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="AIRHTMLMain.mxml">
<!-- this set of lines form a template that must be in each unit test -->
<mx:Script>
<![CDATA[
public static function init(o:DisplayObject):void
{
}
]]>
</mx:Script>
<mx:Metadata>
<![CDATA[
[Mixin]
]]>
</mx:Metadata>
<!-- end of set of lines that must be in each unit test -->
<mx:Script>
<![CDATA[
private var htmlTextToPut:String = "<b>Hello <i>How are</b> you... <br>What</i> News<h3>????</h3>";
]]>
</mx:Script>
<testCases>
<!-- Test depends on external site that cannot be relied upon
<TestCase testID="AIR_HTML_Event_locationChange" description="checks complete event" keywords="[AIR, HTML, event, locationChange]">
<setup>
<ResetComponent target="myHTML" className="mx.controls::HTML" waitEvent="updateComplete" waitTarget="myHTML"/>
<SetProperty propertyName="location" value="http://www.blackle.com/" target="myHTML"/>
</setup>
<body>
<AssertEvent target="myHTML" eventName="locationChange" eventClass="flash.events::Event" timeout="10000"/>
</body>
</TestCase> -->
<TestCase testID="AIR_HTML_Event_htmlDOMInitialize " description="checks htmlDOMInitialize event" keywords="[AIR, HTML, event, htmlDOMInitialize]">
<setup>
<ResetComponent target="myHTML" className="mx.controls::HTML" waitEvent="updateComplete" waitTarget="myHTML"/>
<SetProperty propertyName="location" value="http://flex.apache.org/" target="myHTML"/>
</setup>
<body>
<WaitForEffectsToEnd />
<AssertEvent target="myHTML" eventName="htmlDOMInitialize" eventClass="flash.events::Event" timeout="10000"/>
</body>
</TestCase>
<TestCase testID="AIR_HTML_Event_complete" description="checks complete event" keywords="[AIR, HTML, event, complete]">
<setup>
<ResetComponent target="myHTML" className="mx.controls::HTML" waitEvent="updateComplete" waitTarget="myHTML"/>
<SetProperty propertyName="location" value="http://flex.apache.org/" target="myHTML"/>
</setup>
<body>
<AssertEvent target="myHTML" eventName="complete" eventClass="flash.events::Event" timeout="10000"/>
<WaitForEffectsToEnd />
</body>
</TestCase>
<TestCase testID="AIR_HTML_Event_htmlRender" description="checks htmlRender event" keywords="[AIR, HTML, event, htmlRender]">
<setup>
<ResetComponent target="myHTML" className="mx.controls::HTML" waitEvent="updateComplete" waitTarget="myHTML"/>
<SetProperty propertyName="location" value="http://flex.apache.org/" target="myHTML"/>
</setup>
<body>
<AssertEvent target="myHTML" eventName="htmlRender" eventClass="flash.events::Event" timeout="10000"/>
</body>
</TestCase>
<TestCase testID="AIR_HTML_Event_domInitialize_htmlText" description="checks domInitialize event" keywords="[AIR, HTML, event, domInitialize,htmlText]">
<setup>
<ResetComponent target="myHTML" className="mx.controls::HTML" waitEvent="updateComplete" waitTarget="myHTML"/>
<SetProperty propertyName="htmlText" value="htmlTextToPut" target="myHTML"/>
</setup>
<body>
<WaitForEffectsToEnd />
<AssertEvent target="myHTML" eventName="htmlDOMInitialize" eventClass="flash.events::Event" timeout="10000"/>
</body>
</TestCase>
<TestCase testID="AIR_HTML_Event_complete_htmlText" description="checks complete event" keywords="[AIR, HTML, event, complete, htmlText]">
<setup>
<ResetComponent target="myHTML" className="mx.controls::HTML" waitEvent="updateComplete" waitTarget="myHTML"/>
<SetProperty propertyName="htmlText" value="htmlTextToPut" target="myHTML"/>
</setup>
<body>
<AssertEvent target="myHTML" eventName="complete" eventClass="flash.events::Event" timeout="10000"/>
<WaitForEffectsToEnd />
</body>
</TestCase>
<TestCase testID="AIR_HTML_Event_htmlRender_htmlText" description="checks htmlRender event" keywords="[AIR, HTML, event, htmlRender, htmlText]">
<setup>
<ResetComponent target="myHTML" className="mx.controls::HTML" waitEvent="updateComplete" waitTarget="myHTML"/>
<WaitForEffectsToEnd />
<SetProperty propertyName="htmlText" value="htmlTextToPut" target="myHTML" waitEvent="htmlRender" waitTarget="myHTML"/>
</setup>
<body>
<AssertEvent target="myHTML" eventName="htmlRender" eventClass="flash.events::Event" timeout="10000"/>
</body>
</TestCase>
</testCases>
</UnitTester>