testTypeOfAcrossWindow() {
    if (userAgent.IE && userAgent.isVersionOrHigher('10') &&
        !userAgent.isVersionOrHigher('11')) {
      // TODO(johnlenz): This test is flaky on IE10 (passing 90+% of the time).
      // When it flakes the values are undefined which appears to indicate the
      // script did not run in the opened window and not a failure of the logic
      // we are trying to test.
      return;
    }

    const w = window.open('', 'blank');
    if (w) {
      try {
        const d = w.document;
        d.open();
        d.write(
            '<script>function fun(){};' +
            'var arr = [];' +
            'var x = 42;' +
            'var s = "";' +
            'var b = true;' +
            'var obj = {length: 0, splice: {}, call: {}};' +
            '</' +
            'script>');
        d.close();

        assertEquals('function', goog.typeOf(w.fun));
        assertEquals('array', goog.typeOf(w.arr));
        assertEquals('number', goog.typeOf(w.x));
        assertEquals('string', goog.typeOf(w.s));
        assertEquals('boolean', goog.typeOf(w.b));
        assertEquals('object', goog.typeOf(w.obj));
      } finally {
        w.close();
      }
    }
  }
@suppress {missingProperties} access to properties on window