Skip to content

Add test for websocket origin in a worker #9535

Closed

Description

@Manishearth

We should add a .worker.js test that ensures that a websocket's origin is correctly set when used from a worker.

.worker.js tests are automatically run in a worker context. and look like this

We already have https://github.com/Manishearth/servo/blob/ws-worker/tests/wpt/web-platform-tests/websockets/opening-handshake/003.html to test the origin; we need to write a similar test in a .worker.js context (use importScript instead of script tags, call done() when the test is over)

Be sure to add it to the manifest like so. The test can be run with ./mach test-wpt /websockets/name-of-test.worker.

Activity

  1. added
    E-less-complex
    C-needs-test
    on Feb 4, 2016
  2. Manishearth commented on Feb 23, 2016

    @Manishearth
    MemberAuthor

    Yeah, so the former is an example of a test which tests the websocket's origin, the latter is an example of a .worker.js test which runs from a worker (but doesn't test the origin). This issue is asking for a test that does both -- runs a websocket in a worker scope and checks that the origin is correctly set.

  3. g-k commented on Feb 24, 2016

    @g-k
    Contributor

    Gotcha, I can pick this up if no one else is working on it.

  4. added
    C-assigned
    on Feb 24, 2016
  5. added a commit that references this issue on Mar 14, 2016
    6895dab
  6. added a commit that references this issue on Mar 15, 2016
  7. added a commit that references this issue on Jun 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-assignedC-needs-testE-less-complex

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions