A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/seleniumhq/selenium/commit/b8ede333beecc3b4a543f09cc0b3315c66f2d488 below:

[js] Moving from static to const to make js-dossier happy · SeleniumHQ/selenium@b8ede33 · GitHub

File tree Expand file treeCollapse file tree 6 files changed

+50

-39

lines changed

Filter options

Expand file treeCollapse file tree 6 files changed

+50

-39

lines changed Original file line number Diff line number Diff line change

@@ -116,6 +116,7 @@ function getModules() {

116 116

path.join(__dirname, 'selenium-webdriver/lib/safari'),

117 117

path.join(__dirname, 'selenium-webdriver/lib/test'),

118 118

path.join(__dirname, 'selenium-webdriver/lib/tools'),

119 +

path.join(__dirname, 'selenium-webdriver/devtools/generator'),

119 120

path.join(__dirname, 'selenium-webdriver/node_modules'),

120 121

path.join(__dirname, 'selenium-webdriver/test')

121 122

];

Original file line number Diff line number Diff line change

@@ -17,30 +17,38 @@

17 17 18 18

'use strict'

19 19 20 +

/**

21 +

* Protocol for virtual authenticators

22 +

* @enum {string}

23 +

*/

24 +

const Protocol = {

25 +

'CTAP2': 'ctap2',

26 +

'U2F': 'ctap1/u2f',

27 +

}

28 + 29 +

/**

30 +

* AuthenticatorTransport values

31 +

* @enum {string}

32 +

*/

33 +

const Transport = {

34 +

'BLE': 'ble',

35 +

'USB': 'usb',

36 +

'NFC': 'nfc',

37 +

'INTERNAL': 'internal',

38 +

}

39 + 20 40

/**

21 41

* Options for the creation of virtual authenticators.

22 42

* @see http://w3c.github.io/webauthn/#sctn-automation

23 43

*/

24 44

class VirtualAuthenticatorOptions {

25 45 26 -

static Protocol = {

27 -

"CTAP2": 'ctap2',

28 -

"U2F": 'ctap1/u2f',

29 -

}

30 - 31 -

static Transport = {

32 -

"BLE": 'ble',

33 -

"USB": 'usb',

34 -

"NFC": 'nfc',

35 -

"INTERNAL": 'internal',

36 -

}

37 - 38 46

/**

39 47

* Constructor to initialise VirtualAuthenticatorOptions object.

40 48

*/

41 49

constructor() {

42 -

this._protocol = VirtualAuthenticatorOptions.Protocol["CTAP2"]

43 -

this._transport = VirtualAuthenticatorOptions.Transport["USB"]

50 +

this._protocol = Protocol['CTAP2']

51 +

this._transport = Transport['USB']

44 52

this._hasResidentKey = false

45 53

this._hasUserVerification = false

46 54

this._isUserConsenting = true

@@ -102,8 +110,7 @@ class VirtualAuthenticatorOptions {

102 110

"hasResidentKey": this.getHasResidentKey(),

103 111

"hasUserVerification": this.getHasUserVerification(),

104 112

"isUserConsenting": this.getIsUserConsenting(),

105 -

"isUserVerified": this.getIsUserVerified(),

106 - 113 +

'isUserVerified': this.getIsUserVerified()

107 114

}

108 115

}

109 116

}

