Page MenuHomePhabricator

browser tests must normalize font-family
Closed, ResolvedPublic


The .autonym class from resources/css/ext.uls.webfonts.css is:

font-family: 'Autonym', sans-serif;

With single quotes and a space after the comma.

Firefox simply strip the whitespace and the following test works:

on(PanelPage)"font-family").should == "'Autonym',sans-serif"

On the other hand, phantomjs:

  • strip the single quotes
  • keep the white space

Hence it yield:

Autonym, sans-serif

That makes the tests fails under phantomjs.

The style("font-family").should test should normalize the list of fonts or be replaced by something that yield a list of fonts we can compare against. Or maybe just assert it contains the Autonym string.

Version: master
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:13 AM
bzimport set Reference to bz57101.

Change 111804 had a related patch set uploaded by KartikMistry:
Normalize the font-family name in browser test

Change 111804 merged by Cmcmahon:
Normalize the font-family name in browser test

Assuming the patch is generic enough.