Closed Bug 1721984 Opened 4 years ago Closed 4 years ago

Intermittent devtools/client/inspector/rules/test/browser_rules_color_scheme_simulation_rdm.js | We're not simulating color-scheme anymore -

Categories

(DevTools :: Inspector: Rules, defect, P5)

defect

Tracking

(firefox-esr78 unaffected, firefox90 unaffected, firefox91 unaffected, firefox92 fixed)

RESOLVED FIXED
92 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox90 --- unaffected
firefox91 --- unaffected
firefox92 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: jdescottes)

References

(Regression)

Details

(Keywords: intermittent-failure, regression)

Attachments

(1 file)

Filed by: smolnar [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=346134345&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/LnanWde9TEawYX2EXsk0Iw/runs/0/artifacts/public/logs/live_backing.log


INFO - TEST-START | devtools/client/inspector/rules/test/browser_rules_color_scheme_simulation_rdm.js
[task 2021-07-23T08:43:43.235Z] 08:43:43     INFO - GECKO(1543) | [Child 1948: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 3 (7f7f8d79d400) [pid = 1948] [serial = 7] [outer = 0] [url = about:blank]
[task 2021-07-23T08:43:43.235Z] 08:43:43     INFO - GECKO(1543) | [Child 1948: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 2 (7f7f8e32d400) [pid = 1948] [serial = 3] [outer = 0] [url = http://example.com/browser/devtools/client/inspector/rules/test/doc_media_queries.html]
[task 2021-07-23T08:43:43.235Z] 08:43:43     INFO - GECKO(1543) | [Child 1948: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7f7f8e322800 == 0 [pid = 1948] [id = 0] [url = http://example.com/browser/devtools/client/inspector/rules/test/doc_media_queries.html]
[task 2021-07-23T08:43:43.451Z] 08:43:43     INFO - GECKO(1543) | [Child 1948: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 1 (7f7fa9064200) [pid = 1948] [serial = 1] [outer = 0] [url = http://example.com/browser/devtools/client/inspector/rules/test/doc_media_queries.html]
[task 2021-07-23T08:43:43.454Z] 08:43:43     INFO - GECKO(1543) | [Child 1948: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 0 (7f7f8d79c000) [pid = 1948] [serial = 5] [outer = 0] [url = http://example.com/browser/devtools/client/inspector/rules/test/doc_media_queries.html]
[task 2021-07-23T08:43:43.456Z] 08:43:43     INFO - GECKO(1543) | [Child 1948, Main Thread] WARNING: Extra shutdown CC: 'i < NORMAL_SHUTDOWN_COLLECTIONS', file /builds/worker/checkouts/gecko/xpcom/base/nsCycleCollector.cpp:3357
[task 2021-07-23T08:43:43.469Z] 08:43:43     INFO - GECKO(1543) | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /tmp/tmp04bsqigg.mozrunner/runtests_leaks_tab_pid2020.log
[task 2021-07-23T08:43:43.471Z] 08:43:43     INFO - GECKO(1543) | [2020, Main Thread] WARNING: XPCOM_MEM_BLOAT_LOG is set, disabling native allocations.: file /builds/worker/checkouts/gecko/tools/profiler/core/platform.cpp:250
[task 2021-07-23T08:43:43.502Z] 08:43:43     INFO - GECKO(1543) | [Child 1948, Main Thread] WARNING: NS_ENSURE_TRUE(Preferences::InitStaticMembers()) failed: file /builds/worker/checkouts/gecko/modules/libpref/Preferences.cpp:4438
[task 2021-07-23T08:43:43.515Z] 08:43:43     INFO - GECKO(1543) | [Child 2020, Main Thread] WARNING: could not set real-time limit in CubebUtils::InitLibrary: file /builds/worker/checkouts/gecko/dom/media/CubebUtils.cpp:619
[task 2021-07-23T08:43:43.527Z] 08:43:43     INFO - GECKO(1543) | [Child 1996: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7f4414b23000 == 0 [pid = 1996] [id = 0] [url = http://example.org/document-builder.sjs?html=%3Cstyle%3Ehtml%20{%20background:%20cyan;}%20@media%20(prefers-color-scheme:%20dark)%20{html%20{background:%20darkred;}}]
[task 2021-07-23T08:43:43.805Z] 08:43:43     INFO - GECKO(1543) | [Child 1996: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 2 (7f442f864200) [pid = 1996] [serial = 1] [outer = 0] [url = http://example.org/document-builder.sjs?html=%3Cstyle%3Ehtml%20{%20background:%20cyan;}%20@media%20(prefers-color-scheme:%20dark)%20{html%20{background:%20darkred;}}]
[task 2021-07-23T08:43:43.809Z] 08:43:43     INFO - GECKO(1543) | [Child 1996: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 1 (7f4414b28400) [pid = 1996] [serial = 2] [outer = 0] [url = about:blank]
[task 2021-07-23T08:43:43.812Z] 08:43:43     INFO - GECKO(1543) | [Child 1996: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 0 (7f4414b2dc00) [pid = 1996] [serial = 3] [outer = 0] [url = http://example.org/document-builder.sjs?html=%3Cstyle%3Ehtml%20{%20background:%20cyan;}%20@media%20(prefers-color-scheme:%20dark)%20{html%20{background:%20darkred;}}]
[task 2021-07-23T08:43:43.814Z] 08:43:43     INFO - GECKO(1543) | [Child 1996, Main Thread] WARNING: Extra shutdown CC: 'i < NORMAL_SHUTDOWN_COLLECTIONS', file /builds/worker/checkouts/gecko/xpcom/base/nsCycleCollector.cpp:3357
[task 2021-07-23T08:43:43.845Z] 08:43:43     INFO - GECKO(1543) | [Child 1996, Main Thread] WARNING: NS_ENSURE_TRUE(Preferences::InitStaticMembers()) failed: file /builds/worker/checkouts/gecko/modules/libpref/Preferences.cpp:4438
[task 2021-07-23T08:43:43.866Z] 08:43:43     INFO - GECKO(1543) | [Child 2020: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 7ff3bdc22800 == 1 [pid = 2020] [id = 0]
<...>
INFO - TEST-PASS | devtools/client/inspector/rules/test/browser_rules_color_scheme_simulation_rdm.js | The button isn't checked anymore - 
[task 2021-07-23T08:43:54.808Z] 08:43:54     INFO - Buffered messages finished
[task 2021-07-23T08:43:54.811Z] 08:43:54     INFO - TEST-UNEXPECTED-FAIL | devtools/client/inspector/rules/test/browser_rules_color_scheme_simulation_rdm.js | We're not simulating color-scheme anymore - 
[task 2021-07-23T08:43:54.811Z] 08:43:54     INFO - Stack trace:
[task 2021-07-23T08:43:54.811Z] 08:43:54     INFO - chrome://mochikit/content/browser-test.js:test_ok:1326
[task 2021-07-23T08:43:54.811Z] 08:43:54     INFO - chrome://mochitests/content/browser/devtools/client/inspector/rules/test/browser_rules_color_scheme_simulation_rdm.js:null:78
[task 2021-07-23T08:43:54.811Z] 08:43:54     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1081
[task 2021-07-23T08:43:54.811Z] 08:43:54     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1121
[task 2021-07-23T08:43:54.812Z] 08:43:54     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:938
[task 2021-07-23T08:43:54.812Z] 08:43:54     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1041
[task 2021-07-23T08:43:54.813Z] 08:43:54     INFO - Check that enabling dark-mode simulation before RDM does work as well
[task 2021-07-23T08:43:54.814Z] 08:43:54     INFO - TEST-PASS | devtools/client/inspector/rules/test/browser_rules_color_scheme_simulation_rdm.js | The rules view was updated with the rule view from the dark scheme media query - 

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

7 failures today.

Flags: needinfo?(jdescottes)

The test fails after we click on the "dark color scheme" button to disable it. We wait for the button to be unchecked and then, as soon as we received a "ruleview-refreshed" refreshed event, we assume the color simulation must have been correctly disabled and we check the styling of the content of the page.

Looking at the callback of the color scheme buttons (https://searchfox.org/mozilla-central/rev/59e797b66f5ce8a27ede0e7677688931be7aed20/devtools/client/inspector/rules/rules.js#1748-1758), it seems fragile. We basically do:

  • uncheck button
  • await disable simulation
  • refresh rule view

So unchecking the button comes first, meaning there's no guarantee that the simulation request has even been sent at that point. But most importantly, nothing guarantees that there is no unrelated "ruleview-refreshed" polluting the test.

For now I cannot reproduce this on my own try pushes or locally (https://treeherder.mozilla.org/jobs?repo=try&revision=533c76c628113a9b8e837be868758791b451c321) but I think we should improve the test and wait for the style to be updated instead of expecting a single event to be received.

Flags: needinfo?(jdescottes)

(In reply to Julian Descottes [:jdescottes] from comment #5)

For now I cannot reproduce this on my own try pushes or locally (https://treeherder.mozilla.org/jobs?repo=try&revision=533c76c628113a9b8e837be868758791b451c321) but I think we should improve the test and wait for the style to be updated instead of expecting a single event to be received.

Actually I see this is a pattern we use everywhere in this test except on this specific assert. Probably just a mistake.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Attachment #9233053 - Attachment description: Bug 1721984 - [devtools] Wait for style update in browser_rules_color_scheme_simulation_rdm.js → Bug 1721984 - [devtools] Wait for style update in browser_rules_color_scheme_simulation*.js
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d109dd43cd82 [devtools] Wait for style update in browser_rules_color_scheme_simulation*.js r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: