robolectric/robolectric — pull request #1032 by blurpy (2014-04-05 18:30:52+00:00)
Title: Adding support for scale-independent pixels in Resources.getDimension()

Scale-independent pixels are calculated using ```metrics.scaledDensity```.
```scaledDensity``` is set in ```Resources.updateConfiguration()``` like this:

```
mMetrics.scaledDensity = mMetrics.density * mConfiguration.fontScale;
```

```fontScale``` was always 0, meaning that ```scaledDensity``` also became 0, and ```resources.getDimension(R.dimen.sp_value)``` therefore returned 0 no matter the value.

Fixing by running the real ```Configuration.setToDefaults()``` from the shadow, which then sets ```fontScale``` to 1.