mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Backed out changeset 13c25f58aaca (bug 1891259) for causing xpcshell failures on test_ext_scripting_contentScripts.js CLOSED TREE
This commit is contained in:
parent
c3c69eabee
commit
543dbecda5
@ -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()) {
|
||||
|
@ -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",
|
||||
|
@ -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 + "]"
|
||||
);
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
Loading…
Reference in New Issue
Block a user