{"size": 666, "ext": "js", "max_stars_repo_path": "chrome/test/data/extensions/api_test/isolated_world_csp/mv2/remote_script.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": "chrome/test/data/extensions/api_test/isolated_world_csp/mv2/remote_script.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": "chrome/test/data/extensions/api_test/isolated_world_csp/mv2/remote_script.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": 33.3, "max_line_length": 73, "alphanum_fraction": 0.6621621622}
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

chrome.test.getConfig(config => {
  chrome.test.runTests([function testRemoteScript() {
    let port = config.testServer.port;
    let script = document.createElement('script');
    script.src = `http://google.com:${port}/script.js`;
    script.onload = () => {
      chrome.test.assertEq('New Title', document.title);
      chrome.test.succeed();
    };
    script.onerror = () => {
      chrome.test.fail('Script load failed unexpectedly');
    };
    document.body.appendChild(script);
  }]);
});
