Skip to content

Commit

Permalink
Fix webdriver.testing.Window's call to webdriver.promise.Promise cons…
Browse files Browse the repository at this point in the history
…tructor, which requires a resolver function as of commit 762a185.

Signed-off-by: Seva Lotoshnikov <[email protected]>
  • Loading branch information
juangj authored and sevaseva committed Jan 13, 2015
1 parent 44e5531 commit 3e0c93a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions javascript/webdriver/testing/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ goog.require('webdriver.promise.Promise');
* @extends {webdriver.promise.Promise}
*/
webdriver.testing.Window = function(driver, handle, opt_window) {
webdriver.promise.Promise.call(this);
webdriver.promise.Promise.call(this, function(fulfill, reject) {
handle.then(fulfill, reject);
});

/** @private {!webdriver.WebDriver} */
this.driver_ = driver;
Expand Down Expand Up @@ -153,12 +155,6 @@ webdriver.testing.Window.prototype.cancel = function() {
};


/** @override */
webdriver.testing.Window.prototype.then = function(callback, errback) {
return this.handle_.then(callback, errback);
};


/**
* Focuses the wrapped driver on the window managed by this class.
* @return {!webdriver.promise.Promise} A promise that will be resolved
Expand Down

0 comments on commit 3e0c93a

Please sign in to comment.