Bug 1290680 - Test the mouse leaving the widget in browser_net_image-tooltip.js. r=jdescottes, a=ritu
authorJarda Snajdr <jsnajdr@gmail.com>
Mon, 15 Aug 2016 16:03:10 +0200
changeset 349896 f249312855c246c677e4c46456666ea0fbf8c627
parent 349895 c0a227502cb4297c7fecbb9eff3f3c9e769fab95
child 349897 5d048e93dd79fdec483bd4dd2fd5a6a79c965b5a
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes, ritu
bugs1290680
milestone50.0a2
Bug 1290680 - Test the mouse leaving the widget in browser_net_image-tooltip.js. r=jdescottes, a=ritu 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) {