From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../baselinecoverage/browser_chrome/browser.ini | 6 +++++ .../browser_chrome/browser_baselinecoverage.js | 15 ++++++++++++ .../browser_baselinecoverage_browser-chrome.js | 27 ++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 testing/mochitest/baselinecoverage/browser_chrome/browser.ini create mode 100644 testing/mochitest/baselinecoverage/browser_chrome/browser_baselinecoverage.js create mode 100644 testing/mochitest/baselinecoverage/browser_chrome/browser_baselinecoverage_browser-chrome.js (limited to 'testing/mochitest/baselinecoverage/browser_chrome') diff --git a/testing/mochitest/baselinecoverage/browser_chrome/browser.ini b/testing/mochitest/baselinecoverage/browser_chrome/browser.ini new file mode 100644 index 0000000000..f5a3f685ef --- /dev/null +++ b/testing/mochitest/baselinecoverage/browser_chrome/browser.ini @@ -0,0 +1,6 @@ +[DEFAULT] + +[browser_baselinecoverage.js] +run-if = ccov && verify +[browser_baselinecoverage_browser-chrome.js] +run-if = ccov && verify \ No newline at end of file diff --git a/testing/mochitest/baselinecoverage/browser_chrome/browser_baselinecoverage.js b/testing/mochitest/baselinecoverage/browser_chrome/browser_baselinecoverage.js new file mode 100644 index 0000000000..379dc6aac3 --- /dev/null +++ b/testing/mochitest/baselinecoverage/browser_chrome/browser_baselinecoverage.js @@ -0,0 +1,15 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ +/* eslint-disable mozilla/no-arbitrary-setTimeout */ + +"use strict"; + +const { setTimeout } = ChromeUtils.importESModule( + "resource://gre/modules/Timer.sys.mjs" +); + +add_task(async function() { + requestLongerTimeout(2); + ok(true, "Collecting baseline coverage for javascript (.js) file types."); + await new Promise(c => setTimeout(c, 30 * 1000)); +}); diff --git a/testing/mochitest/baselinecoverage/browser_chrome/browser_baselinecoverage_browser-chrome.js b/testing/mochitest/baselinecoverage/browser_chrome/browser_baselinecoverage_browser-chrome.js new file mode 100644 index 0000000000..4914e38e7a --- /dev/null +++ b/testing/mochitest/baselinecoverage/browser_chrome/browser_baselinecoverage_browser-chrome.js @@ -0,0 +1,27 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ +/* eslint-disable mozilla/no-arbitrary-setTimeout */ + +"use strict"; + +const { setTimeout } = ChromeUtils.importESModule( + "resource://gre/modules/Timer.sys.mjs" +); + +add_task(async function() { + requestLongerTimeout(2); + let newWin = await BrowserTestUtils.openNewBrowserWindow(); + + await BrowserTestUtils.withNewTab( + { + gBrowser, + url: "about:blank", + }, + async function(browser) { + ok(true, "Collecting baseline coverage for browser-chrome tests."); + await new Promise(c => setTimeout(c, 30 * 1000)); + } + ); + + await BrowserTestUtils.closeWindow(newWin); +}); -- cgit v1.2.3