2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / LayoutTests / fast / xpath / xpath-test-pre.js
blob604965ef609b7943dbf7fc0b283ceece9abadae1
1 function checkSnapshot(comment, actual, expected) {
2     if (actual.snapshotLength != expected.length) {
3         testFailed(comment + " incorrect length (expected " + expected.length + ", actual " + actual.snapshotLength + ")");
4         return;
5     }
6     
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 + ")");
10             return;
11         }
12     }
13     
14     testPassed(comment);