@@ -113,14 +120,13 @@ class VirtualAuthenticatorOptions {

113 120

* @see https://w3c.github.io/webauthn/#credential-parameters

114 121

*/

115 122

class Credential {

116 -

constructor(

123 +

constructor (

117 124

credentialId,

118 125

isResidentCredential,

119 126

rpId,

120 127

userHandle,

121 128

privateKey,

122 -

signCount

123 -

) {

129 +

signCount) {

124 130

this._id = credentialId

125 131

this._isResidentCredential = isResidentCredential

126 132

this._rpId = rpId

@@ -224,7 +230,8 @@ class Credential {

224 230

}

225 231

}

226 232 227 -

module.exports = {

228 -

Credential,

229 -

VirtualAuthenticatorOptions,

230 -

}

233 +

module.exports.Credential = Credential

234 +

module.exports.VirtualAuthenticatorOptions = VirtualAuthenticatorOptions

235 +

module.exports.Transport = Transport

236 +

module.exports.Protocol = Protocol

237 + Original file line number Diff line number Diff line change

@@ -1531,7 +1531,7 @@ class WebDriver {

1531 1531 1532 1532

/**

1533 1533

* Adds a virtual authenticator with the given options.

1534 -

* @param options VirtualAuthenticatorOptions object to set authenticator optons.

1534 +

* @param options VirtualAuthenticatorOptions object to set authenticator options.

1535 1535

*/

1536 1536

async addVirtualAuthenticator(options) {

1537 1537

this.authenticatorId_ = await this.execute(

Original file line number Diff line number Diff line change

@@ -20,6 +20,8 @@

20 20

const assert = require('assert')

21 21

const virtualAuthenticatorOptions =

22 22

require('../../lib/virtual_authenticator').VirtualAuthenticatorOptions

23 +

const Transport = require('../../lib/virtual_authenticator').Transport

24 +

const Protocol = require('../../lib/virtual_authenticator').Protocol

23 25 24 26

let options

25 27

@@ -29,34 +31,34 @@ describe('VirtualAuthenticatorOptions', function () {

29 31

})

30 32 31 33

it('can testSetTransport', function () {

32 -

options.setTransport(virtualAuthenticatorOptions.Transport['USB'])

34 +

options.setTransport(Transport['USB'])

33 35

assert.equal(

34 36

options.getTransport(),

35 -

virtualAuthenticatorOptions.Transport['USB']

37 +

Transport['USB']

36 38

)

37 39

})

38 40 39 41

it('can testGetTransport', function () {

40 -

options._transport = virtualAuthenticatorOptions.Transport['NFC']

42 +

options._transport = Transport['NFC']

41 43

assert.equal(

42 44

options.getTransport(),

43 -

virtualAuthenticatorOptions.Transport['NFC']

45 +

Transport['NFC']

44 46

)

45 47

})

46 48 47 49

it('can testSetProtocol', function () {

48 -

options.setProtocol(virtualAuthenticatorOptions.Protocol['U2F'])

50 +

options.setProtocol(Protocol['U2F'])

49 51

assert.equal(

50 52

options.getProtocol(),

51 -

virtualAuthenticatorOptions.Protocol['U2F']

53 +

Protocol['U2F']

52 54

)

53 55

})

54 56 55 57

it('can testGetProtocol', function () {

56 -

options._protocol = virtualAuthenticatorOptions.Protocol['CTAP2']

58 +

options._protocol = Protocol['CTAP2']

57 59

assert.equal(

58 60

options.getProtocol(),

59 -

virtualAuthenticatorOptions.Protocol['CTAP2']

61 +

Protocol['CTAP2']

60 62

)

61 63

})

62 64

@@ -104,11 +106,11 @@ describe('VirtualAuthenticatorOptions', function () {

104 106

let default_options = options.toDict()

105 107

assert.equal(

106 108

default_options['transport'],

107 -

virtualAuthenticatorOptions.Transport['USB']

109 +

Transport['USB']

108 110

)

109 111

assert.equal(

110 112

default_options['protocol'],

111 -

virtualAuthenticatorOptions.Protocol['CTAP2']

113 +

Protocol['CTAP2']

112 114

)

113 115

assert.equal(default_options['hasResidentKey'], false)

114 116

assert.equal(default_options['hasUserVerification'], false)

Original file line number Diff line number Diff line change

@@ -22,6 +22,7 @@ const virtualAuthenticatorCredential =

22 22

require('../lib/virtual_authenticator').Credential

23 23

const virtualAuthenticatorOptions =

24 24

require('../lib/virtual_authenticator').VirtualAuthenticatorOptions

25 +

const Protocol = require('../lib/virtual_authenticator').Protocol

25 26

const { ignore, suite } = require('../lib/test')

26 27

const { Browser } = require('../lib/capabilities')

27 28

const fileServer = require('../lib/test/fileserver')

@@ -37,7 +38,7 @@ const GET_CREDENTIAL = `getCredential([{

37 38

async function createRkEnabledU2fAuthenticator(driver) {

38 39

let options

39 40

options = new virtualAuthenticatorOptions()

40 -

options.setProtocol(virtualAuthenticatorOptions.Protocol['U2F'])

41 +

options.setProtocol(Protocol['U2F'])

41 42

options.setHasResidentKey(true)

42 43

await driver.addVirtualAuthenticator(options)

43 44

return driver

@@ -46,7 +47,7 @@ async function createRkEnabledU2fAuthenticator(driver) {

46 47

async function createRkDisabledU2fAuthenticator(driver) {

47 48

let options

48 49

options = new virtualAuthenticatorOptions()

49 -

options.setProtocol(virtualAuthenticatorOptions.Protocol['U2F'])

50 +

options.setProtocol(Protocol['U2F'])

50 51

options.setHasResidentKey(false)

51 52

await driver.addVirtualAuthenticator(options)

52 53

return driver

@@ -55,7 +56,7 @@ async function createRkDisabledU2fAuthenticator(driver) {

55 56

async function createRkEnabledCTAP2Authenticator(driver) {

56 57

let options

57 58

options = new virtualAuthenticatorOptions()

58 -

options.setProtocol(virtualAuthenticatorOptions.Protocol['CTAP2'])

59 +

options.setProtocol(Protocol['CTAP2'])

59 60

options.setHasResidentKey(true)

60 61

options.setHasUserVerification(true)

61 62

options.setIsUserVerified(true)

@@ -66,7 +67,7 @@ async function createRkEnabledCTAP2Authenticator(driver) {

66 67

async function createRkDisabledCTAP2Authenticator(driver) {

67 68

let options

68 69

options = new virtualAuthenticatorOptions()

69 -

options.setProtocol(virtualAuthenticatorOptions.Protocol['CTAP2'])

70 +

options.setProtocol(Protocol['CTAP2'])

70 71

options.setHasResidentKey(false)

71 72

options.setHasUserVerification(true)

72 73

options.setIsUserVerified(true)

Original file line number Diff line number Diff line change

@@ -88,7 +88,7 @@ function warn(msg) {

88 88

* Extracts the browsers for a test suite to target from the `SELENIUM_BROWSER`

89 89

* environment variable.

90 90

*

91 -

* @return {{name: string, version: string, platform: string}[]} the browsers to target.

91 +

* @return {{name: string, version: string, platform: string}}[] the browsers to target.

92 92

*/

93 93

function getBrowsersToTestFromEnv() {

94 94

let browsers = process.env['SELENIUM_BROWSER']

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4