Closed Bug 1592246 Opened 5 years ago Closed 4 years ago

Write test for resizing request list columns in RTL mode

Categories

(DevTools :: Netmonitor, task, P3)

task

Tracking

(firefox77 fixed)

RESOLVED FIXED
Firefox 77
Tracking Status
firefox77 --- fixed

People

(Reporter: ntim, Assigned: victorhfmag+bugzilla.mozilla.org, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

Attachments

(1 file, 1 obsolete file)

No description provided.

Support for resizing request list columns in RTL mode was introduced in bug 1586281.
We also need a test for it.

There is already a test for request list columns resizing and the new test might be quite similar
https://searchfox.org/mozilla-central/rev/11d9c7b7fa82fdfb8ac2a8f0864e9d8d5fe2b926/devtools/client/netmonitor/test/browser_net_headers-resize.js#7

Honza

Keywords: good-first-bug
Summary: Write test for bug 1586281 → Write test for resizing request list columns in RTL mode

Hi Honza, I am giving a try to it.
In this, I have to write a new test for resizing request list columns in RTL mode or make changes in the given test for test for request list columns resizing

Mentor: odvarko
Flags: needinfo?(odvarko)

hey, I can try this one !?

So, here is the existing test
https://searchfox.org/mozilla-central/rev/a37fc61f172b432e7ae0b6b4c4a12cac2a787a0f/devtools/client/netmonitor/test/browser_net_headers-resize.js#7

I think that it would be great to extend the existing test to also cover RTL
We should also try hard to keep the test simple and clean.

Honza

Flags: needinfo?(odvarko)

Hello, :Honza and others! I have just submitted a patch (my first ever!) with an attempt to tackle this bug.

Following specifications, I extended the existing test to also cover RTL and tried to keep it simple and clean. I extracted the whole code inside the anonymous function passed to add_task to its own function, testForGivenDir, which now receives a isRTL parameter. testForGivenDir itself only updates the relevant preference (intl.uidirection) and passes the parameter along to resizeColumn and resizeWaterfallColumn, which in turn change the positions of the synthesized mouse events to have the same behavior in both directions, keeping all the assertions the same. The only other relevant change is that I keep a copy of the initial value for the devtools.netmonitor.columnsData pref and reset it in the end of testForGivenDir to prevent LTR and RTL tests from messing with each other.

Thanks in advance, Victor

Flags: needinfo?(odvarko)
Assignee: nobody → victorhfmag+bugzilla.mozilla.org
Status: NEW → ASSIGNED
Attachment #9140403 - Attachment is obsolete: true
Pushed by hmanilla@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ea574b47a332
Write test for resizing request list columns in RTL mode r=bomsy
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 77
Flags: needinfo?(odvarko)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: