mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 16:46:08 +00:00
Tests: Reimport dom/nodes/moveBefore tests
Apart from these moving out of `tentative/`, the
custom-element-move-reactions.html test was updated to be less flaky:
5e87cd92c0
This commit is contained in:
parent
7fe854c131
commit
0e168ce631
Notes:
github-actions[bot]
2025-06-17 12:00:11 +00:00
Author: https://github.com/AtkinsSJ
Commit: 0e168ce631
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5117
Reviewed-by: https://github.com/gmta ✅
25 changed files with 36 additions and 32 deletions
|
@ -1,14 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Node.moveBefore</title>
|
||||
<script src="../../../../resources/testharness.js"></script>
|
||||
<script src="../../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<!-- First test shared pre-insertion checks that work similarly for replaceChild
|
||||
and moveBefore -->
|
||||
<script>
|
||||
var insertFunc = Node.prototype.moveBefore;
|
||||
</script>
|
||||
<script src="../../pre-insertion-validation-hierarchy.js"></script>
|
||||
<script src="../pre-insertion-validation-hierarchy.js"></script>
|
||||
<script>
|
||||
preInsertionValidateHierarchy("moveBefore");
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Node.moveBefore custom element reactions</title>
|
||||
<script src="../../../../resources/testharness.js"></script>
|
||||
<script src="../../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
;
|
||||
</script>
|
||||
|
@ -9,10 +9,14 @@
|
|||
<body>
|
||||
<section id="section"></section>
|
||||
<script>
|
||||
let index = 0;
|
||||
function unique_element_name() {
|
||||
return `ce-${++index}`;
|
||||
}
|
||||
promise_test(async t => {
|
||||
const ce = document.getElementById("ce");
|
||||
let reactions = [];
|
||||
const element_name = `ce-${performance.now()}`;
|
||||
const element_name = unique_element_name();
|
||||
customElements.define(element_name,
|
||||
class MockCustomElement extends HTMLElement {
|
||||
connectedCallback() { reactions.push("connected"); }
|
||||
|
@ -31,7 +35,7 @@
|
|||
promise_test(async t => {
|
||||
const ce = document.getElementById("ce");
|
||||
let reactions = [];
|
||||
const element_name = `ce-${performance.now()}`;
|
||||
const element_name = unique_element_name();
|
||||
customElements.define(element_name,
|
||||
class MockCustomElement extends HTMLElement {
|
||||
connectedCallback() { reactions.push(this.isConnected); }
|
||||
|
@ -50,7 +54,7 @@
|
|||
promise_test(async t => {
|
||||
const ce = document.getElementById("ce");
|
||||
let reactions = [];
|
||||
const element_name = `ce-${performance.now()}`;
|
||||
const element_name = unique_element_name();
|
||||
customElements.define(element_name,
|
||||
class MockCustomElement extends HTMLElement {
|
||||
connectedMoveCallback() { reactions.push("connectedMove"); }
|
||||
|
@ -70,8 +74,8 @@
|
|||
promise_test(async t => {
|
||||
const ce = document.getElementById("ce");
|
||||
let reactions = [];
|
||||
const outer_element_name = `ce-${performance.now()}-outer`;
|
||||
const inner_element_name = `ce-${performance.now()}-inner`;
|
||||
const outer_element_name = unique_element_name();
|
||||
const inner_element_name = unique_element_name();
|
||||
customElements.define(outer_element_name,
|
||||
class MockCustomElement extends HTMLElement {
|
||||
connectedCallback() { reactions.push("outer connected"); }
|
||||
|
@ -97,7 +101,7 @@
|
|||
promise_test(async t => {
|
||||
const ce = document.getElementById("ce");
|
||||
let reactions = [];
|
||||
const element_name = `ce-${performance.now()}`;
|
||||
const element_name = unique_element_name();
|
||||
customElements.define(element_name,
|
||||
class MockCustomElement extends HTMLElement {
|
||||
disconnectedCallback() { reactions.push("disconnected"); }
|
||||
|
@ -115,7 +119,7 @@
|
|||
promise_test(async t => {
|
||||
const ce = document.getElementById("ce");
|
||||
let reactions = [];
|
||||
const element_name = `ce-${performance.now()}`;
|
||||
const element_name = unique_element_name();
|
||||
customElements.define(element_name,
|
||||
class MockCustomElement extends HTMLElement {
|
||||
connectedCallback() { reactions.push("connected"); }
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<title>moveBefore should handle focus bubbling correctly</title>
|
||||
<script src="../../../../resources/testharness.js"></script>
|
||||
<script src="../../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
<section id="old_parent">
|
||||
<button id="button" tabindex="1">Button</button>
|
|
@ -1,8 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src='../../../../resources/testharness.js'></script>
|
||||
<script src='../../../../resources/testharnessreport.js'></script>
|
||||
<script src='../../../resources/testharness.js'></script>
|
||||
<script src='../../../resources/testharnessreport.js'></script>
|
||||
</head>
|
||||
|
||||
<body>
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../../../../resources/testharness.js"></script>
|
||||
<script src="../../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
<style>
|
||||
section {
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../../../../resources/testharness.js"></script>
|
||||
<script src="../../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
|
||||
<body>
|
||||
<div id=shadowTarget></div>
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Mutation events are suppressed during moveBefore()</title>
|
||||
<script src="../../../../resources/testharness.js"></script>
|
||||
<script src="../../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
|
||||
<body>
|
||||
<p id=reference>reference</p>
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<title>slotchanged event</title>
|
||||
<script src="../../../../resources/testharness.js"></script>
|
||||
<script src="../../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
|
||||
<div id=oldParent>
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Nonce attribute is not cleared</title>
|
||||
<script src="../../../../resources/testharness.js"></script>
|
||||
<script src="../../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
|
||||
<section id="new_parent"></section>
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Object element moveBefore() regression test</title>
|
||||
<script src="../../../../resources/testharness.js"></script>
|
||||
<script src="../../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
|
||||
<b id="p"><object>
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<title>moveBefore should not close a popover</title>
|
||||
<script src="../../../../resources/testharness.js"></script>
|
||||
<script src="../../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
<section id="old_parent">
|
||||
<div popover>
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<script src='../../../../resources/testharness.js'></script>
|
||||
<script src='../../../../resources/testharnessreport.js'></script>
|
||||
<script src='../../../resources/testharness.js'></script>
|
||||
<script src='../../../resources/testharnessreport.js'></script>
|
||||
<body>
|
||||
</body>
|
||||
<script>
|
Loading…
Add table
Add a link
Reference in a new issue