From 4d027b355a5ffdd508ced8d33d994552cde3d143 Mon Sep 17 00:00:00 2001 From: Tim Nguyen Date: Thu, 9 May 2024 13:29:15 -0700 Subject: [PATCH] WebKit export of https://bugs.webkit.org/show_bug.cgi?id=273969 --- .../duplicate-tag-rejects-start.html | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/css/css-view-transitions/duplicate-tag-rejects-start.html b/css/css-view-transitions/duplicate-tag-rejects-start.html index 6c99d6426c04f5..5c605fefbb3cc1 100644 --- a/css/css-view-transitions/duplicate-tag-rejects-start.html +++ b/css/css-view-transitions/duplicate-tag-rejects-start.html @@ -33,18 +33,18 @@ let updateCallbackDoneResolved = false; transition.updateCallbackDone.then(() => { updateCallbackDoneResolved = true; }, reject); - // Then finished resolves since updateCallbackDone was already resolved. - let finishResolved = false; - transition.updateCallbackDone.then(() => { - assert_true(updateCallbackDoneResolved, "updateCallbackDone not resolved before finish"); - finishResolved = true; - }, reject); - - // Finally ready rejects. + // Ready rejects. + let readyRejected = false; transition.ready.then(reject, () => { - assert_true(finishResolved, "finish not resolved before ready"); - resolve(); + readyRejected = true; + assert_true(updateCallbackDoneResolved, "updateCallbackDone should resolve before ready was rejected"); }); + + // Then finished resolves since updateCallbackDone was already resolved. + transition.finished.then(() => { + assert_true(readyRejected, "finished should resolve after ready was rejected"); + resolve(); + }, reject); }); }, "Two different elements with the same name in the new DOM should skip the transition");