function startCleanupFromInfected(files, registryKeys) {
  const scannerResults = {'files': files, 'registryKeys': registryKeys};

  cr.webUIListenerCallback('chrome-cleanup-upload-permission-change', false);
  cr.webUIListenerCallback(
      'chrome-cleanup-on-infected', true /* isPoweredByPartner */,
      scannerResults);
  Polymer.dom.flush();

  const showItemsButton = chromeCleanupPage.$$('#show-items-button');
  assertTrue(!!showItemsButton);
  MockInteractions.tap(showItemsButton);

  const filesToRemoveList = chromeCleanupPage.$$('#files-to-remove-list');
  assertTrue(!!filesToRemoveList);
  validateVisibleItemsList(files, filesToRemoveList);

  const registryKeysListContainer = chromeCleanupPage.$$('#registry-keys-list');
  assertTrue(!!registryKeysListContainer);
  if (registryKeys.length > 0) {
    assertFalse(registryKeysListContainer.hidden);
    assertTrue(!!registryKeysListContainer);
    validateVisibleItemsList(registryKeys, registryKeysListContainer);
  } else {
    assertTrue(registryKeysListContainer.hidden);
  }

  const actionButton = chromeCleanupPage.$$('#action-button');
  assertTrue(!!actionButton);
  actionButton.click();
  return chromeCleanupProxy.whenCalled('startCleanup')
      .then(function(logsUploadEnabled) {
        assertFalse(logsUploadEnabled);
        cr.webUIListenerCallback(
            'chrome-cleanup-on-cleaning', true /* isPoweredByPartner */,
            defaultScannerResults);
        Polymer.dom.flush();

        const spinner = chromeCleanupPage.$$('#waiting-spinner');
        assertTrue(spinner.active);
      });
}
/**
 * @param {!Array} files The list of files to be cleaned
 * @param {!Array} registryKeys The list of registry entires to be cleaned.
 */
@param {!Array} files The list of files to be cleaned
@param {!Array} registryKeys The list of registry entires to be cleaned.
@param { !Array } files The list of files to be cleaned @param { !Array } registryKeys The list of registry entires to be cleaned .
function startCleanupFromInfected(files, registryKeys) {
  const scannerResults = {'files': files, 'registryKeys': registryKeys};
  cr.webUIListenerCallback('chrome-cleanup-upload-permission-change', false);
  cr.webUIListenerCallback(
      'chrome-cleanup-on-infected', true ,
      scannerResults);
  Polymer.dom.flush();
  const showItemsButton = chromeCleanupPage.$$('#show-items-button');
  assertTrue(!!showItemsButton);
  MockInteractions.tap(showItemsButton);
  const filesToRemoveList = chromeCleanupPage.$$('#files-to-remove-list');
  assertTrue(!!filesToRemoveList);
  validateVisibleItemsList(files, filesToRemoveList);
  const registryKeysListContainer = chromeCleanupPage.$$('#registry-keys-list');
  assertTrue(!!registryKeysListContainer);
  if (registryKeys.length > 0) {
    assertFalse(registryKeysListContainer.hidden);
    assertTrue(!!registryKeysListContainer);
    validateVisibleItemsList(registryKeys, registryKeysListContainer);
  } else {
    assertTrue(registryKeysListContainer.hidden);
  }
  const actionButton = chromeCleanupPage.$$('#action-button');
  assertTrue(!!actionButton);
  actionButton.click();
  return chromeCleanupProxy.whenCalled('startCleanup')
      .then(function(logsUploadEnabled) {
        assertFalse(logsUploadEnabled);
        cr.webUIListenerCallback(
            'chrome-cleanup-on-cleaning', true ,
            defaultScannerResults);
        Polymer.dom.flush();
        const spinner = chromeCleanupPage.$$('#waiting-spinner');
        assertTrue(spinner.active);
      });
}
function startCleanupFromInfected ( files , registryKeys ) { const scannerResults = { 'files' : files , 'registryKeys' : registryKeys } ; cr . webUIListenerCallback ( 'chrome-cleanup-upload-permission-change' , false ) ; cr . webUIListenerCallback ( 'chrome-cleanup-on-infected' , true , scannerResults ) ; Polymer . dom . flush ( ) ; const showItemsButton = chromeCleanupPage . $$ ( '#show-items-button' ) ; assertTrue ( ! ! showItemsButton ) ; MockInteractions . tap ( showItemsButton ) ; const filesToRemoveList = chromeCleanupPage . $$ ( '#files-to-remove-list' ) ; assertTrue ( ! ! filesToRemoveList ) ; validateVisibleItemsList ( files , filesToRemoveList ) ; const registryKeysListContainer = chromeCleanupPage . $$ ( '#registry-keys-list' ) ; assertTrue ( ! ! registryKeysListContainer ) ; if ( registryKeys . length > 0 ) { assertFalse ( registryKeysListContainer . hidden ) ; assertTrue ( ! ! registryKeysListContainer ) ; validateVisibleItemsList ( registryKeys , registryKeysListContainer ) ; } else { assertTrue ( registryKeysListContainer . hidden ) ; } const actionButton = chromeCleanupPage . $$ ( '#action-button' ) ; assertTrue ( ! ! actionButton ) ; actionButton . click ( ) ; return chromeCleanupProxy . whenCalled ( 'startCleanup' ) . then ( function ( logsUploadEnabled ) { assertFalse ( logsUploadEnabled ) ; cr . webUIListenerCallback ( 'chrome-cleanup-on-cleaning' , true , defaultScannerResults ) ; Polymer . dom . flush ( ) ; const spinner = chromeCleanupPage . $$ ( '#waiting-spinner' ) ; assertTrue ( spinner . active ) ; } ) ; }
@param {!Array} files The list of files to be cleaned
 @param {!Array} registryKeys The list of registry entires to be cleaned.
@param { !Array } files The list of files to be cleaned @param { !Array } registryKeys The list of registry entires to be cleaned .
/* isPoweredByPartner */ /* isPoweredByPartner */