nested-worker-success.js (446B)
1 importScripts("/resources/testharness.js"); 2 importScripts("test-incrementer.js"); 3 4 promise_test(t => { 5 const worker = new Worker("incrementer-worker.js"); 6 7 return testSharingViaIncrementerScript(t, worker, "parent worker", worker, "sub-worker"); 8 }, "postMessaging to a dedicated sub-worker allows them to see each others' modifications"); 9 10 test(() => { 11 assert_true(self.crossOriginIsolated); 12 }, "Bonus: self.crossOriginIsolated"); 13 14 done();