Closed Bug 1860191 Opened 3 years ago Closed 3 years ago

Add some more diagnostics to test_color_scheme_browser.xhtml

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(2 external files)

test_color_scheme_browser.xhtml is intermittently failing in bug 1787008 (though we fixed one category of failure recently).

Let's add a bit more diagnostic logging, and request the complete log (it's pretty short), to help us see how far we get when the test fails.

This is to help orient ourselves when reviewing logs when this test
intermittently times out.

Attachment #9359482 - Attachment description: Bug 1860191: Add some logging to test_color_scheme_browser.xhtml. r?emilio → Bug 1860191 part 1: Add some logging to test_color_scheme_browser.xhtml. 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.

Depends on D191500

Attachment #9359483 - Attachment description: Bug 1860191 part 2: Implement some more callbacks on test_color_scheme_browser.xhtml's progress listener object, as additional diagnostics. r?emilio → Bug 1860191 part 2: Implement some more callbacks on test_color_scheme_browser.xhtml's progress listener, as additional diagnostics. r?emilio

With the attached patches, this test's logging looks like this in a local debug+opt build:

 0:08.03 TEST_START: layout/base/tests/chrome/test_color_scheme_browser.xhtml
 0:09.42 INFO add_task | Entering ensureBrowsersLoaded
 0:09.43 INFO Entering ensureBrowsersLoaded callback
 0:09.43 INFO Entering 'loaded' callback; about to add progress listener
 0:09.43 INFO Calling b.loadURI for dynamic-test
 0:09.43 INFO Got state change for dynamic-test: 983041, 0
 0:09.44 INFO Got location change for dynamic-test: [xpconnect wrapped nsIURI @ 0x7fadb9779820 (native @ 0x7fadb97880b0)], 0
 0:09.44 INFO Got security change for dynamic-test: 4
 0:09.45 INFO Got state change for dynamic-test: 786448, 0
 0:09.45 INFO Entering 'loaded' callback; about to add progress listener
 0:09.45 INFO Calling b.loadURI for light
 0:09.46 INFO Got state change for light: 983041, 0
 0:09.46 INFO Got location change for light: [xpconnect wrapped nsIURI @ 0x7fadb97a6ac0 (native @ 0x7fadba39d920)], 0
 0:09.46 INFO Got security change for light: 4
 0:09.47 INFO Got state change for light: 786448, 0
 0:09.47 INFO Entering 'loaded' callback; about to add progress listener
 0:09.47 INFO Calling b.loadURI for dark
 0:09.47 INFO Got state change for dark: 983041, 0
 0:09.48 INFO Got location change for dark: [xpconnect wrapped nsIURI @ 0x7fadb9d282e0 (native @ 0x7fadba641530)], 0
 0:09.48 INFO Got security change for dark: 4
 0:09.49 INFO Got state change for dark: 786448, 0
 0:09.49 INFO add_task | Leaving ensureBrowsersLoaded
 0:09.49 INFO add_task | Entering test_browser_color_scheme
 0:09.54 PASS dynamic-test: remote should be light
 0:09.60 PASS dynamic-test: nonremote should be light
 0:09.65 PASS light: remote should be light
 0:09.71 PASS light: nonremote should be light
 0:09.76 PASS dark: remote should be dark
 0:09.81 PASS dark: nonremote should be dark
 0:09.81 INFO add_task | Leaving test_browser_color_scheme
 0:09.81 INFO add_task | Entering test_browser_color_scheme_dynamic_style
 0:09.82 PASS dynamic-test: remote should be light
 0:09.83 PASS dynamic-test: nonremote should be light
 0:09.85 PASS dynamic-test: remote should be dark
 0:09.85 PASS dynamic-test: nonremote should be dark
 0:09.89 INFO add_task | Leaving test_browser_color_scheme_dynamic_style
 0:09.89 INFO add_task | Entering test_browser_color_scheme_dynamic_system
 0:10.04 PASS dynamic-test: remote should be dark
 0:10.04 PASS dynamic-test: nonremote should be dark
 0:10.54 PASS dynamic-test: remote should be light
 0:10.55 PASS dynamic-test: nonremote should be light
 0:10.73 INFO add_task | Leaving test_browser_color_scheme_dynamic_system
 0:10.75 TEST_END: Test OK. Subtests passed 14/14. Unexpected 0

(I know the add_task | Entering ensureBrowsersLoaded / Entering ensureBrowsersLoaded callback lines are kind of redundant. I'm including it anyway since the first line comes from an external JS file, not from this test itself, and we might as well be paranoid and err on the side of "really-truly-got-here" verbosity to see how far we get in the code, within the test itself.)

I noticed the [xpconnect wrapped nsIURI ...] junk in comment 3 and updated the aLocation logging to output aLocation.spec instead. So now those ones look like this instead. (The location is always about:blank which I think is as-expected.)

 0:11.26 INFO Got location change for dark: about:blank, 0
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2f6dcc7467f1 part 1: Add some logging to test_color_scheme_browser.xhtml. r=emilio https://hg.mozilla.org/integration/autoland/rev/dfa7f17930eb part 2: Implement some more callbacks on test_color_scheme_browser.xhtml's progress listener, as additional diagnostics. r=emilio
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: