Mock global window object for testing applicationCache. (Fixes #19) (See #49)