fragment.appendChild(style);
fragment.appendChild(cssTests);
- if (webAnimationsTest) {
- var waTests = document.createElement('div');
- waTests.id = 'web-animations-tests';
- waTests.textContent = 'Web Animations API:';
- fragment.appendChild(waTests);
+ var waTestsDiv = null;
+ function waTests() {
+ if (!waTestsDiv) {
+ waTestsDiv = document.createElement('div');
+ waTestsDiv.id = 'web-animations-tests';
+ waTestsDiv.textContent = 'Web Animations API:';
+ fragment.appendChild(waTestsDiv);
+ }
+ return waTestsDiv;
}
var updateScheduled = false;
}
}
var results = document.createElement('pre');
- results.textContent = cssResultString + (webAnimationsTest ? '\n' + waResultString : '');
+ results.textContent = cssResultString + (waTestsDiv ? '\n' + waResultString : '');
results.id = 'results';
document.body.appendChild(results);
}
var nextCaseId = 0;
var cssTestContainer = createTestContainer(describeCSSTest(params), testId);
cssTests.appendChild(cssTestContainer);
- if (webAnimationsTest) {
- var waTestContainer = createTestContainer(describeWATest(params), testId);
- waTests.appendChild(waTestContainer);
- }
expectations.forEach(function(expectation) {
cssTestContainer.appendChild(makeInterpolationTest(
'css', expectation.at, testId, 'case-' + ++nextCaseId, params, expectation.is));
});
- if (webAnimationsTest) {
+ // We don't support prefixed properties in Web Animations
+ if (webAnimationsTest && params.property[0] != '-') {
+ var waTestContainer = createTestContainer(describeWATest(params), testId);
+ waTests().appendChild(waTestContainer);
expectations.forEach(function(expectation) {
waTestContainer.appendChild(makeInterpolationTest(
'web-animations', expectation.at, testId, 'case-' + ++nextCaseId, params, expectation.is));
}, 10000);
}
+ function disableWebAnimationsTest() {
+ webAnimationsTest = false;
+ }
+
window.runAsRefTest = runAsRefTest;
window.testInterpolationAt = testInterpolationAt;
window.assertInterpolation = assertInterpolation;
window.convertToReference = convertToReference;
window.afterTest = afterTest;
+ window.disableWebAnimationsTest = disableWebAnimationsTest;
})();