зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 1141498
) for mochitest-1 bustage
Backed out changeset aab01fe57d48 (bug1141498
) Backed out changeset d366dc0fb693 (bug1141498
)
This commit is contained in:
Родитель
9825e5f35a
Коммит
fa3b470408
|
@ -7,22 +7,12 @@
|
|||
* @param t The testharness.js Test object. If provided, this will be used
|
||||
* to register a cleanup callback to remove the div when the test
|
||||
* finishes.
|
||||
*
|
||||
* @param attrs A dictionary object with attribute names and values to set on
|
||||
* the div.
|
||||
*/
|
||||
function addDiv(t, attrs) {
|
||||
function addDiv(t) {
|
||||
var div = document.createElement('div');
|
||||
if (attrs) {
|
||||
for (var attrName in attrs) {
|
||||
div.setAttribute(attrName, attrs[attrName]);
|
||||
}
|
||||
}
|
||||
document.body.appendChild(div);
|
||||
if (t && typeof t.add_cleanup === 'function') {
|
||||
t.add_cleanup(function() {
|
||||
div.parentNode.removeChild(div);
|
||||
});
|
||||
t.add_cleanup(function() { div.remove(); });
|
||||
}
|
||||
return div;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче