Bug 1440678 - Disable RDM reload notification for tests. r=ochameau draft
authorJ. Ryan Stinnett <jryans@gmail.com>
Wed, 07 Mar 2018 17:15:41 -0600
changeset 764650 e9a7d81c480a193ddc24449102a0d7409c94fa22
parent 764649 84e605b44eb5b692faae5c0b2d5d7dba21f00ea4
push id101808
push userbmo:jryans@gmail.com
push dateWed, 07 Mar 2018 23:20:59 +0000
reviewersochameau
bugs1440678
milestone60.0a1
Bug 1440678 - Disable RDM reload notification for tests. r=ochameau MozReview-Commit-ID: 5dXxE6u1ZSI
devtools/client/responsive.html/test/browser/head.js
--- a/devtools/client/responsive.html/test/browser/head.js
+++ b/devtools/client/responsive.html/test/browser/head.js
@@ -45,20 +45,24 @@ SimpleTest.waitForExplicitFinish();
 
 // Toggling the RDM UI involves several docShell swap operations, which are somewhat slow
 // on debug builds. Usually we are just barely over the limit, so a blanket factor of 2
 // should be enough.
 requestLongerTimeout(2);
 
 flags.testing = true;
 Services.prefs.setCharPref("devtools.devices.url", TEST_URI_ROOT + "devices.json");
+// The appearance of this notification causes intermittent behavior in some tests that
+// send mouse events, since it causes the content to shift when it appears.
+Services.prefs.setBoolPref("devtools.responsive.reloadNotification.enabled", false);
 
 registerCleanupFunction(async () => {
   flags.testing = false;
   Services.prefs.clearUserPref("devtools.devices.url");
+  Services.prefs.clearUserPref("devtools.responsive.reloadNotification.enabled");
   Services.prefs.clearUserPref("devtools.responsive.html.displayedDeviceList");
   Services.prefs.clearUserPref("devtools.responsive.reloadConditions.touchSimulation");
   Services.prefs.clearUserPref("devtools.responsive.reloadConditions.userAgent");
   await asyncStorage.removeItem("devtools.devices.url_cache");
   await removeLocalDevices();
 });
 
 loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsive.html/manager", true);