Bug 1756274 - Make browser_findbar.js more resilient. r=mcheang,NeilDeakin

Disable smooth scrolling during one of the tasks and add DOCTYPE.
I don't know a way to test this in the same environment that failed in
the automated job, so this is mostly a guess, but it doesn't seem like
it can hurt in this case.

Differential Revision: https://phabricator.services.mozilla.com/D139407
This commit is contained in:
Shane Hughes 2022-03-11 20:47:05 +00:00
Родитель 6fde748a44
Коммит 3035ebae4d
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -308,9 +308,16 @@ add_task(async function test_open_and_close_keys() {
* accel+arrow up/down) still works while the findbar is open.
*/
add_task(async function test_input_keypress() {
await SpecialPowers.pushPrefEnv({ set: [["general.smoothScroll", false]] });
let tab = await BrowserTestUtils.openNewForegroundTab(
gBrowser,
"data:text/html,<body style='height: 5000px;'>Hello There</body>"
/* html */
`data:text/html,
<!DOCTYPE html>
<body style='height: 5000px;'>
Hello There
</body>`
);
await gFindBarPromise;