Skip to content

Commit

Permalink
chore: remove sharedId check (#11328)
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Nov 9, 2023
1 parent f7cf05c commit 2da4915
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
3 changes: 1 addition & 2 deletions packages/puppeteer-core/src/bidi/Serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ export class BidiSerializer {
if (objectHandle) {
if (
objectHandle.realm.environment.context() !==
sandbox.environment.context() &&
!('sharedId' in objectHandle.remoteValue())
sandbox.environment.context()
) {
throw new Error(
'JSHandles can be evaluated only in the context they were created!'
Expand Down
18 changes: 12 additions & 6 deletions test/TestExpectations.json
Original file line number Diff line number Diff line change
Expand Up @@ -551,12 +551,6 @@
"parameters": ["cdp"],
"expectations": ["FAIL"]
},
{
"testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should throw if elementHandles are from other frames",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["FAIL"]
},
{
"testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluateOnNewDocument *",
"platforms": ["darwin", "linux", "win32"],
Expand Down Expand Up @@ -1769,6 +1763,18 @@
"parameters": ["cdp", "firefox"],
"expectations": ["SKIP"]
},
{
"testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should throw if elementHandles are from other frames",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["FAIL"]
},
{
"testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should throw if elementHandles are from other frames",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["chrome", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should throw when evaluation triggers reload",
"platforms": ["darwin", "linux", "win32"],
Expand Down

0 comments on commit 2da4915

Please sign in to comment.