1 function checkSnapshot(comment, actual, expected) {
2 if (actual.snapshotLength != expected.length) {
3 testFailed(comment + " incorrect length (expected " + expected.length + ", actual " + actual.snapshotLength + ")");
7 for (i = 0; i < actual.snapshotLength; ++i) {
8 if (actual.snapshotItem(i) != expected[i]) {
9 testFailed(comment + " item " + i + " incorrect (expected " + expected[i].nodeName + ", actual " + actual.snapshotItem(i).nodeName + ")");