Closed Bug 397185 Opened 17 years ago Closed 15 years ago

test_textbox_number.xul fails when decimal separator set in Regional Settings is comma

Categories

(Toolkit :: UI Widgets, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9.2a1
Tracking Status
status1.9.1 --- .2-fixed

People

(Reporter: asqueella, Assigned: sgautherie)

References

()

Details

(Keywords: l12y, verified1.9.1)

Attachments

(1 file, 1 obsolete file)

not ok - initial n7 inputField value is 4.68
not ok - decimalSymbol defaults to .     (well, of course it doesn't!)
etc.

Would it be OK to fix the tests to not assume anything about decimalSymbol and use it when checking the string value in testVals?
It should retrieve the decimal symbol to use from the locale and compare against that.
Confirming: I get "INFO Failed: 23" on my fr-fr Windows 2000 (Firefox & SeaMonkey).
Component: Testing → XUL Widgets
Product: Core → Toolkit
QA Contact: testing → xul.widgets
Keywords: l12y
Flags: wanted1.9.2?
Flags: wanted1.9.1?
Flags: wanted1.9.1.x?
Attached patch (Av1) Fix the test (obsolete) — Splinter Review
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090715 SeaMonkey/2.1a1pre] (home, optim default) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/d190d9b6ccd1
 +http://hg.mozilla.org/comm-central/rev/773809454cf2 + bug 503724 patch)

Fwiw, I noticed that assigning .decimalSymbol does not update .inputField.value.
Is that a bug ?
Assignee: nobody → sgautherie.bz
Status: NEW → ASSIGNED
Attachment #389551 - Flags: review?(enndeakin)
Comment on attachment 389551 [details] [diff] [review]
(Av1) Fix the test

>-  ise(n1.decimalSymbol, ".", "decimalSymbol defaults to .");
>+  n1.decimalSymbol = ".";
>+  ise(n1.decimalSymbol, ".", "n1.decimalSymbol set to '.'");

This should have a check before it to ensure that decimalSymbol is at least set to something.

>+  // This value format depends on the localized decimal symbol.
>+  var localizedValue = valueFieldNumber.replace(/\./, nb.decimalSymbol);
>+  ise(nb.inputField.value, localizedValue,
>+      name + " inputField value is \"" + localizedValue + "\"");

Use single quotes here rather than escaping to be consistent with the earlier line.
Av1, with comment 4 suggestion(s).
Attachment #389551 - Attachment is obsolete: true
Attachment #390346 - Flags: review?(enndeakin)
Attachment #389551 - Flags: review?(enndeakin)
Attachment #390346 - Flags: review?(enndeakin) → review+
Comment on attachment 390346 [details] [diff] [review]
(Av1a) Fix the test
[Checkin: Comment 6 & 7]


http://hg.mozilla.org/mozilla-central/rev/9c374983ee81
Attachment #390346 - Attachment description: (Av1a) Fix the test → (Av1a) Fix the test [Checkin: Comment 6]
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: wanted1.9.2?
Flags: wanted1.9.1.x?
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Comment on attachment 390346 [details] [diff] [review]
(Av1a) Fix the test
[Checkin: Comment 6 & 7]


http://hg.mozilla.org/releases/mozilla-1.9.1/rev/40a4be6add23
Attachment #390346 - Attachment description: (Av1a) Fix the test [Checkin: Comment 6] → (Av1a) Fix the test [Checkin: Comment 6 & 7]
All testes pass on trunk and 1.9.1. Marking verified.
Status: RESOLVED → VERIFIED
Keywords: verified1.9.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: