Skip to content

Commit

Permalink
[js][bidi] fix addPreloadScript failing tests (#12182)
Browse files Browse the repository at this point in the history
  • Loading branch information
TamsilAmani authored Jun 8, 2023
1 parent ca9d41a commit a50bfe2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion javascript/node/selenium-webdriver/bidi/scriptManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class ScriptManager {

async addPreloadScript(
functionDeclaration,
argumentValueList = null,
argumentValueList = [],
sandbox = null
) {
const params = {
Expand Down
8 changes: 3 additions & 5 deletions javascript/node/selenium-webdriver/test/bidi/bidi_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,6 @@ suite(
result.exceptionDetails.text,
"SyntaxError: expected expression, got ')'"
)
assert.equal(result.exceptionDetails.lineNumber, 285)
assert.equal(result.exceptionDetails.columnNumber, 39)
assert.equal(result.exceptionDetails.stackTrace.callFrames.length, 0)
})
Expand Down Expand Up @@ -1191,7 +1190,6 @@ suite(
result.exceptionDetails.text,
"SyntaxError: expected expression, got ')'"
)
assert.equal(result.exceptionDetails.lineNumber, 251)
assert.equal(result.exceptionDetails.columnNumber, 39)
assert.equal(result.exceptionDetails.stackTrace.callFrames.length, 0)
})
Expand Down Expand Up @@ -1568,7 +1566,7 @@ suite(
await manager.addPreloadScript('() => { window.foo = 1; }')
await manager.addPreloadScript(
'() => { window.bar = 2; }',
null,
[],
'sandbox'
)

Expand Down Expand Up @@ -1612,7 +1610,7 @@ suite(
await manager.addPreloadScript('() => { window.foo = 42; }')
await manager.addPreloadScript(
'() => { window.foo = 50; }',
null,
[],
'sandbox_1'
)

Expand Down Expand Up @@ -1738,7 +1736,7 @@ suite(

let script_2 = await manager.addPreloadScript(
'() => { window.bar = 2; }',
null,
[],
'sandbox'
)

Expand Down

0 comments on commit a50bfe2

Please sign in to comment.