Update web-platform-tests to revision dc5cbf088edcdb266541d4e5a76149a2c6e716a0

This commit is contained in:
Ms2ger 2016-09-09 09:40:35 +02:00
parent 1d40075f03
commit 079092dfea
2381 changed files with 90360 additions and 17722 deletions

View file

@ -28,15 +28,22 @@ if (!window.assert_times_equal) {
// creates div element, appends it to the document body and
// removes the created element during test cleanup
function createDiv(test, doc) {
return createElement(test, 'div', doc);
}
// creates element of given tagName, appends it to the document body and
// removes the created element during test cleanup
// if tagName is null or undefined, returns div element
function createElement(test, tagName, doc) {
if (!doc) {
doc = document;
}
var div = doc.createElement('div');
doc.body.appendChild(div);
var element = doc.createElement(tagName || 'div');
doc.body.appendChild(element);
test.add_cleanup(function() {
div.remove();
element.remove();
});
return div;
return element;
}
// Creates a style element with the specified rules, appends it to the document