blob: 970578e425a314a536d6b40a4420b3731f961ce4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
"use strict";
importScripts("/resources/testharness.js");
test(() => {
assert_true(self.hasOwnProperty("name"), "property exists on the global");
assert_equals(self.name, "my name");
}, `name property value for ${self.constructor.name}`);
test(() => {
self.name = "something new";
const propDesc = Object.getOwnPropertyDescriptor(self, "name");
assert_equals(propDesc.value, "something new", "value");
assert_true(propDesc.configurable, "configurable");
assert_true(propDesc.writable, "writable");
assert_true(propDesc.enumerable, "enumerable");
}, `name property is replaceable for ${self.constructor.name}`);
done();
|