Closed Bug 617372 Opened 14 years ago Closed 14 years ago

mochitest fails because it is expecting sans-serif and it gets serif

Categories

(Core :: CSS Parsing and Computation, defect)

ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b8

People

(Reporter: jmaher, Assigned: dbaron)

Details

(Whiteboard: [mobile_unittests] [mobile_dev_needed])

Attachments

(1 file)

in test_value_computation.html, I see 2 failures that fail for this reason:

70641 INFO TEST-PASS | /tests/layout/style/test/test_value_computation.html | should be testing with values that compute to different things for 'font' - "normal ; normal ; 400 ; 18px ; 22px ; serif ; normal ; none ; normal ; normal" sh
ould not equal "normal ; normal ; 400 ; 16px ; 19px ; sans-serif ; normal ; none ; normal ; normal"
70642 INFO TEST-PASS | /tests/layout/style/test/test_value_computation.html | should be testing with values that compute to different things for 'font' - "normal ; normal ; 400 ; 18px ; 22px ; serif ; normal ; none ; normal ; normal" sh
ould not equal "normal ; normal ; 400 ; 16px ; 19px ; sans-serif ; normal ; none ; normal ; normal"
70643 INFO TEST-PASS | /tests/layout/style/test/test_value_computation.html | should not get empty value for 'font:medium serif' - "normal ; normal ; 400 ; 16px ; 19px ; serif ; normal ; none ; normal ; normal" should not equal ""
70644 INFO TEST-PASS | /tests/layout/style/test/test_value_computation.html | should not get empty value for 'font:medium serif' - "normal ; normal ; 400 ; 16px ; 19px ; serif ; normal ; none ; normal ; normal" should not equal ""
70645 ERROR TEST-UNEXPECTED-FAIL | /tests/layout/style/test/test_value_computation.html | should get initial value for 'font:medium serif' - got "normal ; normal ; 400 ; 16px ; 19px ; serif ; normal ; none ; normal ; normal", expected "normal ; normal ; 400 ; 16px ; 19px ; sans-serif ; normal ; none ; normal ; normal"
70646 ERROR TEST-UNEXPECTED-FAIL | /tests/layout/style/test/test_value_computation.html | should get initial value for 'font:medium serif' - got "normal ; normal ; 400 ; 16px ; 19px ; serif ; normal ; none ; normal ; normal", expected "normal ; normal ; 400 ; 16px ; 19px ; sans-serif ; normal ; none ; normal ; normal"
70647 INFO TEST-PASS | /tests/layout/style/test/test_value_computation.html | should not get empty value for 'font:large serif' - "normal ; normal ; 400 ; 18px ; 22px ; serif ; normal ; none ; normal ; normal" should not equal ""
70648 INFO TEST-PASS | /tests/layout/style/test/test_value_computation.html | should not get empty value for 'font:large serif' - "normal ; normal ; 400 ; 18px ; 22px ; serif ; normal ; none ; normal ; normal" should not equal ""
70649 INFO TEST-PASS | /tests/layout/style/test/test_value_computation.html | should not get initial value for 'font:large serif' on elementn. - "normal ; normal ; 400 ; 18px ; 22px ; serif ; normal ; none ; normal ; normal" should not equal "normal ; normal ; 400 ; 16px ; 19px ; sans-serif ; normal ; none ; normal ; normal"
70650 INFO TEST-PASS | /tests/layout/style/test/test_value_computation.html | should not get initial value for 'font:large serif' on elementf. - "normal ; normal ; 400 ; 18px ; 22px ; serif ; normal ; none ; normal ; normal" should not equal "normal ; normal ; 400 ; 16px ; 19px ; sans-serif ; normal ; none ; normal ; normal"
70651 INFO TEST-PASS | /tests/layout/style/test/test_value_computation.html | should not get empty value for 'font:9px fantasy' - "normal ; normal ; 400 ; 9px ; 12px ; fantasy ; normal ; none ; normal ; normal" should not equal ""
70652 INFO TEST-PASS | /tests/layout/style/test/test_value_computation.html | should not get empty value for 'font:9px fantasy' - "normal ; normal ; 400 ; 9px ; 12px ; fantasy ; normal ; none ; normal ; normal" should not equal ""
70653 INFO TEST-PASS | /tests/layout/style/test/test_value_computation.html | should not get initial value for 'font:9px fantasy' on elementn. - "normal ; normal ; 400 ; 9px ; 12px ; fantasy ; normal ; none ; normal ; normal" should not equal "normal ; normal ; 400 ; 16px ; 19px ; sans-serif ; normal ; none ; normal ; normal"
70654 INFO TEST-PASS | /tests/layout/style/test/test_value_computation.html | should not get initial value for 'font:9px fantasy' on elementf. - "normal ; normal ; 400 ; 9px ; 12px ; fantasy ; normal ; none ; normal ; normal" should not equal "normal ; normal ; 400 ; 16px ; 19px ; sans-serif ; normal ; none ; normal ; normal"


