[TIMOB-2393] Drillbit regression: xml.js (Wrong node attribute)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:58:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M10 |
Components | iOS |
Labels | drillbit, ios, regression, release-1.6.0, xml |
Reporter | Stephen Tramer |
Assignee | Stephen Tramer |
Created | 2011-04-15T03:18:32.000+0000 |
Updated | 2011-04-17T01:58:59.000+0000 |
Description
Test fails xmlNodes:98:
var doc = Ti.XML.parseString(this.testSource["nodes.xml"]);
var nodesList = doc.getElementsByTagName("nodes");
var nodes = nodesList.item(0);
var node = nodes.getElementsByTagName("node").item(0);
var subnodes = node.getElementsByTagName("node");
valueOf(subnodes.item(1).getAttribute("id")).shouldBe("node 2");
Could also be invalid on Android. Going to test and see.
According to the DOM Level 2 spec, this is actually an Android bug:
http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1938918D">http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1938918D
In this particular case, it looks like Android returns the 'self' node in the search result set if it matches, which is wrong. iOS does the right thing and returns only elements from its subtree.
Reassigning to Marshall so he can look at it.
(from [4389dbeacebdf3108256500daeca170cc6c6d6ac]) updated drillbit test to have write DOM API tests, getElementsByTagName now correctly filters the current node if it also matches the query (fixing a bug in the Android Harmony Impl) [#2393 state:fixed-in-qa] https://github.com/appcelerator/titanium_mobile/commit/4389dbeacebdf3108256500daeca170cc6c6d6ac"> https://github.com/appcelerator/titanium_mobile/commit/4389dbeacebd...
(from [aa683287fe54044577aad83411faaf170eec1960]) updated drillbit test to have write DOM API tests, getElementsByTagName now correctly filters the current node if it also matches the query (fixing a bug in the Android Harmony Impl) [#2393 state:fixed-in-qa] https://github.com/appcelerator/titanium_mobile/commit/aa683287fe54044577aad83411faaf170eec1960"> https://github.com/appcelerator/titanium_mobile/commit/aa683287fe54...