aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/css/support/interpolation-testcommon.js
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-11-30 09:25:34 -0500
committerGitHub <noreply@github.com>2019-11-30 09:25:34 -0500
commit92bd7637a1b7efb5b3fdfb7b3eaa3be344d54a44 (patch)
tree2633bb9700be5a7b584313a76bcc515a705b39da /tests/wpt/web-platform-tests/css/support/interpolation-testcommon.js
parent3db473714bc87c1c692ebf300620aa382bd9cd1b (diff)
parentdc71e058599ea530737ce069f2b8779af0633829 (diff)
downloadservo-92bd7637a1b7efb5b3fdfb7b3eaa3be344d54a44.tar.gz
servo-92bd7637a1b7efb5b3fdfb7b3eaa3be344d54a44.zip
Auto merge of #24979 - servo-wpt-sync:wpt_update_30-11-2019, r=servo-wpt-sync
Sync WPT with upstream (30-11-2019) Automated downstream sync of changes from upstream as of 30-11-2019. [no-wpt-sync] r? @servo-wpt-sync
Diffstat (limited to 'tests/wpt/web-platform-tests/css/support/interpolation-testcommon.js')
-rw-r--r--tests/wpt/web-platform-tests/css/support/interpolation-testcommon.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/wpt/web-platform-tests/css/support/interpolation-testcommon.js b/tests/wpt/web-platform-tests/css/support/interpolation-testcommon.js
index 3c9754c6941..d1cb7cfbeb0 100644
--- a/tests/wpt/web-platform-tests/css/support/interpolation-testcommon.js
+++ b/tests/wpt/web-platform-tests/css/support/interpolation-testcommon.js
@@ -18,6 +18,7 @@
var cssAnimationsInterpolation = {
name: 'CSS Animations',
+ isSupported: function() {return true;},
supportsProperty: function() {return true;},
supportsValue: function() {return true;},
setup: function() {},
@@ -43,6 +44,7 @@
var cssTransitionsInterpolation = {
name: 'CSS Transitions',
+ isSupported: function() {return true;},
supportsProperty: function() {return true;},
supportsValue: function() {return true;},
setup: function(property, from, target) {
@@ -64,6 +66,7 @@
var cssTransitionAllInterpolation = {
name: 'CSS Transitions with transition: all',
+ isSupported: function() {return true;},
// The 'all' value doesn't cover custom properties.
supportsProperty: function(property) {return property.indexOf('--') !== 0;},
supportsValue: function() {return true;},
@@ -86,6 +89,7 @@
var webAnimationsInterpolation = {
name: 'Web Animations',
+ isSupported: function() {return 'animate' in Element.prototype;},
supportsProperty: function(property) {return true;},
supportsValue: function(value) {return value !== '';},
setup: function() {},
@@ -96,6 +100,10 @@
this.interpolateComposite(property, from, 'replace', to, 'replace', at, target);
},
interpolateComposite: function(property, from, fromComposite, to, toComposite, at, target) {
+ // This case turns into a test error later on.
+ if (!this.isSupported())
+ return;
+
// Convert standard properties to camelCase.
if (!property.startsWith('--')) {
for (var i = property.length - 2; i > 0; --i) {
@@ -272,6 +280,8 @@
target.measure = function() {
var expectedValue = getComputedStyle(expectedTargetContainer.target).getPropertyValue(property);
test(function() {
+ assert_true(interpolationMethod.isSupported(), `${interpolationMethod.name} should be supported`);
+
if (from && from !== neutralKeyframe) {
assert_true(CSS.supports(property, from), '\'from\' value should be supported');
}