Bug 1378524 - Fix "TypeError: tab is null" exception raised from browser_inspector_extension_sidebar.js when running on beta. draft
authorLuca Greco <lgreco@mozilla.com>
Mon, 13 Nov 2017 17:53:56 +0100
changeset 699776 ab6d7f24f01fe06b5c4a80684e705f609c971cb1
parent 697096 fc194660762d1b92e1679d860a8bf41116d0f54f
child 740722 747448fec2f7c8ef4786a3f2a7ca94565887580c
push id89675
push userluca.greco@alcacoop.it
push dateFri, 17 Nov 2017 18:49:03 +0000
bugs1378524
milestone59.0a1
Bug 1378524 - Fix "TypeError: tab is null" exception raised from browser_inspector_extension_sidebar.js when running on beta. MozReview-Commit-ID: DZPA07695VS
devtools/client/inspector/test/head.js
--- a/devtools/client/inspector/test/head.js
+++ b/devtools/client/inspector/test/head.js
@@ -41,17 +41,20 @@ registerCleanupFunction(() => {
   Services.prefs.clearUserPref("devtools.inspector.activeSidebar");
 });
 
 registerCleanupFunction(function* () {
   // Move the mouse outside inspector. If the test happened fake a mouse event
   // somewhere over inspector the pointer is considered to be there when the
   // next test begins. This might cause unexpected events to be emitted when
   // another test moves the mouse.
-  EventUtils.synthesizeMouseAtPoint(1, 1, {type: "mousemove"}, window);
+  // Move the mouse at the top-right corner of the browser, to prevent
+  // the mouse from triggering the tab tooltip to be shown while the tab is
+  // being closed because the test is exiting (See Bug 1378524 for rationale).
+  EventUtils.synthesizeMouseAtPoint(window.innerWidth, 1, {type: "mousemove"}, window);
 });
 
 var navigateTo = Task.async(function* (inspector, url) {
   let markuploaded = inspector.once("markuploaded");
   let onNewRoot = inspector.once("new-root");
   let onUpdated = inspector.once("inspector-updated");
 
   info("Navigating to: " + url);