| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- //-------------------------------------------------------------------------------------------------------
- // Copyright (C) Microsoft. All rights reserved.
- // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
- //-------------------------------------------------------------------------------------------------------
- var a = {x:20, y:30};
- Object.freeze(a);
- var b = {x:20, y:30};
- Object.freeze(b);
- var c = {x:20, y:30};
- Object.freeze(c);
- WScript.SetTimeout(testFunction, 50);
- /////////////////
- function testFunction()
- {
- a.z = 50;
- try
- {
- Object.defineProperty(a, 'ohai', { value: 17 });
- }
- catch(e)
- {
- telemetryLog(`${e}`, true);
- }
- telemetryLog(`${Object.getOwnPropertyNames(a)}`, true);
- telemetryLog(`${Object.isFrozen(a)}`, true);
- delete b.x;
- telemetryLog(`${Object.getOwnPropertyNames(b)}`, true);
- telemetryLog(`${Object.isFrozen(b)}`, true);
- telemetryLog(`${b.x}`, true);
- a.c = 40;
- a.c = 60;
- telemetryLog(`${Object.getOwnPropertyNames(c)}`, true);
- telemetryLog(`${Object.isFrozen(c)}`, true);
- telemetryLog(`${c.x}`, true);
- emitTTDLog(ttdLogURI);
- }
|