Global Metrics

path: .metrics.halstead.length
old: 160.0
new: 161.0

path: .metrics.halstead.volume
old: 920.782000346155
new: 926.5368878483184

path: .metrics.halstead.effort
old: 11437.081688510136
new: 11703.623846505076

path: .metrics.halstead.purity_ratio
old: 1.6463827844428516
new: 1.636156804415256

path: .metrics.halstead.difficulty
old: 12.421052631578949
new: 12.63157894736842

path: .metrics.halstead.N2
old: 59.0
new: 60.0

path: .metrics.halstead.bugs
old: 0.1692085201646007
new: 0.17182735914894523

path: .metrics.halstead.time
old: 635.393427139452
new: 650.2013248058375

path: .metrics.halstead.level
old: 0.0805084745762712
new: 0.07916666666666666

path: .metrics.mi.mi_visual_studio
old: 39.05266445831255
new: 39.03371775731645

path: .metrics.mi.mi_original
old: 66.78005622371445
new: 66.74765736501114

path: .metrics.mi.mi_sei
old: 21.355142968057493
new: 21.30840129527576

Spaces Data

Minimal test - lines (3, 63)

path: .spaces[0].metrics.halstead.effort
old: 11336.274452809916
new: 11608.62879489888

path: .spaces[0].metrics.halstead.length
old: 157.0
new: 158.0

path: .spaces[0].metrics.halstead.N2
old: 57.0
new: 58.0

path: .spaces[0].metrics.halstead.level
old: 0.07894736842105264
new: 0.07758620689655173

path: .spaces[0].metrics.halstead.bugs
old: 0.16821277667632129
new: 0.17089631361410734

path: .spaces[0].metrics.halstead.difficulty
old: 12.666666666666666
new: 12.88888888888889

path: .spaces[0].metrics.halstead.purity_ratio
old: 1.593103821986772
new: 1.5830208864045774

path: .spaces[0].metrics.halstead.time
old: 629.7930251561065
new: 644.9238219388267

path: .spaces[0].metrics.halstead.volume
old: 894.9690357481514
new: 900.6694754662925

path: .spaces[0].metrics.mi.mi_visual_studio
old: 39.57926314181774
new: 39.559955548876786

path: .spaces[0].metrics.mi.mi_original
old: 67.68053997250834
new: 67.64752398857931

path: .spaces[0].metrics.mi.mi_sei
old: 22.552446547439047
new: 22.504814551154595

Code

add_task(async () => {
  function httpURL(filename, host = "https://example.com/") {
    let root = getRootDirectory(gTestPath).replace(
      "chrome://mochitests/content/",
      host
    );
    return root + filename;
  }

  await SpecialPowers.pushPrefEnv({
    set: [
      ["apz.allow_zooming", true],
      ["dom.meta-viewport.enabled", true],
      ["dom.visualviewport.enabled", true],
    ],
  });

  const fissionWindow = await BrowserTestUtils.openNewBrowserWindow({
    fission: true,
  });
  const url = httpURL(
    "test_visual_viewport_in_oopif.html",
    "http://mochi.test:8888/"
  );
  const crossOriginIframeUrl = httpURL("visual_viewport_in_child.html");

  try {
    await BrowserTestUtils.withNewTab(
      { gBrowser: fissionWindow.gBrowser, url },
      async browser => {
        await SpecialPowers.spawn(
          browser,
          [crossOriginIframeUrl],
          async iframeUrl => {
            const iframe = content.document.getElementById("iframe");
            iframe.setAttribute("src", iframeUrl);

            let { width, height } = await new Promise(resolve => {
              content.window.addEventListener("message", msg => {
                resolve(msg.data);
              });
            });

            is(
              width,
              300,
              "visualViewport.width shouldn't be affected in out-of-process iframes"
            );
            is(
              height,
              300,
              "visualViewport.height shouldn't be affected in out-of-process iframes"
            );
          }
        );
      }
    );
  } finally {
    await BrowserTestUtils.closeWindow(fissionWindow);
  }
});

Minimal test - lines (4, 10)

path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: 91.70180584575286
new: 91.36832809117035

path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 67.81526558480543
new: 67.68009063429763

path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 115.96410415001728
new: 115.73295498464891

path: .spaces[0].spaces[0].metrics.halstead.N2
old: 10.0
new: 11.0

path: .spaces[0].spaces[0].metrics.halstead.length
old: 22.0
new: 23.0

path: .spaces[0].spaces[0].metrics.halstead.effort
old: 440.0
new: 506.0

path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 2.1818181818181817
new: 2.0869565217391304

path: .spaces[0].spaces[0].metrics.halstead.time
old: 24.444444444444443
new: 28.11111111111111

path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.019283263225081497
new: 0.02116633943873121

path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.2
new: 0.18181818181818185

path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 5.0
new: 5.5

path: .spaces[0].spaces[0].metrics.halstead.volume
old: 88.0
new: 92.0

Code

  function httpURL(filename, host = "https://example.com/") {
    let root = getRootDirectory(gTestPath).replace(
      "chrome://mochitests/content/",
      host
    );
    return root + filename;
  }