function waitUntilIdle() {
  return browser.executeAsync((done) => {
    if ('requestIdleCallback' in self) {
      requestIdleCallback(() => {
        done();
      });
    } else {
      setTimeout(() => {
        done();
      });
    }
  });
}
Returns a promise that resolves once the browser has run a rIC
(or a setTimeout for non-supporting browsers).
@return {Promise<void>}