function isRunningLocally() {
  if (window.location.protocol == 'file:') {
    const testCase = globalThis['G_testRunner'].testCase;
    testCase.saveMessage('Test skipped while running on local file system.');
    return true;
  }
  return false;
}
Tests whether the test was loaded from a file: protocol. Tests that use a
real network request cannot be run from the local file system due to
cross-origin restrictions, but will run if the tests are hosted on a server.
A log message is added to the test case to warn users that the a test was
skipped.

@return {boolean} Whether the test is running on a local file system.