Skip to content

Commit 307673b

Browse files
committed
[JS] Remove unused param in input.js & minor code cleanup
1 parent 34d593f commit 307673b

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

javascript/node/selenium-webdriver/lib/input.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,15 @@ class Pointer extends Device {
346346

347347
/**
348348
* @param {!Button=} button The button to press.
349+
* @param width
350+
* @param height
351+
* @param pressure
352+
* @param tangentialPressure
353+
* @param tiltX
354+
* @param tiltY
355+
* @param twist
356+
* @param altitudeAngle
357+
* @param azimuthAngle
349358
* @return {!Action} An action to press the specified button with this device.
350359
* @package
351360
*/
@@ -448,10 +457,9 @@ Pointer.Type = {
448457

449458
class Wheel extends Device {
450459
/**
451-
* @param {string} id the device ID.
452-
* @param {Pointer.Type} type the pointer type.
460+
* @param {string} id the device ID..
453461
*/
454-
constructor(id, type) {
462+
constructor(id) {
455463
super(Device.Type.WHEEL, id)
456464
}
457465

@@ -461,6 +469,7 @@ class Wheel extends Device {
461469
* @param {number} y starting y coordinate
462470
* @param {number} deltaX Delta X to scroll to target
463471
* @param {number} deltaY Delta Y to scroll to target
472+
* @param {WebElement} origin element origin
464473
* @param {number} duration duration ratio be the ratio of time delta and duration
465474
* @returns {!Action} An action to scroll with this device.
466475
*/
@@ -836,7 +845,7 @@ class Actions {
836845
* @param {number} deltax delta x to scroll to target
837846
* @param {number} deltay delta y to scroll to target
838847
* @param {number} duration duration ratio be the ratio of time delta and duration
839-
* @returns {!Action} An action to scroll with this device.
848+
* @returns {!Actions} An action to scroll with this device.
840849
*/
841850
scroll(x, y, targetDeltaX, targetDeltaY, origin, duration) {
842851
return this.insert(

javascript/node/selenium-webdriver/lib/test/fileserver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const dataDirectory = path.join(__dirname, 'data')
3737
const jsDirectory = resources.locate('javascript')
3838

3939
const Pages = (function () {
40-
var pages = {}
40+
let pages = {}
4141
function addPage(page, path) {
4242
pages.__defineGetter__(page, function () {
4343
return exports.whereIs(path)

javascript/node/selenium-webdriver/lib/virtual_authenticator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,19 +162,19 @@ class Credential {
162162
* @param rpId Relying party identifier.
163163
* @param userHandle userHandle associated to the credential. Must be Base64 encoded string.
164164
* @param privateKey Base64 encoded PKCS
165-
* @param signCount intital value for a signature counter.
165+
* @param signCount initial value for a signature counter.
166166
* @returns A resident credential
167167
*/
168168
createResidentCredential(id, rpId, userHandle, privateKey, signCount) {
169169
return new Credential(id, true, rpId, userHandle, privateKey, signCount)
170170
}
171171

172172
/**
173-
* Creates a non resident (i.e. stateless) credential.
173+
* Creates a non-resident (i.e. stateless) credential.
174174
* @param id Unique base64 encoded string.
175175
* @param rpId Relying party identifier.
176176
* @param privateKey Base64 encoded PKCS
177-
* @param signCount intital value for a signature counter.
177+
* @param signCount initial value for a signature counter.
178178
* @returns A non-resident credential
179179
*/
180180
createNonResidentCredential(id, rpId, privateKey, signCount) {

javascript/node/selenium-webdriver/test/virtualAuthenticator_test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const virtualAuthenticatorOptions =
2424
require('../lib/virtual_authenticator').VirtualAuthenticatorOptions
2525
const { ignore, suite } = require('../lib/test')
2626
const { Browser } = require('../lib/capabilities')
27-
const fileserver = require('../lib/test/fileserver')
27+
const fileServer = require('../lib/test/fileserver')
2828
const invalidArgumentError = require('../lib/error').InvalidArgumentError
2929

3030
const REGISTER_CREDENTIAL =
@@ -135,7 +135,7 @@ suite(function (env) {
135135

136136
beforeEach(async function () {
137137
driver = await env.builder().build()
138-
await driver.get(fileserver.Pages.virtualAuthenticator)
138+
await driver.get(fileServer.Pages.virtualAuthenticator)
139139
assert.strictEqual(await driver.getTitle(), 'Virtual Authenticator Tests')
140140
})
141141

@@ -364,7 +364,7 @@ suite(function (env) {
364364
assert.equal(credential2.isResidentCredential(), false)
365365
assert.notEqual(credential2.privateKey(), null)
366366
/**
367-
* Non resident keys do not store raw RP IDs or user handles.
367+
* Non-resident keys do not store raw RP IDs or user handles.
368368
*/
369369
assert.equal(credential2.rpId(), null)
370370
assert.equal(credential2.userHandle(), null)

0 commit comments

Comments
 (0)