Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TaskWorklet tests #16153

Open
guest271314 opened this issue Mar 29, 2019 · 0 comments
Open

Add TaskWorklet tests #16153

guest271314 opened this issue Mar 29, 2019 · 0 comments

Comments

@guest271314
Copy link
Contributor

TaskWorklet (see also https://github.com/developit/task-worklet) has landed in Chromium. Some tests are located at taskqueue and https://github.com/developit/task-worklet/blob/master/test/index.test.js.

The "task" type could be added to https://github.com/web-platform-tests/wpt/blob/master/worklets/resources/worklet-test-utils.js, and the corresponding tests linked above could be added to the wpt worklets directory

// Returns a reference to a worklet object corresponding to a given type.
function get_worklet(type) {
  if (type == 'animation')
    return CSS.animationWorklet;
  if (type == 'layout')
    return CSS.layoutWorklet;
  if (type == 'paint')
    return CSS.paintWorklet;
  if (type == 'audio')
    return new OfflineAudioContext(2,44100*40,44100).audioWorklet;
 if (type == 'task') // add `"task"` type to wpt test
    return taskWorklet;
  return undefined;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants