mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1892514 - part 5-3: Enable the assertions in IMEContentObserver::FlatTextCache
in some automated tests r=smaug
This patch enables the assertions when running: * The `nsITextInputProcessor` tests * The IME composition tests under `widget/` * Under `editor/libeditor/tests` * Under `editor/libeditor/crashtests` * Under testing/web-platform/tests/editing` * Under testing/web-platform/tests/input-events` Differential Revision: https://phabricator.services.mozilla.com/D211835
This commit is contained in:
parent
aa96b488c9
commit
a9a18ed278
@ -10,6 +10,10 @@
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.waitForFocus(async () => {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["test.ime_content_observer.assert_invalid_cache", true]],
|
||||
});
|
||||
|
||||
const textarea = document.createElement("textarea");
|
||||
document.body.appendChild(textarea);
|
||||
textarea.focus();
|
||||
|
@ -4966,6 +4966,10 @@ async function runTextNotificationChangesDuringNoFrame() {
|
||||
|
||||
async function runTests()
|
||||
{
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["test.ime_content_observer.assert_invalid_cache", true]],
|
||||
});
|
||||
|
||||
textareaInFrame = iframe.contentDocument.getElementById("textarea");
|
||||
runBeginInputTransactionMethodTests();
|
||||
runReleaseTests();
|
||||
|
@ -9,6 +9,10 @@
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.waitForFocus(async () => {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["test.ime_content_observer.assert_invalid_cache", true]],
|
||||
});
|
||||
|
||||
const editingHost = document.querySelector("div[contenteditable]");
|
||||
const TIP = SpecialPowers.Cc["@mozilla.org/text-input-processor;1"].createInstance(
|
||||
SpecialPowers.Ci.nsITextInputProcessor
|
||||
|
@ -12,7 +12,10 @@
|
||||
<div contenteditable id="editor"><p><br></p></div>
|
||||
<script>
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.waitForFocus(function doTests() {
|
||||
SimpleTest.waitForFocus(async function doTests() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["test.ime_content_observer.assert_invalid_cache", true]],
|
||||
});
|
||||
for (let editorId of ["input", "textarea", "editor"]) {
|
||||
let editor = document.getElementById(editorId);
|
||||
editor.focus();
|
||||
|
@ -1,3 +1,5 @@
|
||||
defaults pref(test.ime_content_observer.assert_invalid_cache,true)
|
||||
|
||||
load 336081-1.xhtml
|
||||
load 403965-1.xhtml
|
||||
load 428489-1.html
|
||||
|
@ -1,4 +1,5 @@
|
||||
[DEFAULT]
|
||||
prefs = ["test.ime_content_observer.assert_invalid_cache=true"]
|
||||
skip-if = ["os == 'android'"]
|
||||
|
||||
["browser_bug527935.js"]
|
||||
|
@ -1,4 +1,5 @@
|
||||
[DEFAULT]
|
||||
prefs = ["test.ime_content_observer.assert_invalid_cache=true"]
|
||||
skip-if = ["os == 'android'"]
|
||||
|
||||
["test_bug489202.xhtml"]
|
||||
|
@ -1,6 +1,7 @@
|
||||
[DEFAULT]
|
||||
prefs = [
|
||||
"apz.zoom-to-focused-input.enabled=false",
|
||||
"test.ime_content_observer.assert_invalid_cache=true",
|
||||
"ui.dragThresholdX=4", # Bug 1873142
|
||||
"ui.dragThresholdY=4", # Bug 1873142
|
||||
]
|
||||
|
1
testing/web-platform/meta/editing/__dir__.ini
Normal file
1
testing/web-platform/meta/editing/__dir__.ini
Normal file
@ -0,0 +1 @@
|
||||
prefs: [test.ime_content_observer.assert_invalid_cache:true]
|
@ -1 +1,2 @@
|
||||
prefs: [test.ime_content_observer.assert_invalid_cache:true]
|
||||
leak-threshold: [default:51200]
|
||||
|
@ -10870,7 +10870,10 @@ async function runInputModeTest()
|
||||
async function runTest()
|
||||
{
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["dom.events.textevent.enabled", true]],
|
||||
set: [
|
||||
["dom.events.textevent.enabled", true],
|
||||
["test.ime_content_observer.assert_invalid_cache", true],
|
||||
],
|
||||
});
|
||||
|
||||
window.addEventListener("unload", window.arguments[0].SimpleTest.finish, {once: true, capture: true});
|
||||
|
Loading…
Reference in New Issue
Block a user