{"size": 1002, "ext": "js", "max_stars_repo_path": "third_party/blink/web_tests/http/tests/inspector-protocol/network/cross-origin-isolation/coop-coep-get-security-isolation-info-service-worker.js", "max_stars_repo_name": "zealoussnow/chromium", "max_stars_repo_stars_event_min_datetime": "2015-01-01T01:57:10.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T23:33:32.000Z", "max_issues_repo_path": "third_party/blink/web_tests/http/tests/inspector-protocol/network/cross-origin-isolation/coop-coep-get-security-isolation-info-service-worker.js", "max_issues_repo_name": "zealoussnow/chromium", "max_issues_repo_issues_event_min_datetime": "2015-05-04T09:58:14.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-31T19:35:03.000Z", "max_forks_repo_path": "third_party/blink/web_tests/http/tests/inspector-protocol/network/cross-origin-isolation/coop-coep-get-security-isolation-info-service-worker.js", "max_forks_repo_name": "zealoussnow/chromium", "max_forks_repo_forks_event_min_datetime": "2015-01-02T11:32:21.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-31T16:35:46.000Z"}
{"max_stars_count": 14668, "max_issues_count": 113, "max_forks_count": 5941, "avg_line_length": 40.08, "max_line_length": 121, "alphanum_fraction": 0.746506986}
(async function(testRunner) {
  var {page, session, dp} = await testRunner.startBlank(
    'Verifies that we can successfully retrieve the security isolation status of a service worker.');
  const swHelper = (await testRunner.loadScript('../../service-worker/resources/service-worker-helper.js'))(dp, session);

  let swdp = null;
  await dp.Target.setAutoAttach(
    {autoAttach: true, waitForDebuggerOnStart: false, flatten: true});
  dp.Target.onAttachedToTarget(async event => {
    swdp = session.createChild(event.params.sessionId).protocol;
  });

  const serviceWorkerURL = '/inspector-protocol/service-worker/resources/blank-service-worker.js';
  await swHelper.installSWAndWaitForActivated(serviceWorkerURL);

  swdp.Network.enable();
  const {result} = await swdp.Network.getSecurityIsolationStatus({frameId: ''});
  testRunner.log(`COEP status`);
  testRunner.log(result.status.coep);
  testRunner.log(`COOP status`);
  testRunner.log(result.status.coop);

  testRunner.completeTest();
});
