tor-browser

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

emulates-undefined.js (857B)


      1 // Copyright (C) 2020 Alexey Shvayka. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: sec-object.is
      5 description: >
      6  SameValue abstract op doesn't special-case [[IsHTMLDDA]] objects.
      7 info: |
      8  Object.is ( value1, value2 )
      9 
     10  1. Return SameValue(value1, value2).
     11 
     12  SameValue ( x, y )
     13 
     14  1. If Type(x) is different from Type(y), return false.
     15 features: [IsHTMLDDA]
     16 ---*/
     17 
     18 var IsHTMLDDA = $262.IsHTMLDDA;
     19 
     20 assert.sameValue(Object.is(IsHTMLDDA, undefined), false, "SameValue with `undefined`");
     21 assert.sameValue(Object.is(undefined, IsHTMLDDA), false, "SameValue with `undefined`");
     22 
     23 assert.sameValue(Object.is(IsHTMLDDA, null), false, "SameValue with `null`");
     24 assert.sameValue(Object.is(null, IsHTMLDDA), false, "SameValue with `null`");
     25 
     26 assert(Object.is(IsHTMLDDA, IsHTMLDDA));
     27 
     28 reportCompare(0, 0);