Use a mock instead of ResourceLoaderContext::newDummyContext()

Change-Id: I0f7a631e58b3fd2cca507e8b251ee5dcff714d4c