From 7c8c1417263f67fc2dad936936714328a828bc5d Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Wed, 1 Jan 2025 01:55:10 +0000 Subject: [PATCH] Bug 1938060 [wpt PR 49758] - DOM: Move moveBefore() returns undefined, a=testonly Automatic update from web-platform-tests DOM: Move moveBefore() returns undefined See discussion in https://github.com/whatwg/dom/issues/1335. R=nrosenthalchromium.org Bug: 40150299 Change-Id: I50aeafb913abb4b63480be4532254f367abf37b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6097561 Reviewed-by: Noam Rosenthal Commit-Queue: Dominic Farolino Cr-Commit-Position: refs/heads/main{#1397950} -- wpt-commits: 37cad0c49e62655850799c6f6ee165b3ceacebdd wpt-pr: 49758 UltraBlame original commit: 7345177f4c7b0628e97d6fb86c41df63b081bb4a --- .../moveBefore/tentative/Node-moveBefore.html | 115 +++++++++++++++++- 1 file changed, 111 insertions(+), 4 deletions(-) diff --git a/testing/web-platform/tests/dom/nodes/moveBefore/tentative/Node-moveBefore.html b/testing/web-platform/tests/dom/nodes/moveBefore/tentative/Node-moveBefore.html index cdb503a6d3ca..180aa7aeca7a 100644 --- a/testing/web-platform/tests/dom/nodes/moveBefore/tentative/Node-moveBefore.html +++ b/testing/web-platform/tests/dom/nodes/moveBefore/tentative/Node-moveBefore.html @@ -2175,12 +2175,104 @@ . moveBefore ( +c +b +) +undefined +" +moveBefore +( +) +returns +undefined +" +) +; +assert_array_equals +( +a +. +childNodes +[ +c b +] +) +; +} +" +moveBefore +( +) +returns +undefined +" +) +; +test +( +( +) += +> +{ +const +a += +document +. +body +. +appendChild +( +document +. +createElement +( +" +div +" +) +) +; +const b += +document +. +createElement +( +" +div +" +) +; +const +c += +document +. +createElement +( +" +div +" ) +; +a +. +append +( b ) ; +a +. +append +( +c +) +; assert_array_equals ( a @@ -2192,15 +2284,30 @@ ] ) ; -assert_equals -( a . moveBefore ( +b +b +) +; +assert_array_equals +( +a +. +childNodes +[ +b c -c +] ) +; +a +. +moveBefore +( +c c ) ; @@ -2217,7 +2324,7 @@ ; } " -Inserting +Moving a node before