summaryrefslogtreecommitdiffstats
path: root/dom/events/test/test_bug1332699.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /dom/events/test/test_bug1332699.html
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/events/test/test_bug1332699.html')
-rw-r--r--dom/events/test/test_bug1332699.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/dom/events/test/test_bug1332699.html b/dom/events/test/test_bug1332699.html
new file mode 100644
index 0000000000..c2a858d8ad
--- /dev/null
+++ b/dom/events/test/test_bug1332699.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Test for bug 1332699</title>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<script src="/tests/SimpleTest/EventUtils.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<style>
+#test {
+ color: red;
+ transition: color 100ms;
+}
+#test.changed {
+ color: green;
+}
+</style>
+<div id="test"></div>
+<script>
+SimpleTest.waitForExplicitFinish();
+
+window.onload = function () {
+ let $test = document.getElementById('test');
+ is(getComputedStyle($test).color, 'rgb(255, 0, 0)',
+ 'color should be red before transition');
+ let numEvents = 0;
+ $test.addEventListener('webkitTransitionEnd', function() {
+ ++numEvents;
+ if (numEvents == 1) {
+ is(getComputedStyle($test).color, 'rgb(0, 128, 0)',
+ 'color should be green after transition');
+ $test.dispatchEvent(new TransitionEvent('transitionend'));
+ is(numEvents, 1, "Shouldn't receive the prefixed event again");
+ SimpleTest.finish();
+ }
+ });
+ $test.className = 'changed';
+};
+</script>