diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /dom/tests/mochitest/general | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/tests/mochitest/general')
-rw-r--r-- | dom/tests/mochitest/general/test_bug861217.html | 29 | ||||
-rw-r--r-- | dom/tests/mochitest/general/test_interfaces.js | 16 |
2 files changed, 42 insertions, 3 deletions
diff --git a/dom/tests/mochitest/general/test_bug861217.html b/dom/tests/mochitest/general/test_bug861217.html index 1af3f58ff6..b758fe53e4 100644 --- a/dom/tests/mochitest/general/test_bug861217.html +++ b/dom/tests/mochitest/general/test_bug861217.html @@ -48,7 +48,34 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=861217 SimpleTest.waitForExplicitFinish(); /** Test for Bug 861217 **/ -function runTest() { +async function runTest() { + // This test needs to be run on environments where the zoom level == 1, but + // there are a couple of cases it's not run on such kind of environments. + // 1) run this test solely like mach mochitest dom/tests/mochitest/general/test_bug861217.html . + // In this case the zoom level is smaller than 1 since there's no meta viewport. + // 2) run test test along with other tests in the same directory. + // In this case this test runs inside an iframe in the mochitest harness' + // top level document which doesn't have any meta viewport either. + // To avoid these situations we forcibly set the zoom level 1 here. + const resolution = await SpecialPowers.spawn(window.top, [], () => { + return SpecialPowers.getDOMWindowUtils(content.window).getResolution(); + }); + + SimpleTest.registerCleanupFunction(async () => { + await SpecialPowers.spawn(window.top, [resolution], (aResolution) => { + SpecialPowers.getDOMWindowUtils(content.window).setResolutionAndScaleTo(aResolution); + }); + }); + await SpecialPowers.spawn(window.top, [], () => { + SpecialPowers.getDOMWindowUtils(content.window).setResolutionAndScaleTo(1.0); + }); + await SimpleTest.promiseWaitForCondition(async () => { + const resolution = await SpecialPowers.spawn(window.top, [], () => { + return SpecialPowers.getDOMWindowUtils(content.window).getResolution(); + }); + return resolution == 1.0; + }, "Waiting for zoom level 1.0"); + var tableCell1 = document.getElementById("tableCell1"), bcr1 = tableCell1.getBoundingClientRect(), tableCell2 = document.getElementById("tableCell2"), diff --git a/dom/tests/mochitest/general/test_interfaces.js b/dom/tests/mochitest/general/test_interfaces.js index fd15348532..e6ea910e14 100644 --- a/dom/tests/mochitest/general/test_interfaces.js +++ b/dom/tests/mochitest/general/test_interfaces.js @@ -190,6 +190,8 @@ let interfaceNamesInGlobalScope = [ // IMPORTANT: Do not change this list without review from a DOM peer! { name: "AudioDestinationNode", insecureContext: true }, // IMPORTANT: Do not change this list without review from a DOM peer! + { name: "AudioEncoder", nightly: true }, + // IMPORTANT: Do not change this list without review from a DOM peer! { name: "AudioListener", insecureContext: true }, // IMPORTANT: Do not change this list without review from a DOM peer! { name: "AudioNode", insecureContext: true }, @@ -326,6 +328,8 @@ let interfaceNamesInGlobalScope = [ // IMPORTANT: Do not change this list without review from a DOM peer! { name: "CSSRuleList", insecureContext: true }, // IMPORTANT: Do not change this list without review from a DOM peer! + { name: "CSSStartingStyleRule", insecureContext: true, disabled: true }, + // IMPORTANT: Do not change this list without review from a DOM peer! { name: "CSSStyleDeclaration", insecureContext: true }, // IMPORTANT: Do not change this list without review from a DOM peer! { name: "CSSStyleRule", insecureContext: true }, @@ -340,6 +344,8 @@ let interfaceNamesInGlobalScope = [ // IMPORTANT: Do not change this list without review from a DOM peer! { name: "CustomEvent", insecureContext: true }, // IMPORTANT: Do not change this list without review from a DOM peer! + { name: "CustomStateSet", insecureContext: true }, + // IMPORTANT: Do not change this list without review from a DOM peer! { name: "DecompressionStream", insecureContext: true }, // IMPORTANT: Do not change this list without review from a DOM peer! { name: "DataTransfer", insecureContext: true }, @@ -1370,6 +1376,12 @@ let interfaceNamesInGlobalScope = [ // IMPORTANT: Do not change this list without review from a DOM peer! { name: "TextEncoderStream", insecureContext: true }, // IMPORTANT: Do not change this list without review from a DOM peer! + { + name: "TextEvent", + insecureContext: true, + disabled: !SpecialPowers.getBoolPref("dom.events.textevent.enabled"), + }, + // IMPORTANT: Do not change this list without review from a DOM peer! { name: "TextMetrics", insecureContext: true }, // IMPORTANT: Do not change this list without review from a DOM peer! { name: "TextTrack", insecureContext: true }, @@ -1977,9 +1989,9 @@ let interfaceNamesInGlobalScope = [ // IMPORTANT: Do not change this list without review from a DOM peer! { name: "visualViewport", insecureContext: true }, // IMPORTANT: Do not change this list without review from a DOM peer! - { name: "WakeLock", earlyBetaOrEarlier: true }, + { name: "WakeLock" }, // IMPORTANT: Do not change this list without review from a DOM peer! - { name: "WakeLockSentinel", earlyBetaOrEarlier: true }, + { name: "WakeLockSentinel" }, // IMPORTANT: Do not change this list without review from a DOM peer! { name: "webkitURL", insecureContext: true }, // IMPORTANT: Do not change this list without review from a DOM peer! |