Bug 1362528 - Let getWindowHandles and getChromeWindowHandles return list of strings r=ato
authorHenrik Skupin <mail@hskupin.info>
Fri, 05 May 2017 22:21:51 +0200
changeset 356856 24b55221df23c82bd45cccbb0b3c7596bd9e5323
parent 356855 20b0f18b27452611e3204eecd29efa7166404104
child 356857 d48d678f5345fa053dfc9aadaddfbe610cec379f
push id31775
push userihsiao@mozilla.com
push dateMon, 08 May 2017 03:10:38 +0000
treeherdermozilla-central@22aaf8bad4df [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1362528
milestone55.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 1362528 - Let getWindowHandles and getChromeWindowHandles return list of strings r=ato By the webdriver spec both commands have to return a list of strings for the window handles. Right now those are numbers. MozReview-Commit-ID: 5Gn624BaVI1
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -1275,17 +1275,17 @@ GeckoDriver.prototype.getWindowHandle = 
  *
  * Each window handle is assigned by the server and is guaranteed unique,
  * however the return array does not have a specified ordering.
  *
  * @return {Array.<string>}
  *     Unique window handles.
  */
 GeckoDriver.prototype.getWindowHandles = function (cmd, resp) {
-  return this.windowHandles;
+  return this.windowHandles.map(String);
 }
 
 /**
  * Get the current window's handle.  This corresponds to a window that
  * may itself contain tabs.
  *
  * Return an opaque server-assigned identifier to this window that
  * uniquely identifies it within this Marionette instance.  This can
@@ -1308,17 +1308,17 @@ GeckoDriver.prototype.getChromeWindowHan
 /**
  * Returns identifiers for each open chrome window for tests interested in
  * managing a set of chrome windows and tabs separately.
  *
  * @return {Array.<string>}
  *     Unique window handles.
  */
 GeckoDriver.prototype.getChromeWindowHandles = function (cmd, resp) {
-  return this.chromeWindowHandles;
+  return this.chromeWindowHandles.map(String);
 }
 
 /**
  * Get the current position and size of the browser window currently in focus.
  *
  * Will return the current browser window size in pixels. Refers to
  * window outerWidth and outerHeight values, which include scroll bars,
  * title bars, etc.