I've attached another test case for test/lfc/data, the test case runs successfully on {IE9, Firefox4, Opera11, Safari5} x {dhtml,swf10} x {Win7}.
On 4/13/2011 10:21 PM, Raju Bitter wrote:
André, I did all the suggested changes, but Henry might want to take a look as well. Change raju-20110413-ppx by [email protected] on 2011-04-13 18:42:03 CEST in /Users/raju/src/svn/openlaszlo/trunk/WEB-INF/lps/lfc for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc Summary: Support SWF10 HTTPStatusEvent for SOLO dataset requests New Features: Bugs Fixed: LPP-9894 Technical Reviewer: [email protected] QA Reviewer: (pending) Doc Reviewer: (pending) Documentation: Release Notes: Overview: Since Flash Player 9 it's possible to retrieve the HTTP response status code for requests executed by a URLLoader object. The LFC (kernel/swf9/LzHTTPLoader.as) currently doesn't process that information, although it's available in Firefox, Safari, Chrome and Opera. With this improvement the LzHTTPLoader would store the response code of the last HTTP request in the property responseStatus. Datasets don't expose the LzHTTPLoader#getResponseStatus method, but the method can be accessed through someDataset.dataRequest.loader.getResponseStatus(). Details: Tests: test/data/http-status-response-swf10-unproxied.lzx Files: A test/data/http-status-response-swf10-unproxied.lzx M WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.as Changeset: http://svn.openlaszlo.org/openlaszlo/patches/raju-20110413-ppx.tar
<<< text/html; name="httpstatus.jsp": Unrecognized >>>
<?xml version="1.0" encoding="UTF-8"?>
<canvas debug="true">
<include href="lzunit"/>
<TestSuite>
<TestHttpStatus/>
</TestSuite>
<class name="TestHttpStatus" extends="TestCase">
<node name="httpget">
<dataset name="httpstatus200" proxied="false" querytype="GET" src="httpstatus.jsp?status=200" type="http" request="true"/>
<dataset name="httpstatus300" proxied="false" querytype="GET" src="httpstatus.jsp?status=300" type="http" request="true"/>
<dataset name="httpstatus400" proxied="false" querytype="GET" src="httpstatus.jsp?status=400" type="http" request="true"/>
<dataset name="httpstatus500" proxied="false" querytype="GET" src="httpstatus.jsp?status=500" type="http" request="true"/>
</node>
<node name="httppost">
<dataset name="httpstatus200" proxied="false" querytype="POST" src="httpstatus.jsp?status=200" type="http" request="true"/>
<dataset name="httpstatus300" proxied="false" querytype="POST" src="httpstatus.jsp?status=300" type="http" request="true"/>
<dataset name="httpstatus400" proxied="false" querytype="POST" src="httpstatus.jsp?status=400" type="http" request="true"/>
<dataset name="httpstatus500" proxied="false" querytype="POST" src="httpstatus.jsp?status=500" type="http" request="true"/>
</node>
<method name="addTests">
addTest("testHttpStatus");
</method>
<method name="testHttpStatus" args="ignore=null"><![CDATA[
for each (var p in [httpget, httppost]) {
for each (var ds in p.subnodes) {
var req = ds.dataRequest;
if (req.status == LzDataRequest.LOADING) {
lz.Timer.addTimer(new lz.Delegate(this, "testHttpStatus"), 1000);
return;
}
}
}
for each (var p in [httpget, httppost]) {
for each (var ds in p.subnodes) {
handleData(ds);
}
}
]]></method>
<method name="handleData" args="ds"><![CDATA[
var s = {httpstatus200: 200, httpstatus300: 300, httpstatus400: 400, httpstatus500: 500}[ds.name];
var loader = ds.dataRequest.loader;
// Debug.debug("expected %w, actual %w", s, loader.getResponseStatus());
assertEquals(s, loader.getResponseStatus());
]]></method>
</class>
</canvas>
