Closed Bug 1950911 Opened 1 year ago Closed 1 year ago

Test warning when running test browser/base/content/test/popups/browser_popup_resize.js after bug 581863

Categories

(Core :: Widget: Gtk, defect)

defect

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox135 --- unaffected
firefox136 --- unaffected
firefox137 --- fixed

People

(Reporter: julienw, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

STR:
Run ./mach test browser/base/content/test/popups/browser_popup_resize.js on Linux

I get these warnings:

0:13.13 INFO Console message: [JavaScript Error: "ReferenceError: AppConstants is not defined" {file: "chrome://mochitests/content/browser/browser/base/content/test/popups/head.js" line: 131}]
resizeListener@chrome://mochitests/content/browser/browser/base/content/test/popups/head.js:131:7
EventListener.handleEvent*testPropertyDeltas@chrome://mochitests/content/browser/browser/base/content/test/popups/head.js:158:7
execute@resource://testing-common/SpecialPowersSandbox.sys.mjs:139:12
_spawnTask@resource://testing-common/SpecialPowersChild.sys.mjs:1620:15
receiveMessage@resource://testing-common/SpecialPowersChild.sys.mjs:255:21
JSActor query*receiveMessage@resource://testing-common/SpecialPowersParent.sys.mjs:1384:14
JSActor query*spawn@resource://testing-common/SpecialPowersChild.sys.mjs:1549:17
run@chrome://mochitests/content/browser/browser/base/content/test/popups/head.js:351:25
ResizeMoveTest/<@chrome://mochitests/content/browser/browser/base/content/test/popups/head.js:326:18
async*handleTask@chrome://mochikit/content/browser-test.js:1170:26
_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1242:18
async*Tester_execTest@chrome://mochikit/content/browser-test.js:1383:14
nextTest/<@chrome://mochikit/content/browser-test.js:1159:14
SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13

because AppConstants isn't defined in:
https://searchfox.org/mozilla-central/rev/80ae03d93e3fd5769b16f37719b610e359f8fc62/browser/base/content/test/popups/head.js#130

Strangely this doesn't fail the test?

Flags: needinfo?(emilio.alvarez96)
Flags: needinfo?(emilio.alvarez96) → needinfo?(emilio)

Set release status flags based on info from the regressing bug 581863

Yeah so that is because that function runs in a content task, so we need to import AppConstants.

Indeed, rather weird it doesn't fail the test. Gijs do you know why that might be? Do we have a bug on file to track exceptions in ContentTasks failing mochitests or something?

Flags: needinfo?(emilio) → needinfo?(gijskruitbosch+bugs)
Flags: needinfo?(emilio)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)

Yeah so that is because that function runs in a content task, so we need to import AppConstants.

Indeed, rather weird it doesn't fail the test. Gijs do you know why that might be? Do we have a bug on file to track exceptions in ContentTasks failing mochitests or something?

You mean SpecialPowers.spawn, right? ContentTasks are deprecated.

So, https://searchfox.org/mozilla-central/rev/4bacdbc8ac088f2ee516daf42c535fab2bc24a04/testing/specialpowers/content/SpecialPowersParent.sys.mjs#1383-1392 looks to me like it would reject and the caller would get the promise rejection and that would normally fail the test.

But the error here is not throwing an exception in the spawned run, it's throwing one in an event listener. I guess it's not getting picked up by the uncaught error/rejection stuff as that runs in the parent process.

There are bugs on file to make any errors reported to console fail mochitests (also stuff from try...catch() { console.error }), e.g. bug 1687998, but they do not currently do that.

Flags: needinfo?(gijskruitbosch+bugs)

This issue got fixed by bug 1946184, and the test passes now with the
stricter version of the check.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Depends on: 1946184
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: