Bug 1313271 - wait for load in browser_html_tooltip_hover;r=rickychien draft
authorJulian Descottes <jdescottes@mozilla.com>
Fri, 03 Feb 2017 12:52:28 +0100
changeset 470289 ae4492647b7829f48b2baa06263e5c02a09621ac
parent 469700 fc352d66e7bce2a4d8635c1b8a815b62616420b5
child 544442 35127e9973f97ca8d2482cced6fd6ccff21dfd22
push id43991
push userjdescottes@mozilla.com
push dateFri, 03 Feb 2017 15:17:51 +0000
reviewersrickychien
bugs1313271
milestone54.0a1
Bug 1313271 - wait for load in browser_html_tooltip_hover;r=rickychien MozReview-Commit-ID: 9CHkXMtwTrG
devtools/client/shared/test/browser_html_tooltip_hover.js
--- a/devtools/client/shared/test/browser_html_tooltip_hover.js
+++ b/devtools/client/shared/test/browser_html_tooltip_hover.js
@@ -23,16 +23,18 @@ const TEST_URI = `data:text/xml;charset=
     </vbox>
   </window>`;
 
 const {HTMLTooltip} = require("devtools/client/shared/widgets/tooltip/HTMLTooltip");
 loadHelperScript("helper_html_tooltip.js");
 
 add_task(function* () {
   let [,, doc] = yield createHost("bottom", TEST_URI);
+  // Wait for full page load before synthesizing events on the page.
+  yield waitUntil(() => doc.readyState === "complete");
 
   let width = 100, height = 50;
   let tooltipContent = doc.createElementNS(HTML_NS, "div");
   tooltipContent.textContent = "tooltip";
   let tooltip = new HTMLTooltip(doc, {useXulWrapper: false});
   tooltip.setContent(tooltipContent, {width, height});
 
   let container = doc.getElementById("container");