Merge when Bug 874837 is closed

Test passes when xFail code is removed.

If i am doing something wrong please point out. Kinda new here :)