Bug 1815689 - Test window.scheduler.constructor.name only when available. r=nchevobbe

Differential Revision: https://phabricator.services.mozilla.com/D169281
This commit is contained in:
Tooru Fujisawa 2023-02-09 06:01:22 +00:00
parent 655b7c72a9
commit ed2a64e98a

View File

@ -609,9 +609,12 @@ async function doEagerEvalDOMGetters(commands) {
["typeof window.windowGlobalChild", "undefined"],
["window.visualViewport.constructor.name", "VisualViewport"],
["typeof window.caches", "undefined"],
["window.scheduler.constructor.name", "Scheduler"],
["window.location.href.startsWith('data:')", true],
];
if (typeof Scheduler === "function") {
// Scheduler is behind a pref.
testData.push(["window.scheduler.constructor.name", "Scheduler"]);
}
for (const [code, expectedResult] of testData) {
const response = await commands.scriptCommand.execute(code, {