gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/asobj/xml.cpp server/aso...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/asobj/xml.cpp server/aso...
Date: Wed, 04 Apr 2007 14:22:11 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/04/04 14:22:11

Modified files:
        .              : ChangeLog 
        server/asobj   : xml.cpp xml.h xmlnode.cpp 
        testsuite/actionscript.all: XML.as XMLNode.as 

Log message:
                * server/asobj/xmlnode.cpp: don't attacy XMLNode interface
                  to XMLNode instances.
                * server/asobj/xml.{h,cpp}: override get_member and set_member
                  to handled non-proper properties 'loaded' and 'status'
                * testsuite/actionscript.all/XMLNode.as: less failures
                * testsuite/actionscript.all/XML.as: more tests !

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2779&r2=1.2780
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.cpp?cvsroot=gnash&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.h?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlnode.cpp?cvsroot=gnash&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/XML.as?cvsroot=gnash&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/XMLNode.as?cvsroot=gnash&r1=1.10&r2=1.11

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2779
retrieving revision 1.2780
diff -u -b -r1.2779 -r1.2780
--- ChangeLog   4 Apr 2007 10:32:42 -0000       1.2779
+++ ChangeLog   4 Apr 2007 14:22:11 -0000       1.2780
@@ -1,5 +1,14 @@
 2007-04-04 Sandro Santilli <address@hidden>
 
+       * server/asobj/xmlnode.cpp: don't attacy XMLNode interface
+         to XMLNode instances.
+       * server/asobj/xml.{h,cpp}: override get_member and set_member
+         to handled non-proper properties 'loaded' and 'status'
+       * testsuite/actionscript.all/XMLNode.as: less failures
+       * testsuite/actionscript.all/XML.as: more tests !
+
+2007-04-04 Sandro Santilli <address@hidden>
+
        * server/array.{cpp,h}: const-corrected push and unshift
          methods.
        * server/asobj/xmlnode.cpp: implement childNodes getter/setter.

Index: server/asobj/xml.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/xml.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- server/asobj/xml.cpp        4 Apr 2007 10:32:42 -0000       1.32
+++ server/asobj/xml.cpp        4 Apr 2007 14:22:11 -0000       1.33
@@ -14,7 +14,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: xml.cpp,v 1.32 2007/04/04 10:32:42 strk Exp $ */
+/* $Id: xml.cpp,v 1.33 2007/04/04 14:22:11 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -58,6 +58,8 @@
 //#define DEBUG_MEMORY_ALLOCATION 1
 
 static as_object* getXMLInterface();
+static void attachXMLInterface(as_object& o);
+static void attachXMLProperties(as_object& o);
 
 // Callback functions for xmlReadIO
 static int closeTuFile (void * context);
@@ -74,9 +76,6 @@
 static as_value xml_send(const fn_call& fn);
 static as_value xml_sendandload(const fn_call& fn);
 
-// These are the event handlers called for this object
-static as_value xml_loaded(const fn_call& fn);
-
 static LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
 #ifdef USE_DEBUGGER
 static Debugger& debugger = Debugger::getDefaultInstance();
@@ -85,15 +84,17 @@
 XML::XML() 
     :
     XMLNode(getXMLInterface()),
-    _loaded(false), 
+    _loaded(-1), 
     _bytes_loaded(0),
-    _bytes_total(0)
+    _bytes_total(0),
+    _status(sOK)
 {
     //GNASH_REPORT_FUNCTION;
 #ifdef DEBUG_MEMORY_ALLOCATION
     log_msg("Creating XML data at %p \n", this);
 #endif
     //log_msg("%s: %p \n", __FUNCTION__, this);
+    attachXMLProperties(*this);
 }
 
 
@@ -101,9 +102,10 @@
 XML::XML(const std::string& xml_in)
     :
     XMLNode(getXMLInterface()),
-    _loaded(false), 
+    _loaded(-1), 
     _bytes_loaded(0),
-    _bytes_total(0)
+    _bytes_total(0),
+    _status(sOK)
 {
     //GNASH_REPORT_FUNCTION;
 #ifdef DEBUG_MEMORY_ALLOCATION
@@ -115,9 +117,10 @@
 XML::XML(struct node * /* childNode */)
     :
     XMLNode(getXMLInterface()),
