Bug 1415115 - forcing test window focus on dialog close. r=surkov
authorYura Zenevich <yura.zenevich@gmail.com>
Tue, 07 Nov 2017 11:30:06 -0500
changeset 443964 35a375648ee0224743657c67edfebf0cbe81b719
parent 443963 dd6063357ae629ffb82e2087ac58431c07548a82
child 443965 ac9d12e5587fe2486a2a8c95ef911768841195e2
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs1415115
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1415115 - forcing test window focus on dialog close. r=surkov MozReview-Commit-ID: B71ChCA8Uzm
accessible/tests/mochitest/events/docload/test_docload_root.html
accessible/tests/mochitest/events/docload/test_docload_shutdown.html
--- a/accessible/tests/mochitest/events/docload/test_docload_root.html
+++ b/accessible/tests/mochitest/events/docload/test_docload_root.html
@@ -87,17 +87,20 @@
       };
 
       this.getID = () => `open dialog '${aURL}'`;
     }
 
     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),
           `The document accessible for dialog is in cache still!`);
 
         gDialog = gDialogDoc = gRootAcc = null;
       };
 
--- a/accessible/tests/mochitest/events/docload/test_docload_shutdown.html
+++ b/accessible/tests/mochitest/events/docload/test_docload_shutdown.html
@@ -105,17 +105,20 @@
       };
 
       this.getID = () => `open dialog '${aURL}'`;
     }
 
     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),
           "The document accessible for dialog is in cache still!");
         // After the window is closed all alive subdocument accessibles should
         // be shut down.
         ok(!isAccessibleInCache(gIframeDoc),
           "The document accessible for iframe is in cache still!");