{"size": 724, "ext": "js", "max_stars_repo_path": "B2G/gecko/browser/components/tabview/test/browser_tabview_bug587043.js", "max_stars_repo_name": "wilebeast/FireFox-OS", "max_stars_repo_stars_event_min_datetime": "2015-08-31T15:24:31.000Z", "max_stars_repo_stars_event_max_datetime": "2020-04-24T20:31:29.000Z", "max_issues_repo_path": "B2G/gecko/browser/components/tabview/test/browser_tabview_bug587043.js", "max_issues_repo_name": "wilebeast/FireFox-OS", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "B2G/gecko/browser/components/tabview/test/browser_tabview_bug587043.js", "max_forks_repo_name": "wilebeast/FireFox-OS", "max_forks_repo_forks_event_min_datetime": "2015-07-29T07:17:15.000Z", "max_forks_repo_forks_event_max_datetime": "2020-11-04T06:55:37.000Z"}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": 3, "avg_line_length": 28.96, "max_line_length": 75, "alphanum_fraction": 0.7403314917}
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */

function test() {
  waitForExplicitFinish();

  window.addEventListener("tabviewshown", onTabViewWindowLoaded, false);
  TabView.toggle();
}

function onTabViewWindowLoaded() {
  window.removeEventListener("tabviewshown", onTabViewWindowLoaded, false);

  ok(TabView.isVisible(), "Tab View is visible");

  let onTabViewHidden = function() {
    window.removeEventListener("tabviewhidden", onTabViewHidden, false);
    ok(!TabView.isVisible(), "Tab View is hidden");

    finish();
  };
  window.addEventListener("tabviewhidden", onTabViewHidden, false);
  document.getElementById("cmd_closeWindow").doCommand();
}
