Bug 1378524 - Fix "TypeError: tab is null" exception raised from browser_inspector_extension_sidebar.js when running on beta. r=pbro, a=test-only
authorLuca Greco <lgreco@mozilla.com>
Mon, 13 Nov 2017 17:53:56 +0100
changeset 444864 eb4996243c5e9a10346995acc3ce982b9158bbe5
parent 444863 bf5501f121c806a37fcf6fd503074f02ab0c8380
child 444865 b1aa00643e62f7d96a0d22415637d6dd96b0dc43
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)
reviewerspbro, test-only
bugs1378524
milestone58.0
Bug 1378524 - Fix "TypeError: tab is null" exception raised from browser_inspector_extension_sidebar.js when running on beta. r=pbro, a=test-only 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);