summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/Worker-replace-global-constructor.any.js
blob: d724c6c8ec6d7254147669524e210d74d9dccd85 (plain)
1
2
3
4
5
6
7
8
9
// META: global=worker
test(() => {
  try {
    self.MessageEvent = 'PASS';
    assert_equals(self.MessageEvent, 'PASS');
  } catch (ex) {
    assert_unreached("FAIL: unexpected exception (" + ex + ") received while replacing global constructor MessageEvent.");
  }
}, 'Test replacing global constructors in a worker context.');