Bug 1313271 - Wait for load in browser_html_tooltip_hover. r=rickychien, a=test-only
authorJulian Descottes <jdescottes@mozilla.com>
Fri, 03 Feb 2017 12:52:28 +0100
changeset 375912 627c2701f5fc9b8e184977e70fb711d00c856eb7
parent 375911 49db565f13ba17de977aa8726069c59f24600b25
child 375913 c6db1230ce238d787f7ba3ea1180d4f117276bd9
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrickychien, test-only
bugs1313271
milestone53.0a2
Bug 1313271 - Wait for load in browser_html_tooltip_hover. r=rickychien, a=test-only 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");