Bug 1149289 - Fix browser_tabs test issues on Windows. r=me a=test-only
authorJ. Ryan Stinnett <jryans@gmail.com>
Sun, 05 Apr 2015 03:45:49 -0500
changeset 266847 189d8cd85fa49c4df0aaa426b8aa5a7c69e3337b
parent 266846 239508ee646f47857065a69ec7fe20f1b9bd0b43
child 266848 2433d21ff8bbf7dda546930d3aa9fcce67b9c9d5
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme, test-only
bugs1149289
milestone39.0a2
Bug 1149289 - Fix browser_tabs test issues on Windows. r=me a=test-only
browser/devtools/webide/test/browser_tabs.js
--- a/browser/devtools/webide/test/browser_tabs.js
+++ b/browser/devtools/webide/test/browser_tabs.js
@@ -23,16 +23,19 @@ function test() {
     let win = yield openWebIDE();
 
     yield connectToLocal(win);
 
     is(Object.keys(DebuggerServer._connections).length, 1, "Locally connected");
 
     yield selectTabProject(win);
 
+    ok(win.UI.toolboxPromise, "Toolbox promise exists");
+    yield win.UI.toolboxPromise;
+
     let project = win.AppManager.selectedProject;
     is(project.location, TEST_URI, "Location is correct");
     is(project.name, "example.com: Test Tab", "Name is correct");
 
     // Ensure tab list changes are noticed
     let tabsNode = win.document.querySelector("#project-panel-tabs");
     is(tabsNode.querySelectorAll(".panel-item").length, 2, "2 tabs available");
     yield removeTab(tab);
@@ -56,11 +59,13 @@ function connectToLocal(win) {
 }
 
 function selectTabProject(win) {
   return Task.spawn(function() {
     yield win.Cmds.showProjectPanel();
     yield waitForUpdate(win, "runtime-targets");
     let tabsNode = win.document.querySelector("#project-panel-tabs");
     let tabNode = tabsNode.querySelectorAll(".panel-item")[1];
+    let project = waitForUpdate(win, "project");
     tabNode.click();
+    yield project;
   });
 }