diff --git a/content/xml/tests/load/load.html b/content/xml/tests/load/load.html index ef2225f5aca..03d4fb8a2bc 100644 --- a/content/xml/tests/load/load.html +++ b/content/xml/tests/load/load.html @@ -1,16 +1,57 @@ - -

document.load() test

- + + +

Synchronized document.load() test

+ +
XML document serialized +
@@No result@@
+
+
Event information +
@@No result@@
+
+ + diff --git a/extensions/xmlextras/tests/404post.html b/extensions/xmlextras/tests/404post.html new file mode 100644 index 00000000000..8d60f2f5482 --- /dev/null +++ b/extensions/xmlextras/tests/404post.html @@ -0,0 +1,94 @@ + +POST test + + + + +

POST test

+ +
responseText +
@@No result@@
+
+
responseXML serialized +
@@No result@@
+
+
getAllResponseHeaders() +
@@No result@@
+
+
status +
@@No result@@
+
+
statusText +
@@No result@@
+
+
readyState +
@@No result@@
+
+
Event information +
@@No result@@
+
+ + + diff --git a/extensions/xmlextras/tests/get.html b/extensions/xmlextras/tests/get.html index 8d167a6ad12..1c2efd84b02 100644 --- a/extensions/xmlextras/tests/get.html +++ b/extensions/xmlextras/tests/get.html @@ -18,17 +18,26 @@ pre { + + diff --git a/extensions/xmlextras/tests/syncpost.html b/extensions/xmlextras/tests/syncpost.html index a89ecd88a69..03e32aaa7c8 100644 --- a/extensions/xmlextras/tests/syncpost.html +++ b/extensions/xmlextras/tests/syncpost.html @@ -28,11 +28,13 @@ function execute() p.open("POST", "http://green/cgi-bin/echo_xml.cgi", false); p.send(x); - var d = p.responseXML; - var s = new XMLSerializer() - str = s.serializeToString(d); document.getElementById("id1").firstChild.nodeValue = p.responseText; - document.getElementById("id2").firstChild.nodeValue = str; + if (p.responseXML) { + var s = new XMLSerializer(); + var d = p.responseXML; + var str = s.serializeToString(d); + document.getElementById("id2").firstChild.nodeValue = str; + } document.getElementById("id3").firstChild.nodeValue = p.getAllResponseHeaders(); document.getElementById("id4").firstChild.nodeValue = p.status; document.getElementById("id5").firstChild.nodeValue = p.statusText; diff --git a/extensions/xmlextras/tests/xpost.html b/extensions/xmlextras/tests/xpost.html index 8c3c24833b6..49e74dd0262 100644 --- a/extensions/xmlextras/tests/xpost.html +++ b/extensions/xmlextras/tests/xpost.html @@ -25,21 +25,37 @@ try { // In Mozilla, you can only create the text string if you can bybass security, like in chrome var sendPlainTextData = false; +var docsize = 400; // the document has docsize*2+1 elements var x; if (!sendPlainTextData) { try { x = document.implementation.createDocument("", "test", null); - x.documentElement.appendChild(document.createElement("Foo")); - x.documentElement.appendChild(document.createElement("Bar")); - x.documentElement.firstChild.appendChild(document.createTextNode("My Stuff\nYeah")); + var i; + for (i = 0; i < docsize; i++) { + var fooElement = document.createElement("Foo"); + fooElement.appendChild(document.createTextNode("My Stuff\nYeah")); + x.documentElement.appendChild(fooElement); + x.documentElement.appendChild(document.createElement("Bar")); + } } catch (e) { x = new ActiveXObject("Msxml2.DOMDocument"); - x.loadXML("\nMy Stuff\nYeah"); + var str = "\n"; + var i; + for (i = 0; i < docsize; i++) { + str += "My Stuff\nYeah"; + } + str += ""; + x.loadXML(str); } } +var interactiveCount = 0; + function myfunc() { + if (p.readyState == 3) { + interactiveCount++; + } //alert("myfunc readyState=" + p.readyState); //if (p.readyState == 2) { // alert(p.getAllResponseHeaders()); @@ -48,9 +64,9 @@ function myfunc() if (p.readyState != 4) return; - var str; - - if (!sendPlainTextData) { + document.getElementById("id1").firstChild.nodeValue = p.responseText; + if (p.responseXML) { + var str; try { var s = new XMLSerializer(); var d = p.responseXML; @@ -58,15 +74,13 @@ function myfunc() } catch (e) { str = "@@TODO@@"; } - } else { - str = p.responseText; + document.getElementById("id2").firstChild.nodeValue = str; } - document.getElementById("id1").firstChild.nodeValue = p.responseText; - document.getElementById("id2").firstChild.nodeValue = str; document.getElementById("id3").firstChild.nodeValue = p.getAllResponseHeaders(); document.getElementById("id4").firstChild.nodeValue = p.status; document.getElementById("id5").firstChild.nodeValue = p.statusText; document.getElementById("id6").firstChild.nodeValue = p.readyState; + document.getElementById("id7").firstChild.nodeValue = interactiveCount; } // p.onload would also work in Mozilla @@ -122,6 +136,9 @@ if (!sendPlainTextData) {
readyState
@@No result@@
+
# of times onreadystatechanged handler called with INTERACTIVE status +
@@No result@@
+