From the log clip above, you can see that we are failing here:
http://mxr.mozilla.org/mozilla-central/source/layout/style/test/property_database.js#1716


When loading up fennec on android, we dump the system fonts out here:
I/Gecko   ( 7127): Font: /system/fonts/DroidSansFallback.ttf
I/Gecko   ( 7127): font family: Droid Sans Fallback
I/Gecko   ( 7127): Font: /system/fonts/Clockopia.ttf
I/Gecko   ( 7127): font family: Clockopia
I/Gecko   ( 7127): Font: /system/fonts/DroidSansMono.ttf
I/Gecko   ( 7127): font family: Droid Sans Mono
I/Gecko   ( 7127): Font: /system/fonts/DroidSerif-BoldItalic.ttf
I/Gecko   ( 7127): font family: Droid Serif
I/Gecko   ( 7127): Font: /system/fonts/DroidSerif-Italic.ttf
I/Gecko   ( 7127): font family: Droid Serif
I/Gecko   ( 7127): Font: /system/fonts/DroidSerif-Bold.ttf
I/Gecko   ( 7127): font family: Droid Serif
I/Gecko   ( 7127): Font: /system/fonts/DroidSerif-Regular.ttf
I/Gecko   ( 7127): font family: Droid Serif
I/Gecko   ( 7127): Font: /system/fonts/DroidSansThai.ttf
I/Gecko   ( 7127): font family: Droid Sans Thai
I/Gecko   ( 7127): Font: /system/fonts/DroidSansHebrew.ttf
I/Gecko   ( 7127): font family: Droid Sans Hebrew
I/Gecko   ( 7127): Font: /system/fonts/DroidSansArabic.ttf
I/Gecko   ( 7127): font family: Droid Sans Arabic
I/Gecko   ( 7127): Font: /system/fonts/DroidSans-Bold.ttf
I/Gecko   ( 7127): font family: Droid Sans
I/Gecko   ( 7127): Font: /system/fonts/DroidSans.ttf
I/Gecko   ( 7127): font family: Droid Sans
I/Gecko   ( 7127): Detected osrelease `2.6.32.9'

Here is a link to a log file from the test run:
http://people.mozilla.org/~jmaher/layout_android.log

There are 6 other failures in this test file for similar errors and I suspect fixing this above mentioned error would resolve most if not all of the other ones.
Whiteboard: [mobile_unittests] [mobile_dev_needed]
Assignee: nobody → dbaron
Component: Layout → Style System (CSS)
QA Contact: layout → style-system
Attached patch patchSplinter Review
I think this should work, though I haven't tested it in an environment where the default font is sans-serif.
I tested this patch on a build and it resolved the 8 failures I mentioned in comment 1.  Thanks for the patch!  

Also, I did a full try server run and it looks good, so this has not introduced any regressions for normal Firefox.
http://hg.mozilla.org/mozilla-central/rev/9103bd2267e7
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
Comment on attachment 496225 [details] [diff] [review]
patch

> 		/* XXX could be sans-serif */
>-		initial_values: [ "medium serif" ],
>+		initial_values: [ (initial_font_family_is_sans_serif() ? "medium sans-serif" : "medium serif") ],

Missed the comment?
Thank you!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: