tor-browser

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

default-property-not-set-own.js (1299B)


      1 // |reftest| async
      2 // Copyright (C) 2018 Leo Balter. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 description: The default property is not set the if the module doesn't export any default
      7 esid: sec-finishdynamicimport
      8 features: [dynamic-import]
      9 flags: [async]
     10 info: |
     11    Runtime Semantics: FinishDynamicImport ( referencingScriptOrModule, specifier, promiseCapability, completion )
     12 
     13        1. If completion is an abrupt completion, ...
     14        2. Otherwise,
     15            ...
     16            d. Let namespace be GetModuleNamespace(moduleRecord).
     17            e. If namespace is an abrupt completion, perform ! Call(promiseCapability.[[Reject]], undefined, « namespace.[[Value]] »).
     18            f. Otherwise, perform ! Call(promiseCapability.[[Resolve]], undefined, « namespace.[[Value]] »).
     19 
     20    Runtime Semantics: GetModuleNamespace ( module )
     21 
     22        ...
     23        3. Let namespace be module.[[Namespace]].
     24        4. If namespace is undefined, then
     25            ...
     26            d. Set namespace to ModuleNamespaceCreate(module, unambiguousNames).
     27        5. Return namespace.
     28 ---*/
     29 
     30 import('./empty_FIXTURE.js').then(ns => {
     31 
     32    assert.sameValue(Object.prototype.hasOwnProperty.call(ns, 'default'), false);
     33 
     34 }).then($DONE, $DONE).catch($DONE);