Bug 589163 - Add test to prevent duplicate ids. r=gavin

This commit is contained in:
Dão Gottwald 2010-08-21 07:15:14 +02:00
parent 211321ca49
commit 7b74aa16f7
2 changed files with 9 additions and 0 deletions

View File

@ -146,6 +146,7 @@ _BROWSER_FILES = \
browser_ctrlTab.js \
browser_discovery.js \
browser_drag.js \
browser_duplicateIDs.js \
browser_gestureSupport.js \
browser_getshortcutoruri.js \
browser_hide_removing.js \

View File

@ -0,0 +1,8 @@
function test() {
var ids = {};
Array.forEach(document.querySelectorAll("[id]"), function (node) {
var id = node.id;
ok(!(id in ids), id + " should be unique");
ids[id] = null;
});
}