Bug 1275043 - Return "no such window" error when listener cannot be reached; r=automatedtester a=test-only
authorAndreas Tolfsen <ato@mozilla.com>
Mon, 23 May 2016 17:55:03 +0100
changeset 333247 fb6c47bc3e2d739b4b61d7a43e5f0f748c0e425a
parent 333246 52984371a7f03c909798473a34832fa16e7e2106
child 333248 2f2941ed16da8f86e849c7e53b4f715d3e389917
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, test-only
bugs1275043
milestone48.0a2
Bug 1275043 - Return "no such window" error when listener cannot be reached; r=automatedtester a=test-only This is a stopgap solution to work with wdspec tests. The proper solution is to follow the steps as laid out by the specification with regards to when existence of the current browsing context (i.e. listener) should take place. MozReview-Commit-ID: 5co9mfPmHir
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -213,17 +213,17 @@ GeckoDriver.prototype.sendAsync = functi
     msg.command_id = cmdId;
   }
 
   if (curRemoteFrame === null) {
     this.curBrowser.executeWhenReady(() => {
       if (this.curBrowser.curFrameId) {
         this.mm.broadcastAsyncMessage(name + this.curBrowser.curFrameId, msg);
       } else {
-        throw new NoSuchFrameError(
+        throw new NoSuchWindowError(
             "No such content frame; perhaps the listener was not registered?");
       }
     });
   } else {
     let remoteFrameId = curRemoteFrame.targetFrameId;
     try {
       this.mm.sendAsyncMessage(name + remoteFrameId, msg);
     } catch (e) {