Run a test per property and value in unitless-length.html

This commit is contained in:
Anthony Ramine 2017-04-25 09:55:55 +02:00
parent f872fdac9a
commit 4df7af564a
2 changed files with 7 additions and 14 deletions

View file

@ -586960,7 +586960,7 @@
"testharness"
],
"quirks-mode/unitless-length.html": [
"1e896cad5c89bfe1756af5db60b61bc9fa93f61b",
"578d2aed4afa7cd6739610d353aebc591d832418",
"testharness"
],
"referrer-policy/OWNERS": [

View file

@ -130,14 +130,11 @@
'#ref{border-style:solid;position:relative;{prop}:{ref};}';
tests.forEach(function(t) {
var test_q = async_test(t.input + ' (quirks)');
var test_a = async_test(t.input + ' (almost standards)');
var test_s = async_test(t.input + ' (standards)');
for (var i in props) {
if (t.shorthand && !(props[i].check_also)) {
continue;
}
test_q.step(function() {
test(function() {
q.style.textContent = style_template.replace('{test}', t.input)
.replace('{ref}', t.q).replace(/\{prop\}/g, props[i].prop)
.replace(/clip:[^;]+/g, function(match) {
@ -153,8 +150,8 @@
props[i].prop + ', checking ' + props[i].check_also[j]);
}
}
});
test_a.step(function() {
}, props[i].prop + ": " + t.input + ' (quirks)');
test(function() {
a.style.textContent = style_template.replace('{test}', t.input)
.replace('{ref}', t.s).replace(/\{prop\}/g, props[i].prop)
.replace(/clip:[^;]+/g, function(match) {
@ -170,8 +167,8 @@
props[i].prop + ', checking ' + props[i].check_also[j]);
}
}
});
test_s.step(function() {
}, props[i].prop + ": " + t.input + ' (almost standards)');
test(function() {
s.style.textContent = style_template.replace('{test}', t.input)
.replace('{ref}', t.s).replace(/\{prop\}/g, props[i].prop)
.replace(/clip:[^;]+/g, function(match) {
@ -187,12 +184,8 @@
props[i].prop + ', checking ' + props[i].check_also[j]);
}
}
});
}, props[i].prop + ": " + t.input + ' (standards)');
}
test_q.done();
test_a.done();
test_s.done();
});
var other_tests = [