Closed Bug 1790138 Opened 2 years ago Closed 1 year ago

overscroll-behavior.html passes its assertion messages to the wrong function, so they're dropped & don't show up in logs

Categories

(Core :: Panning and Zooming, defect, P3)

defect

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: dholbert, Assigned: collier.group01, Mentored)

Details

(Keywords: good-first-bug, Whiteboard: [lang=js], [wptsync upstream])

Attachments

(3 files)

WPT test css/css-overscroll-behavior/overscroll-behavior.html uses an async testharness.js test, and passes in some helpful messages for each section in the test.step section, but it does so improperly such that the messages don't show up.

The test logging is like this:

var test = async_test("overscroll-behavior prevents scroll-propagation in the area and direction as specified");
[...]
  test.step(function() {
    assert_equals(root.scrollTop, 100);
    assert_equals(root.scrollLeft, 0);
    window.scrollTo(0, 0);
  }, "overscroll-behavior-y: none should only prevent scroll propagation on y axis.");

The test is passing the explanation string there as the final arg to the test.step(...) function; but test.step(...) does not take any such arg, as documented here:
https://web-platform-tests.org/writing-tests/testharness-api.html#Test.step

So the string never shows up in the logs when the test fails; we just get the top-level message that was passed to async_test() and that's it.

Really, the explanatory string should be passed to each assert_equals() invocation -- that function does accept a description final-arg:
https://web-platform-tests.org/writing-tests/testharness-api.html#assert_equals

Mentor: botond
Severity: -- → S3
Keywords: good-first-bug
Priority: -- → P3
Whiteboard: [lang=c++]
Whiteboard: [lang=c++] → [lang=js]
Assignee: nobody → sabina.zaripova
Status: NEW → ASSIGNED

This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.

Assignee: sabina.zaripova → nobody
Status: ASSIGNED → NEW
Assignee: nobody → sabina.zaripova
Status: NEW → ASSIGNED

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: sabina.zaripova → nobody
Status: ASSIGNED → NEW

May I please take this bug? :) Am I correct in saying that the suggestion was made, but was never worked on? I believe I understand what needs to be done.

Thanks!

(In reply to Ivan from comment #4)

May I please take this bug? :) Am I correct in saying that the suggestion was made, but was never worked on? I believe I understand what needs to be done.

Sure! All that remains to be done is to address the latest comments on the patch.

(In reply to Botond Ballo [:botond] from comment #5)

(In reply to Ivan from comment #4)

May I please take this bug? :) Am I correct in saying that the suggestion was made, but was never worked on? I believe I understand what needs to be done.

Sure! All that remains to be done is to address the latest comments on the patch.

Thank you Botond! Could you please assign it to me to track?

Assignee: nobody → collier.group01
Attachment #9328424 - Attachment description: Bug 1790138 - Edited test.step() and assertion messages r=botond added suggested changes → Bug 1790138 - Move assertion messages from test.step() into assertion functions in overscroll-behavior.html r=botond
Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ee96b4d088d9
Move assertion messages from  test.step() into assertion functions in overscroll-behavior.html r=botond
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/39567 for changes under testing/web-platform/tests
Whiteboard: [lang=js] → [lang=js], [wptsync upstream]
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
Upstream PR merged by moz-wptsync-bot
Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3b489f4e43c1
Fix typo in overscroll-behavior.html WPT. r=hiro
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/39833 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: