Backed out changeset 13c25f58aaca (bug 1891259) for causing xpcshell failures on test_ext_scripting_contentScripts.js CLOSED TREE

This commit is contained in:
Aron Cseh 2024-04-16 16:10:26 +03:00
parent c3c69eabee
commit 543dbecda5
3 changed files with 1 additions and 39 deletions

View File

@ -1299,6 +1299,7 @@ bool EventListenerManager::HandleEventSingleListener(
if (dom::ChromeUtils::IsDevToolsOpened()) {
dbgGuard.emplace(aCurrentTarget, aDOMEvent);
}
nsAutoMicroTask mt;
// Event::currentTarget is set in EventDispatcher.
if (listenerHolder.HasWebIDLCallback()) {

View File

@ -3,8 +3,6 @@
["browser_alt_keyup_in_content.js"]
skip-if = ["os == 'mac'"]
["browser_beforeinput_and_microtask.js"]
["browser_beforeinput_by_execCommand_in_contentscript.js"]
support-files = [
"file_beforeinput_by_execCommand_in_contentscript.html",

View File

@ -1,37 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
https://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_task(async function test_beforeinput_and_microtask() {
await BrowserTestUtils.withNewTab(
{
gBrowser,
url: `data:text/html,
<html>
<head>
<script>
function handleBeforeInput(event) {
queueMicrotask(() => {
event.preventDefault();
});
}
</script>
</head>
<body onload="document.getElementsByTagName('input')[0].focus()">
<input onbeforeinput="handleBeforeInput(event)"></body>
</html>`,
},
async function (browser) {
browser.focus();
EventUtils.sendChar("a");
await ContentTask.spawn(browser, [], function () {
let val = content.document.body.firstElementChild.value;
Assert.ok(
val == "",
"Element should have empty string as value [" + val + "]"
);
});
}
);
});