Files
brave-core/test/data
Netzenbot f2ad0c1142 Fix flaky AIChatRenderViewContextMenuBrowserTest.RewriteInPlace_InputText (#34118)
The wait_for_text() JavaScript function in rewrite.html used only a
MutationObserver to detect text changes. MutationObserver observes DOM
node mutations (childList, subtree, characterData) but does NOT observe
.value property changes on <input> and <textarea> elements. When the
Replace() IPC updates an input element's value asynchronously, the
MutationObserver never fires, causing EvalJs to time out.

Add an 'input' event listener alongside the MutationObserver so that
value changes on form elements are properly detected. MutationObserver
continues to handle contenteditable elements. A resolved flag prevents
duplicate resolution.

Resolves brave/brave-browser#53073
2026-02-23 19:06:53 -05:00
..