Bug 1290680 - Test the mouse leaving the widget in browser_net_image-tooltip.js r=jdescottes
authorJarda Snajdr <jsnajdr@gmail.com>
Mon, 15 Aug 2016 16:03:10 +0200
changeset 400736 9ccc7eb9a74c20aae65d79a1dddb180c2d3609f5
parent 400735 d7218029d78d41639f23c32ebb8f75cd5a4173f5
child 400737 3e4803eb9a5ca755a8881bf599f05f8430ffb343
push id26263
push userbmo:standard8@mozilla.com
push dateMon, 15 Aug 2016 16:06:35 +0000
reviewersjdescottes
bugs1290680
milestone51.0a1
Bug 1290680 - Test the mouse leaving the widget in browser_net_image-tooltip.js r=jdescottes MozReview-Commit-ID: 68rFsHHHTHZ
devtools/client/netmonitor/test/browser_net_image-tooltip.js
--- a/devtools/client/netmonitor/test/browser_net_image-tooltip.js
+++ b/devtools/client/netmonitor/test/browser_net_image-tooltip.js
@@ -33,16 +33,22 @@ add_task(function* test() {
   yield NetMonitorController.triggerActivity(ACTIVITY_TYPE.RELOAD.WITH_CACHE_ENABLED);
   debuggee.performRequests();
   yield onEvents;
   yield onThumbnail;
 
   info("Checking the image thumbnail after a reload.");
   yield showTooltipAndVerify(RequestsMenu.tooltip, RequestsMenu.items[6]);
 
+  info("Checking if the image thumbnail is hidden when mouse leaves the menu widget");
+  let requestsMenuEl = $("#requests-menu-contents");
+  let onHidden = RequestsMenu.tooltip.once("hidden");
+  EventUtils.synthesizeMouse(requestsMenuEl, 0, 0, {type: "mouseout"}, monitor.panelWin);
+  yield onHidden;
+
   yield teardown(monitor);
   finish();
 
   /**
    * Show a tooltip on the {requestItem} and verify that it was displayed
    * with the expected content.
    */
   function* showTooltipAndVerify(tooltip, requestItem) {