mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-28 13:40:17 -10:00
19 lines
636 B
JavaScript
19 lines
636 B
JavaScript
"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();
|