summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/general/browser_duplicateIDs.js
blob: b0c65c6af6f8a4795d85240403c1acb2e5e77deb (plain)
1
2
3
4
5
6
7
8
9
10
11
function test() {
  var ids = {};
  Array.prototype.forEach.call(
    document.querySelectorAll("[id]"),
    function (node) {
      var id = node.id;
      ok(!(id in ids), id + " should be unique");
      ids[id] = null;
    }
  );
}