Test warning when running test browser/base/content/test/popups/browser_popup_resize.js after bug 581863
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
| 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?
| Assignee | ||
Updated•1 year ago
|
Comment 1•1 year ago
|
||
Set release status flags based on info from the regressing bug 581863
| Assignee | ||
Comment 2•1 year ago
|
||
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?
| Assignee | ||
Updated•1 year ago
|
Comment 3•1 year ago
|
||
(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.
| Assignee | ||
Comment 4•1 year ago
|
||
This issue got fixed by bug 1946184, and the test passes now with the
stricter version of the check.
Updated•1 year ago
|
| Assignee | ||
Comment 5•1 year ago
|
||
Description
•