Skip to content

Commit

Permalink
[JS] Remove unused param in input.js & minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
harsha509 committed Jun 3, 2022
1 parent 34d593f commit 307673b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
17 changes: 13 additions & 4 deletions javascript/node/selenium-webdriver/lib/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,15 @@ class Pointer extends Device {

/**
* @param {!Button=} button The button to press.
* @param width
* @param height
* @param pressure
* @param tangentialPressure
* @param tiltX
* @param tiltY
* @param twist
* @param altitudeAngle
* @param azimuthAngle
* @return {!Action} An action to press the specified button with this device.
* @package
*/
Expand Down Expand Up @@ -448,10 +457,9 @@ Pointer.Type = {

class Wheel extends Device {
/**
* @param {string} id the device ID.
* @param {Pointer.Type} type the pointer type.
* @param {string} id the device ID..
*/
constructor(id, type) {
constructor(id) {
super(Device.Type.WHEEL, id)
}

Expand All @@ -461,6 +469,7 @@ class Wheel extends Device {
* @param {number} y starting y coordinate
* @param {number} deltaX Delta X to scroll to target
* @param {number} deltaY Delta Y to scroll to target
* @param {WebElement} origin element origin
* @param {number} duration duration ratio be the ratio of time delta and duration
* @returns {!Action} An action to scroll with this device.
*/
Expand Down Expand Up @@ -836,7 +845,7 @@ class Actions {
* @param {number} deltax delta x to scroll to target
* @param {number} deltay delta y to scroll to target
* @param {number} duration duration ratio be the ratio of time delta and duration
* @returns {!Action} An action to scroll with this device.
* @returns {!Actions} An action to scroll with this device.
*/
scroll(x, y, targetDeltaX, targetDeltaY, origin, duration) {
return this.insert(
Expand Down
2 changes: 1 addition & 1 deletion javascript/node/selenium-webdriver/lib/test/fileserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const dataDirectory = path.join(__dirname, 'data')
const jsDirectory = resources.locate('javascript')

const Pages = (function () {
var pages = {}
let pages = {}
function addPage(page, path) {
pages.__defineGetter__(page, function () {
return exports.whereIs(path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,19 @@ class Credential {
* @param rpId Relying party identifier.
* @param userHandle userHandle associated to the credential. Must be Base64 encoded string.
* @param privateKey Base64 encoded PKCS
* @param signCount intital value for a signature counter.
* @param signCount initial value for a signature counter.
* @returns A resident credential
*/
createResidentCredential(id, rpId, userHandle, privateKey, signCount) {
return new Credential(id, true, rpId, userHandle, privateKey, signCount)
}

/**
* Creates a non resident (i.e. stateless) credential.
* Creates a non-resident (i.e. stateless) credential.
* @param id Unique base64 encoded string.
* @param rpId Relying party identifier.
* @param privateKey Base64 encoded PKCS
* @param signCount intital value for a signature counter.
* @param signCount initial value for a signature counter.
* @returns A non-resident credential
*/
createNonResidentCredential(id, rpId, privateKey, signCount) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const virtualAuthenticatorOptions =
require('../lib/virtual_authenticator').VirtualAuthenticatorOptions
const { ignore, suite } = require('../lib/test')
const { Browser } = require('../lib/capabilities')
const fileserver = require('../lib/test/fileserver')
const fileServer = require('../lib/test/fileserver')
const invalidArgumentError = require('../lib/error').InvalidArgumentError

const REGISTER_CREDENTIAL =
Expand Down Expand Up @@ -135,7 +135,7 @@ suite(function (env) {

beforeEach(async function () {
driver = await env.builder().build()
await driver.get(fileserver.Pages.virtualAuthenticator)
await driver.get(fileServer.Pages.virtualAuthenticator)
assert.strictEqual(await driver.getTitle(), 'Virtual Authenticator Tests')
})

Expand Down Expand Up @@ -364,7 +364,7 @@ suite(function (env) {
assert.equal(credential2.isResidentCredential(), false)
assert.notEqual(credential2.privateKey(), null)
/**
* Non resident keys do not store raw RP IDs or user handles.
* Non-resident keys do not store raw RP IDs or user handles.
*/
assert.equal(credential2.rpId(), null)
assert.equal(credential2.userHandle(), null)
Expand Down

0 comments on commit 307673b

Please sign in to comment.