Bug 1250523 - Wait for the markup-view to be loaded in browser_markup_load_01.js; r=gl
authorPatrick Brosset <pbrosset@mozilla.com>
Mon, 29 Feb 2016 14:08:22 +0100
changeset 322356 5496f32b7b5a78ee24039fa4cae5e6f34f14dd2d
parent 322355 2f7cae37286ec8aa65e5d90802e2dfe6b93d8742
child 322357 c2977d29a60bfb9eaf02227840f91db3032ce032
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1250523
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1250523 - Wait for the markup-view to be loaded in browser_markup_load_01.js; r=gl MozReview-Commit-ID: 3BSuNy1DjZk
devtools/client/inspector/markup/test/browser_markup_load_01.js
--- a/devtools/client/inspector/markup/test/browser_markup_load_01.js
+++ b/devtools/client/inspector/markup/test/browser_markup_load_01.js
@@ -9,20 +9,20 @@
 // See https://bugzilla.mozilla.org/show_bug.cgi?id=1036324
 
 const server = createTestHTTPServer();
 
 // Register a slow image handler so we can simulate a long time between
 // a reload and the load event firing.
 server.registerContentType("gif", "image/gif");
 server.registerPathHandler("/slow.gif", function (metadata, response) {
-  info ("Image has been requested");
+  info("Image has been requested");
   response.processAsync();
   setTimeout(() => {
-    info ("Image is responding");
+    info("Image is responding");
     response.finish();
   }, 500);
 });
 
 // Test page load events.
 const TEST_URL = "data:text/html," +
   "<!DOCTYPE html>" +
   "<head><meta charset='utf-8' /></head>" +
@@ -32,27 +32,29 @@ const TEST_URL = "data:text/html," +
   "</body>" +
   "</html>";
 
 add_task(function*() {
   let {inspector, testActor, tab} = yield openInspectorForURL(TEST_URL);
   let domContentLoaded = waitForLinkedBrowserEvent(tab, "DOMContentLoaded");
   let pageLoaded = waitForLinkedBrowserEvent(tab, "load");
 
-  ok (inspector.markup, "There is a markup view");
+  ok(inspector.markup, "There is a markup view");
 
   // Select an element while the tab is in the middle of a slow reload.
   reloadTab(testActor);
   yield domContentLoaded;
   yield chooseWithInspectElementContextMenu("img", testActor);
   yield pageLoaded;
 
   yield inspector.once("markuploaded");
-  ok (inspector.markup, "There is a markup view");
-  is (inspector.markup._elt.children.length, 1, "The markup view is rendering");
+  yield waitForMultipleChildrenUpdates(inspector);
+
+  ok(inspector.markup, "There is a markup view");
+  is(inspector.markup._elt.children.length, 1, "The markup view is rendering");
 });
 
 function* chooseWithInspectElementContextMenu(selector, testActor) {
   yield BrowserTestUtils.synthesizeMouseAtCenter(selector, {
     type: "contextmenu",
     button: 2
   }, gBrowser.selectedBrowser);