From f11712779f292c4095f7a620c8cf2c061b80896f Mon Sep 17 00:00:00 2001 From: Yura Zenevich Date: Tue, 7 Nov 2017 11:30:06 -0500 Subject: [PATCH] Bug 1415115 - forcing test window focus on dialog close. r=surkov MozReview-Commit-ID: B71ChCA8Uzm --- .../tests/mochitest/events/docload/test_docload_root.html | 5 ++++- .../mochitest/events/docload/test_docload_shutdown.html | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/accessible/tests/mochitest/events/docload/test_docload_root.html b/accessible/tests/mochitest/events/docload/test_docload_root.html index a99d03f5bdc9..0002bc663ee2 100644 --- a/accessible/tests/mochitest/events/docload/test_docload_root.html +++ b/accessible/tests/mochitest/events/docload/test_docload_root.html @@ -92,7 +92,10 @@ function closeDialogWnd() { this.eventSeq = [ new invokerChecker(EVENT_FOCUS, getAccessible(document)) ]; - this.invoke = () => gDialog.close(); + this.invoke = () => { + gDialog.close() + window.focus(); + }; this.finalCheck = () => { ok(!isAccessibleInCache(gDialogDoc), diff --git a/accessible/tests/mochitest/events/docload/test_docload_shutdown.html b/accessible/tests/mochitest/events/docload/test_docload_shutdown.html index c45b4f58fad0..ca246c5780e6 100644 --- a/accessible/tests/mochitest/events/docload/test_docload_shutdown.html +++ b/accessible/tests/mochitest/events/docload/test_docload_shutdown.html @@ -110,7 +110,10 @@ function closeWndShutdownDoc() { this.eventSeq = [ new invokerChecker(EVENT_FOCUS, getAccessible(document)) ]; - this.invoke = () => gDialog.close(); + this.invoke = () => { + gDialog.close() + window.focus(); + }; this.finalCheck = () => { ok(!isAccessibleInCache(gDialogDoc),