mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Bug 1396693
- Make nsIEventListenerChange::changedListenerNames noscript. r=smaug.
This is required for deCOMtamination. The patch removes the only script use of this attribute, which is a low-importance one in a test. --HG-- extra : rebase_source : 65c29043fbd77e60b21398216593cc9788723dd5
This commit is contained in:
parent
6376feec24
commit
712013de72
@ -17,7 +17,7 @@ interface nsIArray;
|
||||
interface nsIEventListenerChange : nsISupports
|
||||
{
|
||||
readonly attribute nsIDOMEventTarget target;
|
||||
readonly attribute nsIArray changedListenerNames;
|
||||
[noscript] readonly attribute nsIArray changedListenerNames;
|
||||
};
|
||||
|
||||
[scriptable, function, uuid(aa7c95f6-d3b5-44b3-9597-1d9f19b9c5f2)]
|
||||
|
@ -108,22 +108,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=524674
|
||||
var expected = expectedEventChanges[i];
|
||||
|
||||
if (current.target == expected.target) {
|
||||
// expected.target.listeners should be a subset of
|
||||
// current.changedListenerNames if all expected listener changes were
|
||||
// sent. We may get random other event listener changes here too, not
|
||||
// just the one from the test.
|
||||
is(current.target, expected.target, current.target + " = " + expected.target);
|
||||
|
||||
var eNames = current.changedListenerNames.enumerate();
|
||||
var listeners = [];
|
||||
while (eNames.hasMoreElements()) {
|
||||
var listenerName = eNames.getNext().QueryInterface(Ci.nsIAtom).toString();
|
||||
listeners.push(listenerName);
|
||||
}
|
||||
var matchAll = expected.listeners.every(function(val)
|
||||
{ return listeners.indexOf(val) >= 0; });
|
||||
if (!matchAll)
|
||||
return;
|
||||
++i;
|
||||
}
|
||||
} catch(ex) {
|
||||
|
Loading…
Reference in New Issue
Block a user