summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/general/browser_duplicateIDs.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/base/content/test/general/browser_duplicateIDs.js')
-rw-r--r--browser/base/content/test/general/browser_duplicateIDs.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/browser/base/content/test/general/browser_duplicateIDs.js b/browser/base/content/test/general/browser_duplicateIDs.js
new file mode 100644
index 000000000..38fc17820
--- /dev/null
+++ b/browser/base/content/test/general/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;
+ });
+}