Skip to content

Commit

Permalink
Rewrite self.html as an any.js test.
Browse files Browse the repository at this point in the history
Bonus: this adds coverage for shared and service workers.
  • Loading branch information
Ms2ger committed Feb 25, 2020
1 parent 75053d2 commit 342de36
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 33 deletions.
19 changes: 19 additions & 0 deletions workers/interfaces/WorkerGlobalScope/self.any.js
@@ -0,0 +1,19 @@
// META: global=!default,worker

test(function() {
assert_equals(self, self);
}, 'self === self');

test(function() {
assert_true(self instanceof WorkerGlobalScope);
}, 'self instanceof WorkerGlobalScope');

test(function() {
assert_true('self' in self);
}, '\'self\' in self');

test(function() {
var x = self;
self = 1;
assert_equals(self, x);
}, 'self = 1');
16 changes: 0 additions & 16 deletions workers/interfaces/WorkerGlobalScope/self.html

This file was deleted.

17 changes: 0 additions & 17 deletions workers/interfaces/WorkerGlobalScope/self.js

This file was deleted.

0 comments on commit 342de36

Please sign in to comment.