function preloadJavascriptLibraries(testFixture, testName) {
  deferGlobalOverrides = true;

  // The document seems to change from the point of preloading to the point of
  // events (and doesn't fire), whereas the window does not. Listening to the
  // capture phase allows this event to fire first.
  window.addEventListener('DOMContentLoaded', function() {
    if (chrome.send)
      overrideChrome();

    // Override globals at load time so they will be defined.
    assertTrue(deferGlobalOverrides);
    deferGlobalOverrides = false;
    for (var funcName in globalOverrides)
      overrideGlobal(funcName);
  }, true);
  currentTestCase = createTestCase(testFixture, testName);
  currentTestCase.preLoad();
}
/**
 * Used by WebUIBrowserTest to preload the javascript libraries at the
 * appropriate time for javascript injection into the current page. This
 * creates a test case and calls its preLoad for any early initialization such
 * as registering handlers before the page's javascript runs it's OnLoad
 * method. This is called before the page is loaded, so the |chrome| object is
 * not yet bound and this DOMContentLoaded listener will be called first to
 * override |chrome| in order to route messages registered in |sendCallbacks|.
 * @param {string} testFixture The test fixture name.
 * @param {string} testName The test name.
 * @see sendCallbacks
 */
Used by WebUIBrowserTest to preload the javascript libraries at the
appropriate time for javascript injection into the current page. This
creates a test case and calls its preLoad for any early initialization such
as registering handlers before the page's javascript runs it's OnLoad
method.
Used by WebUIBrowserTest to preload the javascript libraries at the appropriate time for javascript injection into the current page . This creates a test case and calls its preLoad for any early initialization such as registering handlers before the page ' s javascript runs it ' s OnLoad method .
function preloadJavascriptLibraries(testFixture, testName) {
  deferGlobalOverrides = true;
  window.addEventListener('DOMContentLoaded', function() {
    if (chrome.send)
      overrideChrome();
    assertTrue(deferGlobalOverrides);
    deferGlobalOverrides = false;
    for (var funcName in globalOverrides)
      overrideGlobal(funcName);
  }, true);
  currentTestCase = createTestCase(testFixture, testName);
  currentTestCase.preLoad();
}
function preloadJavascriptLibraries ( testFixture , testName ) { deferGlobalOverrides = true ; window . addEventListener ( 'DOMContentLoaded' , function ( ) { if ( chrome . send ) overrideChrome ( ) ; assertTrue ( deferGlobalOverrides ) ; deferGlobalOverrides = false ; for ( var funcName in globalOverrides ) overrideGlobal ( funcName ) ; } , true ) ; currentTestCase = createTestCase ( testFixture , testName ) ; currentTestCase . preLoad ( ) ; }
Used by WebUIBrowserTest to preload the javascript libraries at the
 appropriate time for javascript injection into the current page.
Used by WebUIBrowserTest to preload the javascript libraries at the appropriate time for javascript injection into the current page .
// The document seems to change from the point of preloading to the point of // events (and doesn't fire), whereas the window does not. Listening to the // capture phase allows this event to fire first. // Override globals at load time so they will be defined.