mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 589163 - Add test to prevent duplicate ids. r=gavin
This commit is contained in:
parent
211321ca49
commit
7b74aa16f7
@ -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 \
|
||||
|
8
browser/base/content/test/browser_duplicateIDs.js
Normal file
8
browser/base/content/test/browser_duplicateIDs.js
Normal 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;
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user