summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-transitions/transition-duration-004-manual.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/css/css-transitions/transition-duration-004-manual.html
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-transitions/transition-duration-004-manual.html')
-rw-r--r--testing/web-platform/tests/css/css-transitions/transition-duration-004-manual.html40
1 files changed, 40 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-transitions/transition-duration-004-manual.html b/testing/web-platform/tests/css/css-transitions/transition-duration-004-manual.html
new file mode 100644
index 0000000000..b93904bb76
--- /dev/null
+++ b/testing/web-platform/tests/css/css-transitions/transition-duration-004-manual.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Transitions Test: transition-duration - negative number</title>
+<link rel="author" title="Intel" href="http://www.intel.com">
+<link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
+<link rel="help" title="2.2. The 'transition-duration' Property" href="http://www.w3.org/TR/css3-transitions/#transition-duration-property">
+<meta name="assert" content="A negative value for 'transition-duration renders the declaration invalid which means the transition is immediate.">
+<style>
+ div {
+ height: 100px;
+ transition-property: width;
+ transition-timing-function: linear;
+ width: 100px;
+ }
+ #ref {
+ background-color: yellow;
+ transition-duration: 2s;
+ }
+ #test {
+ background-color: blue;
+ transition-duration: -2s;
+ }
+</style>
+<body>
+ <p>Click the 'Start' button below. Test passes if the width of yellow square grows smoothly but the blue grows immediately.</p>
+ <div id="ref"></div>
+ <div id="test"></div>
+ <button>Start</button>
+ <script>
+ (function() {
+ var button = document.querySelector("button"),
+ test = document.querySelector("#test"),
+ ref = document.querySelector("#ref");
+ button.addEventListener("click", function(evt) {
+ test.setAttribute("style", "width: 200px;");
+ ref.setAttribute("style", "width: 200px;");
+ }, false);
+ })();
+ </script>
+</body>