function stubTmpnetwork() {
  stubs.set(tmpnetwork, 'testLoadImage', (url, timeout, callback) => {
    Timer.callOnce(goog.partial(callback, false), timeout);
  });
}
Stubs tmpnetwork to always time out. It maintains the
contract given by tmpnetwork.testGoogleCom, but always
times out (calling callback(false)).
stubTmpnetwork should be called in tests that require it before
a call to testGoogleCom happens. It is reset at tearDown.