diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /devtools/client/inspector/markup/test/browser_markup_events_jquery_2.1.1.js | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | devtools/client/inspector/markup/test/browser_markup_events_jquery_2.1.1.js | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_2.1.1.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_2.1.1.js new file mode 100644 index 0000000000..df9f7bc570 --- /dev/null +++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_2.1.1.js @@ -0,0 +1,121 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ +/* import-globals-from helper_events_test_runner.js */ +"use strict"; + +requestLongerTimeout(2); + +// Test that markup view event bubbles show the correct event info for jQuery +// and jQuery Live events (jQuery version 2.1.1). + +const TEST_LIB = "lib_jquery_2.1.1_min.js"; +const TEST_URL = URL_ROOT_SSL + "doc_markup_events_jquery.html?" + TEST_LIB; + +loadHelperScript("helper_events_test_runner.js"); + +/*eslint-disable */ +const TEST_DATA = [ + { + selector: "html", + expected: [ + { + type: "load", + filename: TEST_URL + ":29:38", + attributes: ["Bubbling"], + handler: getDocMarkupEventsJQueryLoadHandlerText(), + }, + ], + }, + { + selector: "#testdiv", + expected: [ + { + type: "click", + filename: TEST_URL + ":36:43", + attributes: ["jQuery"], + handler: ` + function divClick1() { + alert(7); + }`, + }, + { + type: "click", + filename: TEST_URL + ":37:43", + attributes: ["jQuery"], + handler: ` + function divClick2() { + alert(8); + }`, + }, + { + type: "keydown", + filename: TEST_URL + ":38:44", + attributes: ["jQuery"], + handler: ` + function divKeyDown() { + alert(9); + }`, + }, + ], + }, + { + selector: "#livediv", + expected: [ + { + type: "dragend", + filename: TEST_URL + ":33:48", + attributes: ["jQuery", "Live"], + handler: ` + function liveDivDragEnd() { + alert(4); + }`, + }, + { + type: "dragleave", + filename: TEST_URL + ":32:50", + attributes: ["jQuery", "Live"], + handler: ` + function liveDivDragLeave() { + alert(3); + }`, + }, + { + type: "dragover", + filename: TEST_URL + ":35:49", + attributes: ["jQuery", "Live"], + handler: ` + function liveDivDragOver() { + alert(6); + }`, + }, + { + type: "drop", + filename: TEST_URL + ":34:45", + attributes: ["jQuery", "Live"], + handler: ` + function liveDivDrop() { + alert(5); + }`, + }, + ], + }, + { + selector: "#inclassboundeventdiv", + expected: [ + { + type: "click", + filename: TEST_URL + ":66:17", + attributes: ["jQuery", "Live"], + handler: ` + function () { + alert(11); + }`, + }, + ], + }, +]; +/* eslint-enable */ + +add_task(async function () { + await runEventPopupTests(TEST_URL, TEST_DATA); +}); |