Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.
This repository was archived by the owner on Jan 8, 2025. It is now read-only.

any postMessage to TestSwarm kills the test iframe #272

Open
@jsgoupil

Description

@jsgoupil

Our tests use some parent.postMessage which usually points to ourselves (since we are the topmost)
However, in an iFrame scenario, that postMessage will post to TestSwarm. In this case, TestSwarm is configured to send anything to the server; on success, it kills the iFrame.
This causes the test to never resolve as it never posts its result back.

I agree my test should not post to a parent that it is not aware of, but at least, my test could fail instead of silently be stopped.

A mechanism should be in place to listen to a specific set of message such as
__TESTSWARM__restOfMessage
When run.js reads the message, if the first bytes don't start with that string constant, you could ignore the message.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions