Bug 1860191 part 2: Implement some more callbacks on test_color_scheme_browser.xhtml's progress listener, as additional diagnostics. r=emilio

This is just extending our existing progress-listener object that we use
functionally in the test, to implement a few more of the nsIWebProgressListener
callbacks so we can see if they're firing in some unforeseen way that can help
us identify why the test is intermittently timing out.

I'm just cribbing the full list of callbacks from
https://searchfox.org/mozilla-central/source/uriloader/base/nsIWebProgressListener.idl
without worrying too much about their applicability here.

Differential Revision: https://phabricator.services.mozilla.com/D191501
This commit is contained in:
Daniel Holbert 2023-10-20 14:03:45 +00:00
Родитель c2d9bf74e4
Коммит ffe9173bb8
1 изменённых файлов: 21 добавлений и 0 удалений

Просмотреть файл

@ -45,6 +45,27 @@
b.removeProgressListener(this);
}
},
// Note: the following "onFoo" callbacks are only here for
// diagnostic purposes, and otherwise aren't relevant to the test.
onProgressChange(aWebProgress, aRequest,
aCurSelfProgress, aMaxSelfProgress,
aCurTotalProgress, aMaxTotalProgress) {
info(`Got progress change for ${b.parentNode.id}: ` +
`${aCurSelfProgress}/${aMaxSelfProgress}, ` +
`${aCurTotalProgress}/${aMaxTotalProgress}`);
},
onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
info(`Got location change for ${b.parentNode.id}: ${aLocation.spec}, ${aFlags}`);
},
onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
info(`Got status change for ${b.parentNode.id}: ${aStatus}, ${aMessage}`);
},
onSecurityChange(aWebProgress, aRequest, aState) {
info(`Got security change for ${b.parentNode.id}: ${aState}`);
},
onContentBlockingEvent(aWebProgress, aRequest, aEvent) {
info(`Got content blocking event for ${b.parentNode.id}: ${aEvent}`);
},
QueryInterface: ChromeUtils.generateQI([
"nsIWebProgressListener",
"nsISupportsWeakReference",