From da4c7e7ed675c3bf405668739c3012d140856109 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:42 +0200 Subject: Adding upstream version 126.0. Signed-off-by: Daniel Baumann --- .../events-contenteditable-manual.tentative.html | 19 ++++ ...tenteditable-same-element-manual.tentative.html | 15 +++ .../dnd/drop/events-input-manual.tentative.html | 16 +++ ...events-input-same-element-manual.tentative.html | 15 +++ .../dnd/drop/events-textarea-manual.tentative.html | 16 +++ ...nts-textarea-same-element-manual.tentative.html | 15 +++ .../tests/html/editing/dnd/drop/support/events.js | 31 ++++++ .../dnd-datatransfer-setdragimage-manual.html | 108 +++++++++++++++++++++ 8 files changed, 235 insertions(+) create mode 100644 testing/web-platform/tests/html/editing/dnd/drop/events-contenteditable-manual.tentative.html create mode 100644 testing/web-platform/tests/html/editing/dnd/drop/events-contenteditable-same-element-manual.tentative.html create mode 100644 testing/web-platform/tests/html/editing/dnd/drop/events-input-manual.tentative.html create mode 100644 testing/web-platform/tests/html/editing/dnd/drop/events-input-same-element-manual.tentative.html create mode 100644 testing/web-platform/tests/html/editing/dnd/drop/events-textarea-manual.tentative.html create mode 100644 testing/web-platform/tests/html/editing/dnd/drop/events-textarea-same-element-manual.tentative.html create mode 100644 testing/web-platform/tests/html/editing/dnd/drop/support/events.js create mode 100644 testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/dnd-datatransfer-setdragimage-manual.html (limited to 'testing/web-platform/tests/html/editing/dnd') diff --git a/testing/web-platform/tests/html/editing/dnd/drop/events-contenteditable-manual.tentative.html b/testing/web-platform/tests/html/editing/dnd/drop/events-contenteditable-manual.tentative.html new file mode 100644 index 0000000000..9e513eb836 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/drop/events-contenteditable-manual.tentative.html @@ -0,0 +1,19 @@ + + +Selection drag and drop: events for contenteditable + + + + +
+
+ + diff --git a/testing/web-platform/tests/html/editing/dnd/drop/events-contenteditable-same-element-manual.tentative.html b/testing/web-platform/tests/html/editing/dnd/drop/events-contenteditable-same-element-manual.tentative.html new file mode 100644 index 0000000000..907306301f --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/drop/events-contenteditable-same-element-manual.tentative.html @@ -0,0 +1,15 @@ + + +Selection drag and drop: events for contenteditable (same element) + + + +
Drag me ...to here:
+ + diff --git a/testing/web-platform/tests/html/editing/dnd/drop/events-input-manual.tentative.html b/testing/web-platform/tests/html/editing/dnd/drop/events-input-manual.tentative.html new file mode 100644 index 0000000000..2f9914cca9 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/drop/events-input-manual.tentative.html @@ -0,0 +1,16 @@ + + +Selection drag and drop: events for <input> + + + +
+
+ + diff --git a/testing/web-platform/tests/html/editing/dnd/drop/events-input-same-element-manual.tentative.html b/testing/web-platform/tests/html/editing/dnd/drop/events-input-same-element-manual.tentative.html new file mode 100644 index 0000000000..8a578d51ad --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/drop/events-input-same-element-manual.tentative.html @@ -0,0 +1,15 @@ + + +Selection drag and drop: events for <input> (same element) + + + + + + diff --git a/testing/web-platform/tests/html/editing/dnd/drop/events-textarea-manual.tentative.html b/testing/web-platform/tests/html/editing/dnd/drop/events-textarea-manual.tentative.html new file mode 100644 index 0000000000..7fb8bf437f --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/drop/events-textarea-manual.tentative.html @@ -0,0 +1,16 @@ + + +Selection drag and drop: events for <textarea> + + + +
+
+ + diff --git a/testing/web-platform/tests/html/editing/dnd/drop/events-textarea-same-element-manual.tentative.html b/testing/web-platform/tests/html/editing/dnd/drop/events-textarea-same-element-manual.tentative.html new file mode 100644 index 0000000000..c856fd4fbe --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/drop/events-textarea-same-element-manual.tentative.html @@ -0,0 +1,15 @@ + + +Selection drag and drop: events for <textarea> (same element) + + + + + + diff --git a/testing/web-platform/tests/html/editing/dnd/drop/support/events.js b/testing/web-platform/tests/html/editing/dnd/drop/support/events.js new file mode 100644 index 0000000000..015cead385 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/drop/support/events.js @@ -0,0 +1,31 @@ +setup({ explicit_timeout: true, single_test: true }); +function rAF() { + return new Promise(resolve => { + requestAnimationFrame(resolve); + }); +} +const a = document.getElementById('a'); +const b = document.getElementById('b'); +const actualEvents = []; +const expectedEvents = document.body.dataset.expectedEvents.replace(/\s+/g, '').split(','); +const eventTypes = new Set(expectedEvents.map(s => s.split(':')[1])); +for (const eventType of eventTypes) { + if (a) { + a.addEventListener(eventType, e => { + actualEvents.push(`a:${e.type}:${e.inputType || ''}`); + }); + } + b.addEventListener(eventType, async (e) => { + actualEvents.push(`b:${e.type}:${e.inputType || ''}`); + if (e.type === "input") { + await rAF(); + await rAF(); + assert_array_equals(actualEvents, expectedEvents); + done(); + } + }); +} +const dragMeElement = document.querySelector('[data-select]'); +const [selectionStart, selectionEnd] = dragMeElement.dataset.select.split(',').map(s => parseInt(s, 10)); +setSelection(dragMeElement, selectionStart, selectionEnd); +dragMeElement.focus(); diff --git a/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/dnd-datatransfer-setdragimage-manual.html b/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/dnd-datatransfer-setdragimage-manual.html new file mode 100644 index 0000000000..acd8450308 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/dnd-datatransfer-setdragimage-manual.html @@ -0,0 +1,108 @@ + + + + + + + + + +
+
+
+

+ Select this element, drag it to the Drop Zone and drag image + should be visible. The drag image should be identical to the above image. + And the drag image should not change through out the drag and drop operation. +

+
+
+

+ Select this element, drag it to the Drop Zone and drag image + should not be visible. +

+
+
+ Drop Zone +
+ + + + -- cgit v1.2.3