Skip to content

Commit

Permalink
[js] Running format script
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Apr 2, 2024
1 parent a169d90 commit a663d28
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
15 changes: 5 additions & 10 deletions javascript/node/selenium-webdriver/bidi/browsingContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,11 @@ class BrowsingContext {
throw Error(result['error'])
}

const contexts = result['result']['contexts'];
const browsingContexts = contexts.map(context => {
return new BrowsingContextInfo(
context['id'],
context['url'],
context['children'],
context['parent']
);
});
return browsingContexts;
const contexts = result['result']['contexts']
const browsingContexts = contexts.map((context) => {
return new BrowsingContextInfo(context['id'], context['url'], context['children'], context['parent'])
})
return browsingContexts
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,18 +447,18 @@ suite(

const devicePixelRatio = await driver.executeScript('return window.devicePixelRatio;')
assert.equal(devicePixelRatio, 5)
});
})

it('Get All Top level browsing contexts', async ()=> {
it('Get All Top level browsing contexts', async () => {
const id = await driver.getWindowHandle()
const window1 = await BrowsingContext(driver, {
browsingContextId: id,
});
const window2 = await BrowsingContext(driver, {type: 'window'});
})
const window2 = await BrowsingContext(driver, { type: 'window' })

const res = await window1.getTopLevelContexts();
assert.equal(res.length, 2);
});
const res = await window1.getTopLevelContexts()
assert.equal(res.length, 2)
})
})
},
{ browsers: [Browser.FIREFOX] },
Expand Down

0 comments on commit a663d28

Please sign in to comment.