dart-lang / dart-lang/test

Tests which post messages to the window can cause failures

Open
#857 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
536
Forks
232
Avg merge
1d 10h
Merged PRs (30d)
10

Description

The `data` attribute on the message here: https://github.com/dart-lang/test/blob/4940116222e305f99b7504e8a6c7ab5f769aedaa/tool/host.dart#L208 is dynamic and therefore can be any type. If a test is using the message channel it can interfere with the test infrastructure. We should make the messages coming from the test infrastructure easily identifiable.

We likely need to update the logic here along with similar calls:
https://github.com/dart-lang/test/blob/ad35c5c1c47aeb526e62a65d5db5bc285cca0a4f/lib/dart.js#L14

Contributor guide

Open the contributing guide

Research direction

Start by comparing the message handling in tool/host.dart around line 208 with the similar calls in lib/dart.js around line 14. Trace how the test infrastructure posts messages through the window channel, then make those messages identifiable without colliding with arbitrary test data.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.