Bug 1421724 - Steal back focus from global webrtc indicator when doing second gUM requests. r=florian
authorAndreas Pehrson <pehrsons@mozilla.com>
Fri, 04 Jan 2019 14:43:46 +0000
changeset 509768 2c1444bc6c19082702d5c19533e0c9586bfb2233
parent 509767 5c37c61c937ea037e696c3424a5281f91c3dcb30
child 509769 2c87990aee062f3008c9e0ab792d8b6ef9c9215e
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1421724
milestone66.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 1421724 - Steal back focus from global webrtc indicator when doing second gUM requests. r=florian Differential Revision: https://phabricator.services.mozilla.com/D15711
browser/base/content/test/webrtc/head.js
--- a/browser/base/content/test/webrtc/head.js
+++ b/browser/base/content/test/webrtc/head.js
@@ -290,16 +290,19 @@ function promiseMessage(aMessage, aActio
     aAction();
 
   return promise;
 }
 
 function promisePopupNotificationShown(aName, aAction) {
   return new Promise(resolve => {
 
+    // In case the global webrtc indicator has stolen focus (bug 1421724)
+    window.focus();
+
     PopupNotifications.panel.addEventListener("popupshown", function() {
       ok(!!PopupNotifications.getNotification(aName), aName + " notification shown");
       ok(PopupNotifications.isPanelOpen, "notification panel open");
       ok(!!PopupNotifications.panel.firstElementChild, "notification panel populated");
 
       executeSoon(resolve);
     }, {once: true});