0.9: dojo.query support of general XML DOM documents.
According to Alex, dojo.query won't work against a general XML DOM document, but that it shouldn't be too hard to make it work. So, this is a trac request to add that support. It would make some handling of XML much more efficient in terms of code and performance (things like dojox.data.XmlStore? could use it for getting the full node list and such instead of having to tree walk.)
Initially assigning to Alex since he owns the query code, I believe. Please route if not.
GROUP "tests.rpc" has 4 tests to run
TypeError?: Cannot find function rawXhrPost.
ERROR IN:
(function () {var d = new doh.Deferred();var td = this.svc.myecho("RPC TEST");if (window.location.protocol == "file:") {var err = new Error("This Test requires a webserver and PHP and will fail intentionally if loaded from file://");d.errback(err);return d;}td.addCallbacks(function (result) {if (result == "<P>RPC TEST</P>") {return true;} else {return new Error("JsonRpc?-EchoTest? test failed, resultant content didn't match");}}, function (result) {return new Error(result);});td.addBoth(d, "callback");return d;})
(function () {var d = new doh.Deferred();var td = this.svc.contentB();if (window.location.protocol == "file:") {var err = new Error("This Test requires a webserver and PHP and will fail intentionally if loaded from file://");d.errback(err);return d;}td.addCallbacks(function (result) {if (result == "<P>Content B</P>") {return true;} else {return new Error("JsonRpc?-EmpytParamTest? test failed, resultant content didn't match");}}, function (result) {return new Error(result);});td.addBoth(d, "callback");return d;})
(function () {var d = new doh.Deferred();if (window.location.protocol == "file:") {var err = new Error("This Test requires a webserver and will fail intentionally if loaded from file://");d.errback(err);return d;}console.debug("Run Test: ", this.svc);var td = this.svc.webSearch({[Error: Query filter requires field and constraints separated by a "="]});td.addCallbacks(function (result) {return true;if (resultResultSet?Result?[0]DisplayUrl? == "dojotoolkit.org/") {return true;} else {return new Error("JsonRpc_SMD_Loading_Test failed, resultant content didn't match");}}, function (result) {return new Error(result);});td.addBoth(d, "callback");return d;})
This looks like the RPC tests are making use of the xhr* code, which isn't available under Rhino. Therefore, these tests should be flagged with an:
if(dojo.isBrowser) check before they're executed. (Or the tests should be dojo.requireIf(dojo.isBrowser, ...).
To run the UT in rhino, just:
cd utils/doh
then execute:
java -jar ../buildscripts/lib/custom_rhino.jar runner.js