Truly independent web browser
Tests/LibWeb: Sample the eased animation of a cubic bezier crash test
Jelle Raaijmakersf93c11401775
diff --git a/Tests/LibWeb/TestConfig.ini b/Tests/LibWeb/TestConfig.iniindex 086d95658ca..a56f6d12f02 100644--- a/Tests/LibWeb/TestConfig.ini+++ b/Tests/LibWeb/TestConfig.ini@@ -1205,9 +1205,6 @@ Text/input/wpt-import/webstorage/storage_session_setitem_quotaexceedederr.window; Takes about 80 seconds on the arm64 sanitizer CI runner, so it often runs into the per-test timeoutText/input/wpt-import/encoding/unsupported-labels.window.html-; Animation tests are flaky-Text/input/css/cubic-bezier-infinite-slope-crash.html-; Times out on CI, possibly animation related: https://github.com/LadybirdBrowser/ladybird/issues/7742Crash/wpt-import/editing/crashtests/designMode-caret-change.htmldiff --git a/Tests/LibWeb/Text/input/css/cubic-bezier-infinite-slope-crash.html b/Tests/LibWeb/Text/input/css/cubic-bezier-infinite-slope-crash.htmlindex dd61978d684..946ce281771 100644--- a/Tests/LibWeb/Text/input/css/cubic-bezier-infinite-slope-crash.html+++ b/Tests/LibWeb/Text/input/css/cubic-bezier-infinite-slope-crash.html@@ -2,23 +2,31 @@<style>#foo {animation-name: anim;+ animation-duration: 1s;animation-play-state: paused;animation-fill-mode: forwards;animation-timing-function: cubic-bezier(0.4, 0.1, 1, 0);}- @keyframes anim {}+ @keyframes anim {+ from {+ opacity: 0;+ }+ to {+ opacity: 1;+ }+ }</style><div id="foo"></div><script src="../include.js"></script><script>- asyncTest(async (done) => {+ test(() => {const foo = document.getElementById("foo");const anim = foo.getAnimations()[0];- anim.onfinish = function () {- println("PASS! (Didn't crash)");- done();- };- anim.play();+ for (const time of [999.999, 1000]) {+ anim.currentTime = time;+ getComputedStyle(foo).opacity;+ }+ println("PASS! (Didn't crash)");});</script>