message: abort the test case if the playing window was closed prematurely
diff: @@ -21,6 +21,7 @@ import Debugger, { convertLocator } from '../debugger'
  import PlaybackState from '../../stores/view/PlaybackState'
  import variables from '../../stores/view/Variables'
  import { absolutifyUrl } from '../playback/utils'
  +import { Logger, Channels } from '../../stores/view/Logs'
  import './bootstrap'
  const parsedUA = parser(window.navigator.userAgent)
  @@ -37,10 +38,10 @@ export default class ExtCommand {
  this.waitTimes = 60
  this.attached = false
  + this.logger = new Logger(Channels.PLAYBACK)
  // Use ES6 arrow function to bind correct this
  this.tabsOnUpdatedHandler = (tabId, changeInfo, _tabInfo) => {
  - // eslint-disable-line no-unused-vars
  if (changeInfo.status) {
  if (changeInfo.status == 'loading') {
  this.setLoading(tabId)
  @@ -50,6 +51,13 @@ export default class ExtCommand {
  }
  }
  + this.tabsOnRemovedHandler = (tabId, _removeInfo) => {
  + if (this.tabBelongsToPlayback(tabId)) {
  + this.logger.error('Playing window was closed prematurely')
  + PlaybackState.abortPlaying()
  + }
  + }
  +
  this.frameLocationMessageHandler = (message, sender, sendResponse) => {
  if (message.frameLocation) {
  this.setFrame(sender.tab.id, message.frameLocation, sender.frameId)
  @@ -92,6 +100,7 @@ export default class ExtCommand {
  }
  this.attached = true
  browser.tabs.onUpdated.addListener(this.tabsOnUpdatedHandler)
  + browser.tabs.onRemoved.addListener(this.tabsOnRemovedHandler)
  browser.runtime.onMessage.addListener(this.frameLocationMessageHandler)
  browser.webNavigation.onCreatedNavigationTarget.addListener(
  this.newTabHandler
  