-    _loaded(false), 
+    _loaded(-1), 
     _bytes_loaded(0),
-    _bytes_total(0)
+    _bytes_total(0),
+    _status(sOK)
 {
     GNASH_REPORT_FUNCTION;
 #ifdef DEBUG_MEMORY_ALLOCATION
@@ -126,6 +129,39 @@
     //log_msg("%s: %p \n", __FUNCTION__, this);
 }
 
+bool
+XML::get_member(const std::string& name, as_value *val)
+{
+        if ( name == "status" ) 
+        {
+                val->set_int(_status);
+                return true;
+        }
+        else if ( name == "loaded" )
+        {
+                if ( _loaded < 0 ) val->set_undefined();
+                else val->set_bool(_loaded);
+                return true;
+        }
+
+        return get_member_default(name, val);
+}
+
+void
+XML::set_member(const std::string& name, const as_value& val)
+{
+        if ( name == "status" ) return;
+        else if ( name == "loaded" )
+        {
+                bool b = val.to_bool();
+               log_msg("set_member 'loaded' (%s) became boolean %d", 
val.to_debug_string().c_str(), b);
+                if ( b ) _loaded = 1;
+                else _loaded = 0;
+                return;
+        }
+
+        set_member_default(name, val);
+}
 
 XML::~XML()
 {
@@ -356,13 +392,18 @@
 
     log_msg("Load XML file from url: %s", url.str().c_str());
 
-    xmlInitParser();
+    initParser();
 
-    _doc = xmlReadIO(readFromTuFile, closeTuFile, str.get(), 
url.str().c_str(), NULL, 0);
+    /// see: http://xmlsoft.org/html/libxml-parser.html#xmlParserOption
+    int options = XML_PARSE_RECOVER | XML_PARSE_NOWARNING | XML_PARSE_NOERROR;
+    _doc = xmlReadIO(readFromTuFile, closeTuFile, str.get(), 
url.str().c_str(), NULL, options);
     _bytes_total = str->get_size();
 
-    if (_doc == 0) {
-        log_error("Can't read XML file (IO): %s!", url.str().c_str());
+    if (_doc == 0)
+    {
+        xmlErrorPtr err = xmlGetLastError();
+        log_error("Can't read XML file %s (%s)!", url.str().c_str(), 
err->message);
+        _loaded = 0;
         onLoadEvent(false);
         return false;
     }
@@ -373,7 +414,7 @@
     xmlCleanupParser();
     xmlFreeDoc(_doc);
     xmlMemoryDump();
-    _loaded = true;
+    _loaded = 1;
 
     onLoadEvent(true);
 
@@ -470,12 +511,17 @@
     return rv;
 }
 
-void
-attachXMLInterface(as_object& o)
+static void
+attachXMLProperties(as_object& /*o*/)
 {
-    // FIXME: this doesn't appear to exist in the MM player, should it ?
-    o.init_member("loaded", new builtin_function(xml_loaded));
+    // if we use a proper member here hasOwnProperty() would return true
+    // but we want it to return false instead. See XML.as
+    //o.init_member("status", as_value(XML::sOK));
+}
        
+static void
+attachXMLInterface(as_object& o)
+{
     o.init_member("addRequestHeader", new 
builtin_function(xml_addrequestheader));
     o.init_member("createElement", new builtin_function(xml_createelement));
     o.init_member("createTextNode", new builtin_function(xml_createtextnode));
@@ -548,25 +594,6 @@
 // of the class.
 //
 
-// determines whether the document-loading process initiated by the XML.load()
-// call has completed. If the process completes successfully, the method
-// returns true; otherwise, it returns false.
-as_value
-xml_loaded(const fn_call& fn)
-{
-    GNASH_REPORT_FUNCTION;
-    as_value   method;
-    as_value   val;
-
-    log_msg("%s:\n", __FUNCTION__);
-    
-    boost::intrusive_ptr<XML> ptr = ensureType<XML>(fn.this_ptr);
-    std::string filespec = fn.arg(0).to_string();
-    //fn.result->set(ptr->loaded());
-    return as_value(ptr->loaded());
-}
-
-
 as_value xml_addrequestheader(const fn_call& fn)
 {
     GNASH_REPORT_FUNCTION;
@@ -715,11 +742,9 @@
     // This is going to be the global XML "class"/"function"
     static boost::intrusive_ptr<builtin_function> cl;
 
-    if ( cl == NULL ) {
+    if ( cl == NULL )
+    {
        cl=new builtin_function(&xml_new, getXMLInterface());
-       // replicate all interface to class, to be able to access
-       // all methods as static functions
-       attachXMLInterface(*cl);
     }
     
     // Register _global.String
@@ -747,6 +772,38 @@
         return 0; // no error
 }
 
+#if 0 // not time for this (yet)
+static
+void _xmlErrorHandler(void* ctx, const char* fmt, ...)
+{
+    va_list ap;
+    static const unsigned long BUFFER_SIZE = 128;
+    char tmp[BUFFER_SIZE];
+
+    va_start (ap, fmt);
+    vsnprintf (tmp, BUFFER_SIZE, fmt, ap);
+    tmp[BUFFER_SIZE-1] = '\0';
+
+    log_warning("XML parser: %s", tmp);
+    
+    va_end (ap);    
+}
+#endif // disabled
+
+void
+XML::initParser()
+{
+    static bool initialized = false;
+    if ( ! initialized )
+    {
+        xmlInitParser();
+        //xmlGenericErrorFunc func = _xmlErrorHandler;
+        //initGenericErrorDefaultFunc(&func);
+        initialized = true;
+    }
+}
+
+
 } // end of gnash namespace
 
 // Local Variables:

Index: server/asobj/xml.h
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/xml.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- server/asobj/xml.h  4 Apr 2007 07:53:28 -0000       1.12
+++ server/asobj/xml.h  4 Apr 2007 14:22:11 -0000       1.13
@@ -1,5 +1,5 @@
 // 
-//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -54,11 +54,58 @@
 {
 public:
 
+    typedef enum {
+
+            /// Parsing was successful
+            sOK = 0,
+
+            /// Unterminated CDATA section
+            sECDATA = -2,
+
+            /// Unterminated XML declaration
+            sEXMLDECL = -3,
+
+            /// Unterminated DOCTYPE declaration
+            sEDOCTYPEDECL = -4,
+
+            /// Unterminated comment
+            sECOMM = -5,
+
+            /// Malformed XML element structure
+            sESTRUCT = -6,
+
+            /// Out of memory
+            sEMEM = -7,
+
+            /// Unterminated attribute value
+            sEATTR = -8,
+
+            /// Missing close tag (orphaned open tag)
+            sEOPENTAG = -9,
+
+            /// Missing start tag (orphaned close tag)
+            sECLOSETAG = -10
+
+    } Status;
+
+
     XML();
     XML(const std::string& xml_in);
     XML(struct node * childNode);
     virtual ~XML();
   
+    /// This is overridden to provide the 'status' and 'loaded' members,
+    /// which are NOT proper properties !
+    /// See actionscript.all/XML.as
+    ///
+    bool get_member(const std::string& name, as_value *val);
+
+    /// This is overridden to provide the 'status' and 'loaded' members,
+    /// which are NOT proper properties !
+    /// See actionscript.all/XML.as
+    ///
+       void set_member(const std::string& name, const as_value& val );
+
     // Methods
     // This is the base method used by both parseXML() and load().
     bool parseDoc(xmlDocPtr document, bool mem);
@@ -111,14 +158,16 @@
     xmlDocPtr _doc;
     xmlNodePtr _firstChild;
     
-    // Properties
-    bool _loaded;
+    // -1 if never asked to load anything
+    //  0 if asked to load but not yet loaded (or failure)
+    //  1 if successfully loaded
+    int _loaded;
 
     size_t      _bytes_loaded;
  
     size_t      _bytes_total;
     
-    bool        _status;       // TODO Should be Number
+    Status      _status;       
 
     /// Trigger the onLoad event, if any
     void onLoadEvent(bool success);
@@ -135,7 +184,12 @@
 
     void setupFrame(gnash::as_object *xml, XMLNode *data, bool src);
   
+private:
+
+    /// Initialize the libxml2 parser
+    void initParser();
 
+    //static void _xmlErrorHandler(void *ctx, const char* fmt, ...);
 };
 
 

Index: server/asobj/xmlnode.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/xmlnode.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- server/asobj/xmlnode.cpp    4 Apr 2007 10:32:42 -0000       1.24
+++ server/asobj/xmlnode.cpp    4 Apr 2007 14:22:11 -0000       1.25
@@ -14,7 +14,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: xmlnode.cpp,v 1.24 2007/04/04 10:32:42 strk Exp $ */
+/* $Id: xmlnode.cpp,v 1.25 2007/04/04 14:22:11 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -823,11 +823,9 @@
     // This is going to be the global XMLNode "class"/"function"
     static boost::intrusive_ptr<builtin_function> cl;
 
-    if ( cl == NULL ) {
+    if ( cl == NULL )
+    {
        cl=new builtin_function(&xmlnode_new, getXMLNodeInterface());
-       // replicate all interface to class, to be able to access
-       // all methods as static functions
-       attachXMLNodeInterface(*cl);         
     }
 
     // Register _global.String

Index: testsuite/actionscript.all/XML.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/XML.as,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- testsuite/actionscript.all/XML.as   4 Apr 2007 09:02:10 -0000       1.21
+++ testsuite/actionscript.all/XML.as   4 Apr 2007 14:22:11 -0000       1.22
@@ -20,7 +20,7 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: XML.as,v 1.21 2007/04/04 09:02:10 strk Exp $";
+rcsid="$Id: XML.as,v 1.22 2007/04/04 14:22:11 strk Exp $";
 
 #include "dejagnu.as"
 #include "utils.as"
@@ -38,6 +38,8 @@
 check(! XML.prototype.hasOwnProperty("cloneNode") );
 check(! XML.prototype.hasOwnProperty("toString") );
 check(! XML.prototype.hasOwnProperty("length") );
+check(! XML.prototype.hasOwnProperty("status"));
+check(! XML.prototype.hasOwnProperty("loaded"));
 check(XML.prototype.hasOwnProperty("createElement") );
 check(XML.prototype.hasOwnProperty("addRequestHeader") );
 check(XML.prototype.hasOwnProperty("createTextNode") );
@@ -48,6 +50,16 @@
 check(XML.prototype.hasOwnProperty("send") );
 check(XML.prototype.hasOwnProperty("sendAndLoad") );
 
+check(!XML.hasOwnProperty("createElement") );
+check(!XML.hasOwnProperty("addRequestHeader") );
+check(!XML.hasOwnProperty("createTextNode") );
+check(!XML.hasOwnProperty("getBytesLoaded") );
+check(!XML.hasOwnProperty("getBytesTotal") );
+check(!XML.hasOwnProperty("load") );
+check(!XML.hasOwnProperty("parseXML") );
+check(!XML.hasOwnProperty("send") );
+check(!XML.hasOwnProperty("sendAndLoad") );
+
 check(XMLNode.prototype.hasOwnProperty("appendChild") );
 check(XMLNode.prototype.hasOwnProperty("cloneNode") );
 check(XMLNode.prototype.hasOwnProperty("hasChildNodes") );
@@ -65,11 +77,37 @@
 check(! XMLNode.prototype.hasOwnProperty("parseXML") );
 check(! XMLNode.prototype.hasOwnProperty("send") );
 check(! XMLNode.prototype.hasOwnProperty("sendAndLoad") );
+check(! XMLNode.prototype.hasOwnProperty("status"));
+check(! XMLNode.prototype.hasOwnProperty("loaded"));
+
+check(! XMLNode.hasOwnProperty("appendChild") );
+check(! XMLNode.hasOwnProperty("cloneNode") );
+check(! XMLNode.hasOwnProperty("hasChildNodes") );
+check(! XMLNode.hasOwnProperty("insertBefore") );
+check(! XMLNode.hasOwnProperty("removeNode") );
+check(! XMLNode.hasOwnProperty("toString") );
+check(! XMLNode.hasOwnProperty("cloneNode") );
 #endif
 
 var tmp = new XML();
+check_equals(typeof(tmp.length), 'undefined');
 check(! tmp.hasOwnProperty("length"));
 
+check_equals(typeof(tmp.status), 'number');
+check(! tmp.hasOwnProperty("status"));
+
+check_equals(typeof(tmp.loaded), 'undefined');
+check(! tmp.hasOwnProperty("loaded"));
+
+tmp.loaded = 5;
+check_equals(typeof(tmp.loaded), 'boolean');
+check(tmp.loaded);
+tmp.loaded = 0;
+check_equals(typeof(tmp.loaded), 'boolean');
+check(!tmp.loaded);
+check(! tmp.hasOwnProperty("loaded"));
+
+
 // test the XML constuctor
 if (tmp) {
     pass("XML::XML() constructor");
@@ -198,19 +236,36 @@
 check(XML);
 
 check(XML);
-tmp.onLoad = function (success) {
-    if (success) {
-        with (tmp.firstChild) {
-            trace("FIXME: firstChild found: " + nodeName);
+tmp.checkParsed = function ()
+{
+       note("tmp.checkParsed called");
+       check(this.hasChildNodes());
+       check(this.childNodes instanceof Array);
+       check_equals(this.firstChild, this.lastChild);
+       check_equals(typeof(this.childNodes.length), 'number');
+       check_equals(this.childNodes.length, 1);
+       check_equals(this.childNodes[0], this.firstChild);
+       check_equals(this.childNodes[0], this.lastChild);
+#if OUTPUT_VERSION > 5
+       check(this.childNodes.hasOwnProperty('length'));
+       check(this.childNodes[0] === this.firstChild);
+       check(this.childNodes[0] === this.lastChild);
+#endif
+
+    // childNodes is a read-only property !
+    this.childNodes = 5;
+       check(this.childNodes instanceof Array);
+
+        with (this.firstChild) {
+            //trace("FIXME: firstChild found: " + nodeName);
             if (nodeName == 'TOPNODE') {
-                trace("FIXME: topnode found: "+ childNodes.length);
+                //trace("FIXME: topnode found: "+ childNodes.length);
                 childa = 0;
                 while (childa < childNodes.length) {
-                    trace("FIXME: children found");
+                    //trace("FIXME: children found");
                     check(childNodes[childa] != undefined);
                     with (childNodes[childa]) {
                         if (nodeName == 'SUBNODE1') {
-                            trace("FIXME: subnode1 found");
                             childb = 0;
                             while (childb < childNodes.length) {
                                 with (childNodes[childb]) {
@@ -235,15 +290,19 @@
                 }
             }
         }
-    }
 };
-check(XML);
 
 check_equals( typeof(tmp.parseXML), 'function');
+check(tmp.childNodes instanceOf Array);
+check_equals(tmp.childNodes.length, 0);
+
 // parseXML doesn't return anything
-tmp.parseXML(xml_in);
-check_equals(typeof(tmp.firstChild), 'object');
-note("Parsed XML: "+tmp.toString());
+ret = tmp.parseXML(xml_in);
+check_equals(typeof(ret), 'undefined');
+
+tmp.checkParsed(); // onLoad won't be called
+//note("Parsed XML: "+tmp.toString());
+check_equals(tmp.toString(), xml_in);
 check(XML.prototype instanceof XMLNode);
 check(tmp instanceof XML);
 check(tmp instanceof XMLNode);
@@ -365,14 +424,44 @@
 myxml.onLoad = function(success)
 {
        note("myxml.onLoad("+success+") called");
+
+       check_equals(typeof(myxml.status), 'number');
+       check_equals(typeof(myxml.loaded), 'boolean');
+#if OUTPUT_VERSION >= 6
+       check(! myxml.hasOwnProperty('status'));
+       check(! myxml.hasOwnProperty('loaded'));
+#endif // OUTPUT_VERSION >= 6
+
        if ( ! success )
        {
                note("No success loading gnash.xml");
+               check_equals(myxml.status, 0);
+               check(! myxml.loaded);
                return;
        }
        note("gnash.xml successfully loaded");
        note("myxml status is "+myxml.status);
-       note("myxml.toString(): "+myxml.toString());
+
+       check_equals(myxml.status, 0);
+       check(myxml.loaded);
+
+       // Check 'loaded' and 'status' to be "overridable"
+
+       var loaded_backup = myxml.loaded;
+       myxml.loaded = 'a string';
+       check_equals(typeof(myxml.loaded), 'boolean');
+       myxml.loaded = ! loaded_backup;
+       check(myxml.loaded != loaded_backup);
+       myxml.loaded = loaded_backup;
+
+       var status_backup = myxml.status;
+       myxml.status = 'a string';
+       check_equals(typeof(myxml.status), 'number');
+       xcheck(myxml.status != status_backup);
+       myxml.status = status_backup;
+
+
+       //note("myxml.toString(): "+myxml.toString());
        check_equals(typeof(myxml.attributes), 'object');
        xcheck(! myxml.attributes instanceof Object);
        xcheck_equals(typeof(myxml.attributes.__proto__), 'undefined');
@@ -384,7 +473,27 @@
        check_equals(topnode.nodeName, 'XML');
        check_equals(topnode.attributes.attr1, 'attr1 value');
 };
-myxml.load( MEDIA(gnash.xml) );
+check_equals(typeof(myxml.status), 'number');
+#if OUTPUT_VERSION < 7
+xcheck_equals(typeof(myxml.STATUS), 'number');
+#endif // OUTPUT_VERSION < 7
+check_equals(typeof(myxml.__proto__.status), 'undefined');
+check_equals(typeof(myxml.loaded), 'undefined');
+#if OUTPUT_VERSION >= 6
+check(!myxml.hasOwnProperty('status'));
+check(!myxml.hasOwnProperty('loaded'));
+#endif // OUTPUT_VERSION >= 6
+ret = myxml.load( MEDIA(gnash.xml) );
+
+check_equals(typeof(myxml.loaded), 'boolean');
+#if OUTPUT_VERSION < 7
+xcheck_equals(typeof(myxml.LOADED), 'boolean');
+#endif // OUTPUT_VERSION < 7
+xcheck(! myxml.loaded ); // is really loaded in a background thread
+
+xcheck_equals(myxml.loaded, false ); // is really loaded in a background thread
+note("myxml.loaded = "+myxml.loaded);
+note("myxml.load() returned "+ret);
 
 // We're done
 //totals();

Index: testsuite/actionscript.all/XMLNode.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/XMLNode.as,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- testsuite/actionscript.all/XMLNode.as       3 Apr 2007 12:34:43 -0000       
1.10
+++ testsuite/actionscript.all/XMLNode.as       4 Apr 2007 14:22:11 -0000       
1.11
@@ -20,7 +20,7 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: XMLNode.as,v 1.10 2007/04/03 12:34:43 strk Exp $";
+rcsid="$Id: XMLNode.as,v 1.11 2007/04/04 14:22:11 strk Exp $";
 
 #include "dejagnu.as"
 
@@ -79,7 +79,7 @@
 
 check_equals(node1.firstChild.nodeValue, "first text node");
 check_equals(typeof(node1.lastChild.nodeValue), 'null');
-xcheck_equals(node2.lastChild.toString(), "second text node"); 
+check_equals(node2.lastChild.toString(), "second text node"); 
 
 var node3 = doc.createElement("node3");
 var textnode3 = doc.createTextNode("third text node");




reply via email to

[Prev in Thread] Current Thread [Next in Thread]