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.js11
1 files changed, 11 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 0000000000..b0c65c6af6
--- /dev/null
+++ b/browser/base/content/test/general/browser_duplicateIDs.js
@@ -0,0 +1,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;
+ }
+ );
+}