From c4f324a18e607a4df9553fc43f3a7553e27f9d5c Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Wed, 22 Feb 2017 20:45:35 -0500 Subject: [PATCH] Removes cancel from promises --- selenium-webdriver/index.d.ts | 27 --------------------------- selenium-webdriver/test/index.ts | 5 ----- 2 files changed, 32 deletions(-) diff --git a/selenium-webdriver/index.d.ts b/selenium-webdriver/index.d.ts index 6f31b751a9..f5c1c9a96b 100644 --- a/selenium-webdriver/index.d.ts +++ b/selenium-webdriver/index.d.ts @@ -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 { // 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); - /** - * 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. * diff --git a/selenium-webdriver/test/index.ts b/selenium-webdriver/test/index.ts index 9879c42256..929408cbe8 100644 --- a/selenium-webdriver/test/index.ts +++ b/selenium-webdriver/test/index.ts @@ -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((resolve: (value: webdriver.promise.Promise) => void, reject: () => void) => {}); promise = new webdriver.promise.Promise((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) => {});