Simplified the XML clone test.
This commit is contained in:
parent
c6de039bb1
commit
d3141dcdba
|
@ -1168,10 +1168,12 @@ test("clone() on XML nodes", function() {
|
||||||
stop();
|
stop();
|
||||||
jQuery.get("data/dashboard.xml", function (xml) {
|
jQuery.get("data/dashboard.xml", function (xml) {
|
||||||
var root = jQuery(xml.documentElement).clone();
|
var root = jQuery(xml.documentElement).clone();
|
||||||
jQuery("tab:first", xml).text("origval");
|
var origTab = jQuery("tab", xml).eq(0);
|
||||||
jQuery("tab:first", root).text("cloneval");
|
var cloneTab = jQuery("tab", root).eq(0);
|
||||||
equals(jQuery("tab:first", xml).text(), "origval", "Check original XML node was correctly set");
|
origTab.text("origval");
|
||||||
equals(jQuery("tab:first", root).text(), "cloneval", "Check cloned XML node was correctly set");
|
cloneTab.text("cloneval");
|
||||||
|
equals(origTab.text(), "origval", "Check original XML node was correctly set");
|
||||||
|
equals(cloneTab.text(), "cloneval", "Check cloned XML node was correctly set");
|
||||||
start();
|
start();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue