Bug 1378524 - Fix "TypeError: tab is null" exception raised from browser_inspector_extension_sidebar.js when running on beta.
MozReview-Commit-ID: DZPA07695VS
--- 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);