Closed Bug 455818 Opened 17 years ago Closed 17 years ago

Some editor movement tests need to be fixed for Windows

Categories

(Core :: DOM: Editor, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: MatsPalmgren_bugz)

References

Details

Attachments

(3 files)

Depends on: 454004
Version: unspecified → Trunk
Attached patch Patch rev. 1Splinter Review
There were two problems with the tests, the first was due to the difference in the default value for the pref "layout.word_select.eat_space_to_next_word" between platforms, which affects "cmd_selectWordNext". The second problem was caused by font/line-height differences which affects how many lines to scroll for a page scroll. I wrapped all the commands that involves selection in a function and run it twice (eat_space_to_next_word=true/false) to check that only "cmd_selectWordNext" is affected (and with correct values for each). The second problem was fixed by hard-coding some font-size/line-height etc styles. (I also fixed a few Windows ^M line-endings) The test now passes on Windows/Linux/MacOSX for me.
Assignee: nobody → mats.palmgren
Attachment #339257 - Flags: review?(roc)
Comment on attachment 339257 [details] [diff] [review] Patch rev. 1 (diff -uw) Looks good. Only thing I'd add is some exception-catching so that if we throw an exception during the test the pref value is restored to its original value.
Attachment #339257 - Flags: review?(roc) → review+
Attached patch Patch rev. 2Splinter Review
Wrapped the pref changes in a try-finally block to address comment 3.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: