tor-browser

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

iframe.same-origin.https.window.js (1071B)


      1 // META: script=/common/get-host-info.sub.js
      2 // META: script=./resources/checker.js
      3 // META: script=./resources/common.js
      4 // META: timeout=long
      5 'use strict';
      6 
      7 promise_test(async testCase => {
      8  assert_true(self.crossOriginIsolated);
      9 
     10  const {iframes, windows} = await build([
     11    {
     12      id: 'same-origin-1',
     13      children: [
     14        {
     15          id: 'same-origin-2',
     16        }
     17      ],
     18    },
     19  ]);
     20  const result = await performance.measureUserAgentSpecificMemory();
     21  checkMeasureMemory(result, [
     22    {
     23      url: window.location.href,
     24      scope: 'Window',
     25      container: null,
     26    },
     27    {
     28      url: windows['same-origin-1'].location.href,
     29      scope: 'Window',
     30      container: {
     31        id: 'same-origin-1',
     32        src: iframes['same-origin-1'].src,
     33      },
     34    },
     35    {
     36      url: windows['same-origin-2'].location.href,
     37      scope: 'Window',
     38      container: {
     39        id: 'same-origin-2',
     40        src: iframes['same-origin-2'].src,
     41      },
     42    },
     43  ]);
     44 }, 'Well-formed result of performance.measureUserAgentSpecificMemory with same-origin iframes.');