tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

15.2.3.6-4-412.js (1279B)


      1 // Copyright (c) 2012 Ecma International.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 es5id: 15.2.3.6-4-412
      6 description: >
      7    ES5 Attributes - [[Value]] field of inherited property of
      8    [[Prototype]] internal property is correct(Object.create)
      9 ---*/
     10 
     11 var appointment = {};
     12 
     13 Object.defineProperty(appointment, "startTime", {
     14  value: 1001,
     15  writable: true,
     16  enumerable: true,
     17  configurable: true
     18 });
     19 Object.defineProperty(appointment, "name", {
     20  value: "NAME",
     21  writable: true,
     22  enumerable: true,
     23  configurable: true
     24 });
     25 
     26 var meeting = Object.create(appointment);
     27 Object.defineProperty(meeting, "conferenceCall", {
     28  value: "In-person meeting",
     29  writable: true,
     30  enumerable: true,
     31  configurable: true
     32 });
     33 
     34 var teamMeeting = Object.create(meeting);
     35 
     36 var hasOwnProperty = !teamMeeting.hasOwnProperty("name") &&
     37  !teamMeeting.hasOwnProperty("startTime") &&
     38  !teamMeeting.hasOwnProperty('conferenceCall');
     39 
     40 assert(hasOwnProperty, 'hasOwnProperty !== true');
     41 assert.sameValue(teamMeeting.name, "NAME", 'teamMeeting.name');
     42 assert.sameValue(teamMeeting.startTime, 1001, 'teamMeeting.startTime');
     43 assert.sameValue(teamMeeting.conferenceCall, "In-person meeting", 'teamMeeting.conferenceCall');
     44 
     45 reportCompare(0, 0);