Make browser_dbg-editor-scroll.js stable
Categories
(DevTools :: Debugger, defect)
Tracking
(firefox141 fixed)
Tracking | Status | |
---|---|---|
firefox141 | --- | fixed |
People
(Reporter: hiro, Assigned: hiro)
References
Details
Attachments
(2 files)
1.49 KB,
patch
|
Details | Diff | Splinter Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Though the test failed when I landed the change for bug 1674687 (see bug 1674687 comment 12), I can see (probably) the same error when I run the test locally without any change.
devtools/client/debugger/test/mochitest/browser_dbg-editor-scroll.js
FAIL The new first line is visible -
Stack trace:
chrome://mochikit/content/browser-test.js:test_ok:1626
chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/browser_dbg-editor-scroll.js:testIsPositionVisible:195
chrome://mochikit/content/browser-test.js:handleTask:1170
chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1242
chrome://mochikit/content/browser-test.js:Tester_execTest:1383
chrome://mochikit/content/browser-test.js:nextTest/<:1159
chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058
Assignee | ||
Comment 1•3 months ago
|
||
On my linux (wayland) environment, at this line;
inYView = coords.top > y && coords.bottom < y + height;
The coords.top
is 25.449996948242188, wheares y
is 29.
Assignee | ||
Comment 2•3 months ago
|
||
Hey Alexandre or Hubert, I think in this test getFirstVisibleLine
might return lines where it's partially visible. So I think we should ok(isScrolledPositionVisible(dbg, firstLine + 1)
rather than isScrolledPositionVisible(dbg, firstLine)
?
Assignee | ||
Comment 3•3 months ago
|
||
Just for a reference, this is the change what I have in my mind.
Comment 4•3 months ago
|
||
Hi :hiro
Sorry about you facing issues with this test...
I tried very hard to make this test deterministic and reliable, but it is actually brittle.
You are proving with bug 1674687 that is can easily be impacted by platform changes.
So feel free to change the assertion to whatever state we end up with.
The important thing is to assert that the scroll is overall correct. The very precise line and column we scroll to isn't critical as it can easily change based on font rendering which changes easily based on the OS/environment.
Assignee | ||
Comment 5•3 months ago
|
||
Thank you, Alexandre!
Assignee | ||
Comment 6•3 months ago
|
||
It's possible that the line returned by getFirstVisibleLine
may be
partially visible.
Updated•3 months ago
|
Comment 8•3 months ago
|
||
bugherder |
Updated•2 months ago
|
Description
•