diff --git a/browser/base/content/test/Makefile.in b/browser/base/content/test/Makefile.in index 94e408d2d82..0d9b59df69c 100644 --- a/browser/base/content/test/Makefile.in +++ b/browser/base/content/test/Makefile.in @@ -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 \ diff --git a/browser/base/content/test/browser_duplicateIDs.js b/browser/base/content/test/browser_duplicateIDs.js new file mode 100644 index 00000000000..38fc17820e5 --- /dev/null +++ b/browser/base/content/test/browser_duplicateIDs.js @@ -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; + }); +}