Commit 9d9a3228 authored by Henrik Skupin's avatar Henrik Skupin
Browse files

Bug 1809105 - [cdp] Increase TIMEOUT_MULTIPLIER for browser chrome tests for...

Bug 1809105 - [cdp] Increase TIMEOUT_MULTIPLIER for browser chrome tests for debug, ASAN/TSAN, and CCOV builds. r=webdriver-reviewers,Sasha,jdescottes

Depends on D166826

Differential Revision: https://phabricator.services.mozilla.com/D166827
parent 8647837a
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -3,6 +3,9 @@

"use strict";

const { AppConstants } = ChromeUtils.importESModule(
  "resource://gre/modules/AppConstants.sys.mjs"
);
const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");

const { RemoteAgent } = ChromeUtils.importESModule(
@@ -15,9 +18,22 @@ const { TabManager } = ChromeUtils.importESModule(
  "chrome://remote/content/shared/TabManager.sys.mjs"
);

const TIMEOUT_MULTIPLIER = SpecialPowers.isDebugBuild ? 4 : 1;
const TIMEOUT_MULTIPLIER = getTimeoutMultiplier();
const TIMEOUT_EVENTS = 1000 * TIMEOUT_MULTIPLIER;

function getTimeoutMultiplier() {
  if (
    AppConstants.DEBUG ||
    AppConstants.MOZ_CODE_COVERAGE ||
    AppConstants.ASAN ||
    AppConstants.TSAN
  ) {
    return 4;
  }

  return 1;
}

/*
add_task() is overriden to setup and teardown a test environment
making it easier to  write browser-chrome tests for the remote