[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10039: More tests for ExternalInter
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10039: More tests for ExternalInterface. |
Date: |
Tue, 21 Oct 2008 18:35:28 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10039
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Tue 2008-10-21 18:35:28 +0200
message:
More tests for ExternalInterface.
modified:
testsuite/actionscript.all/ExternalInterface.as
------------------------------------------------------------
revno: 10029.1.5
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Tue 2008-10-21 18:30:57 +0200
message:
More tests.
modified:
testsuite/actionscript.all/ExternalInterface.as
=== modified file 'testsuite/actionscript.all/ExternalInterface.as'
--- a/testsuite/actionscript.all/ExternalInterface.as 2008-10-21 16:26:41
+0000
+++ b/testsuite/actionscript.all/ExternalInterface.as 2008-10-21 16:35:28
+0000
@@ -59,6 +59,12 @@
// An object
o = { a: 1, b: "string" };
+// An object with circular references
+oc = {};
+oc.a = {};
+oc.a.a = oc.b;
+oc.b = oc.a;
+
// A native class
nc = Mouse;
@@ -87,6 +93,7 @@
xcheck_equals(EI._objectToXML(no), '<object><property
id="namespaceURI"><null/></property><property
id="localName"><null/></property><property
id="prefix"><null/></property><property
id="previousSibling"><null/></property><property
id="parentNode"><null/></property><property
id="nodeValue"><null/></property><property
id="nodeType"><number>1</number></property><property
id="nodeName"><null/></property><property
id="nextSibling"><null/></property><property
id="lastChild"><null/></property><property
id="firstChild"><null/></property><property
id="childNodes"><array></array></property><property
id="attributes"><null/></property><property
id="getPrefixForNamespace"><null/></property><property
id="getNamespaceForPrefix"><null/></property><property
id="toString"><null/></property><property
id="hasChildNodes"><null/></property><property
id="appendChild"><null/></property><property
id="insertBefore"><null/></property><property
id="removeNode"><null/></property><property
id="cloneNode"><null/></property><property
id="xmlDecl"><undefined/></property><property
id="status"><number>0</number></property><property
id="loaded"><undefined/></property><property
id="ignoreWhite"><false/></property><property
id="docTypeDecl"><undefined/></property><property
id="contentType"><string>application/x-www-form-urlencoded</string></property><property
id="addRequestHeader"><null/></property><property
id="getBytesTotal"><null/></property><property
id="getBytesLoaded"><null/></property><property
id="onData"><null/></property><property id="onLoad"><null/></property><property
id="sendAndLoad"><null/></property><property
id="send"><null/></property><property id="load"><null/></property><property
id="parseXML"><null/></property><property
id="createTextNode"><null/></property><property
id="createElement"><null/></property></object>');
xcheck_equals(EI._objectToXML(undefined), '<object></object>');
xcheck_equals(EI._objectToXML(6), '<object></object>');
+xcheck_equals(EI._objectToXML(oc), '<object><property id="b"><object><property
id="a"><undefined/></property></object></property><property
id="a"><object><property
id="a"><undefined/></property></object></property></object>');
xcheck_equals(EI._objectToJS(o), '({a:1,b:"string"})');
@@ -98,6 +105,12 @@
xcheck_equals(EI._arrayToXML(a), '<array><property
id="0"><number>12</number></property><property
id="1"><number>34</number></property><property
id="2"><string>tr</string></property><property
id="3"><number>1</number></property><property
id="4"><number>2</number></property><property
id="5"><number>3</number></property><property
id="6"><number>4</number></property></array>');
xcheck_equals(EI._arrayToJS(a), '[12,34,"tr",1,2,3,4]');
+// _to*
+
+xcheck_equals(EI._toXML("string"), '<string>string</string>');
+xcheck_equals(EI._toXML(4), '<number>4</number>');
+
+xcheck_equals(EI._toXML(o), '<object><property
id="a"><number>1</number></property><property
id="b"><string>string</string></property></object>');
// escape / unescape
r = "& ß+ü < << <>''\"";
@@ -107,7 +120,7 @@
r = "& ß+ü < << <>''"";
xcheck_equals(EI._unescapeXML(r), "& ß+ü < << <>''\"");
-totals(38);
+totals(42);
#else
totals (26);
- [Gnash-commit] /srv/bzr/gnash/trunk r10039: More tests for ExternalInterface.,
Benjamin Wolsey <=