Fixed some resource tests so it's easier to mock resources for javascript.