From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../browser_inplace-editor_focus_closest_editor.js | 180 +++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 devtools/client/shared/test/browser_inplace-editor_focus_closest_editor.js (limited to 'devtools/client/shared/test/browser_inplace-editor_focus_closest_editor.js') diff --git a/devtools/client/shared/test/browser_inplace-editor_focus_closest_editor.js b/devtools/client/shared/test/browser_inplace-editor_focus_closest_editor.js new file mode 100644 index 0000000000..5d721410ac --- /dev/null +++ b/devtools/client/shared/test/browser_inplace-editor_focus_closest_editor.js @@ -0,0 +1,180 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ +/* import-globals-from helper_inplace_editor.js */ + +"use strict"; + +loadHelperScript("helper_inplace_editor.js"); + +// Test the inplace-editor behavior with focusEditableFieldAfterApply +// and focusEditableFieldContainerSelector options + +add_task(async function () { + await addTab( + "data:text/html;charset=utf-8,inline editor focusEditableFieldAfterApply" + ); + const { host, doc } = await createHost(); + + testFocusNavigationWithMultipleEditor(doc); + testFocusNavigationWithNonMatchingFocusEditableFieldContainerSelector(doc); + testMissingFocusEditableFieldContainerSelector(doc); + + host.destroy(); + gBrowser.removeCurrentTab(); +}); + +function testFocusNavigationWithMultipleEditor(doc) { + // For some reason