summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-transitions/transition-delay-001.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-transitions/transition-delay-001.html
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-transitions/transition-delay-001.html')
-rw-r--r--testing/web-platform/tests/css/css-transitions/transition-delay-001.html77
1 files changed, 77 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-transitions/transition-delay-001.html b/testing/web-platform/tests/css/css-transitions/transition-delay-001.html
new file mode 100644
index 0000000000..8fa5f5825a
--- /dev/null
+++ b/testing/web-platform/tests/css/css-transitions/transition-delay-001.html
@@ -0,0 +1,77 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>CSS Transitions Test: Parsing transition-delay</title>
+ <meta name="assert" content="Test checks that transition-delay values are parsed properly">
+ <link rel="help" title="2.4. The 'transition-delay' Property" href="http://www.w3.org/TR/css3-transitions/#transition-delay-property">
+ <link rel="help" title="CSS Values and Units Module Level 3 - 6.2. Times: the ‘<time>’ type and ‘s’, ‘ms’ units" href="http://www.w3.org/TR/css3-values/#time">
+ <link rel="author" title="Rodney Rehm" href="http://rodneyrehm.de/en/">
+ <meta name="flags" content="dom">
+
+ <script src="/resources/testharness.js" type="text/javascript"></script>
+ <script src="/resources/testharnessreport.js" type="text/javascript"></script>
+
+ <script src="./support/vendorPrefix.js" type="text/javascript"></script>
+ <script src="./support/helper.js" type="text/javascript"></script>
+ </head>
+ <body>
+ <!-- required by testharnessreport.js -->
+ <div id="log"></div>
+ <!-- elements used for testing -->
+ <div id="container">
+ <div id="transition"></div>
+ </div>
+
+ <script>
+ var transition = document.getElementById('transition');
+ // <time> [, <time>]*
+ var values = {
+ // seconds
+ '10.2s': '10.2s',
+ '1s': '1s',
+ '0.1s': '0.1s',
+ '0.01s': '0.01s',
+ '0.001s': '0.001s',
+ '0.009s': '0.009s',
+ '0s': '0s',
+ '0s': '0s',
+ '.0s': '0s',
+ '0.0s': '0s',
+ '.3s': '0.3s',
+ '-5s' : '-5s',
+ // milliseconds
+ '10200ms': '10.2s',
+ '1000ms': '1s',
+ '100ms': '0.1s',
+ '10ms': '0.01s',
+ '9ms': '0.009s',
+ '1ms': '0.001s',
+ '0ms': '0s',
+ '-500ms' : '-0.5s',
+ // combination
+ '1s, 0.1s, 10ms': '1s, 0.1s, 0.01s',
+ // invalid
+ 'foobar': '0s'
+ };
+
+ // these tests are supposed to fail and
+ // possibly make the engine issue a parser warning
+ var invalidTests = {
+ 'foobar': true
+ };
+
+ for (var key in values) {
+ if (Object.prototype.hasOwnProperty.call(values, key)) {
+ test(function() {
+ setStyle('#transition', {
+ 'transition-delay': key
+ });
+ var result = computedStyle(transition, 'transition-delay');
+ assert_equals(result, values[key], "Expected computed value");
+ }, "parse '" + key + "'");
+ }
+ }
+ </script>
+ </body>
+</html>