summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/nested-worker-success.js
blob: ffc3708acb7ae00339efbde8c9d912b1f58e7e50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
importScripts("/resources/testharness.js");
importScripts("test-incrementer.js");

promise_test(t => {
  const worker = new Worker("incrementer-worker.js");

  return testSharingViaIncrementerScript(t, worker, "parent worker", worker, "sub-worker");
}, "postMessaging to a dedicated sub-worker allows them to see each others' modifications");

test(() => {
  assert_true(self.crossOriginIsolated);
}, "Bonus: self.crossOriginIsolated");

done();