Bug 1150005 - Don't wait for "editor-selected" event in browser_styleeditor_fetch-from-cache.js as it may have already been emitted. r=bgrins, a=test-only
authorSami Jaktholm <sjakthol@outlook.com>
Sat, 11 Apr 2015 10:34:31 +0300
changeset 263182 2f7ea2e1f1ad23cff0b3d9bd502c105583774b0b
parent 263181 fea89e47cbdf41522285df1cd16211b830c44b66
child 263183 d31d04e9a239fe1098357c1b3cd86fd552fd985f
push id1963
push userpaolo.mozmail@amadzone.org
push dateSun, 10 May 2015 10:26:20 +0000
reviewersbgrins, test-only
bugs1150005
milestone39.0a2
Bug 1150005 - Don't wait for "editor-selected" event in browser_styleeditor_fetch-from-cache.js as it may have already been emitted. r=bgrins, a=test-only
browser/devtools/styleeditor/test/browser_styleeditor_fetch-from-cache.js
--- a/browser/devtools/styleeditor/test/browser_styleeditor_fetch-from-cache.js
+++ b/browser/devtools/styleeditor/test/browser_styleeditor_fetch-from-cache.js
@@ -18,18 +18,18 @@ add_task(function() {
   let netmonitor = toolbox.getPanel("netmonitor");
 
   info("Navigating to test page");
   yield navigateTo(TEST_URL);
 
   info("Opening Style Editor");
   let styleeditor = yield toolbox.selectTool("styleeditor");
 
-  info("Waiting for an editor to be selected.");
-  yield styleeditor.UI.once("editor-selected");
+  info("Waiting for the source to be loaded.");
+  yield styleeditor.UI.editors[0].getSourceEditor();
 
   info("Checking Netmonitor contents.");
   let requestsForCss = 0;
   for (let item of netmonitor._view.RequestsMenu) {
     if (item.attachment.url.endsWith("doc_uncached.css")) {
       requestsForCss++;
     }
   }