Skip to content

Commit

Permalink
Simplified the XML clone test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeresig committed Jan 5, 2009
1 parent c6de039 commit d3141dc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/unit/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1168,10 +1168,12 @@ test("clone() on XML nodes", function() {
stop();
jQuery.get("data/dashboard.xml", function (xml) {
var root = jQuery(xml.documentElement).clone();
jQuery("tab:first", xml).text("origval");
jQuery("tab:first", root).text("cloneval");
equals(jQuery("tab:first", xml).text(), "origval", "Check original XML node was correctly set");
equals(jQuery("tab:first", root).text(), "cloneval", "Check cloned XML node was correctly set");
var origTab = jQuery("tab", xml).eq(0);
var cloneTab = jQuery("tab", root).eq(0);
origTab.text("origval");
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();
});
});
Expand Down

0 comments on commit d3141dc

Please sign in to comment.