Closed Bug 1669724 Opened 4 years ago Closed 4 years ago

window_composition_text_querycontent.xhtml is not correctly testing relative insertion points

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

defect

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: standard8, Assigned: masayuki)

References

Details

Attachments

(1 file)

In bug 1656280 we are looking at enabling more ESLint rules on widget/tests. One of the rules has picked up that widget/tests/window_composition_text_querycontent.xhtml is currently broken:

https://searchfox.org/mozilla-central/rev/1a973762afcbc5066f73f1508b0c846872fe3952/widget/tests/window_composition_text_querycontent.xhtml#5105

  if (!checkContentRelativeToSelection(0, 1, 0, "0", "runQueryContentEventRelativeToInsertionPoint[0-5]", "#1") ||
      !checkContentRelativeToSelection(-1, 1, 0, "0", "runQueryContentEventRelativeToInsertionPoint[0-5]", "#2") ||
      !checkContentRelativeToSelection(1, 1, 1, "1", "runQueryContentEventRelativeToInsertionPoint[0-5]", "#3") ||
      !checkContentRelativeToSelection(5, 10, 5, "56789", "runQueryContentEventRelativeToInsertionPoint[0-5]", "#4") ||
      !checkContentRelativeToSelection(10, 1, 10, "", "runQueryContentEventRelativeToInsertionPoint[0-5]"), "#5") {
    return;
  }

The last part of that statement should have the , "#5" within the checkContentRelativeToSelection arguments.

If we try and change it, then other parts of the tests break. It is unclear what to do to fix those.

This test was added by bug 1275528.

Component: Internationalization → DOM: UI Events & Focus Handling

Inheriting the priority from the meta bug.

Priority: -- → P3

Masayuki: can you please set the severity for this ticket (and re-prioritize it, if needed)?

Flags: needinfo?(masayuki)
Severity: -- → S3
Flags: needinfo?(masayuki)
Assignee: nobody → masayuki
Status: NEW → ASSIGNED

This is simple mistake at writing the test.

And also, once fixing the mistake, another bug appears. That is, the second
composition string is not "b", but the following code assumes so. Therefore,
this fixes it too.

Depends on D97269

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/8a95095384a5
Fix the mistake in `runQueryContentEventRelativeToInsertionPoint` in `window_composition_text_querycontent.xhtml` r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: