Removes cancel from promises

This commit is contained in:
Simon Gellis
2017-02-22 20:45:35 -05:00
parent 77307349a8
commit c4f324a18e
2 changed files with 0 additions and 32 deletions

View File

@@ -1004,15 +1004,6 @@ export namespace promise {
// region Methods
/**
* Cancels the computation of this promise's value, rejecting the promise in the
* process.
* @param {*} reason The reason this promise is being cancelled. If not an
* {@code Error}, one will be created using the value's string
* representation.
*/
cancel(opt_reason?: string | Error): void;
/**
* Registers listeners for when this instance is resolved. This function most
* overridden by subtypes.
@@ -2053,15 +2044,6 @@ export class AlertPromise extends Alert implements promise.IThenable<Alert> {
// region Methods
/**
* Cancels the computation of this promise's value, rejecting the promise in the
* process.
* @param {*} reason The reason this promise is being cancelled. If not an
* {@code Error}, one will be created using the value's string
* representation.
*/
cancel(opt_reason?: string | Error): void;
/**
* Registers listeners for when this instance is resolved. This function most
* overridden by subtypes.
@@ -4829,15 +4811,6 @@ export class WebElementPromise extends WebElement implements promise.IThenable<W
*/
constructor(driver: WebDriver, el: promise.Promise<WebElement>);
/**
* Cancels the computation of this promise's value, rejecting the promise in the
* process. This method is a no-op if the promise has alreayd been resolved.
*
* @param {string=} opt_reason The reason this promise is being cancelled.
*/
cancel(opt_reason?: string): void;
/**
* Registers listeners for when this instance is resolved.
*

View File

@@ -716,9 +716,6 @@ function TestWebElementPromise() {
var elementPromise: webdriver.WebElementPromise = driver.findElement(webdriver.By.id('id'));
elementPromise.cancel();
elementPromise.cancel('reason');
elementPromise.then();
elementPromise.then((element: webdriver.WebElement) => {});
elementPromise.then((element: webdriver.WebElement) => {}, (error: any) => {});
@@ -943,8 +940,6 @@ function TestPromiseClass() {
promise = new webdriver.promise.Promise<string>((resolve: (value: webdriver.promise.Promise<string>) => void, reject: () => void) => {});
promise = new webdriver.promise.Promise<string>((resolve: (value: string) => void, reject: () => void) => {}, controlFlow);
promise.cancel('Abort');
promise = promise.then();
promise = promise.then((a: string) => 'cde');
promise = promise.then((a: string) => 'cde', (e: any) => {});