function testLogsUploading(testingScanOffered) {
  if (testingScanOffered) {
    cr.webUIListenerCallback(
        'chrome-cleanup-on-infected', true /* isPoweredByPartner */,
        defaultScannerResults);
  } else {
    cr.webUIListenerCallback(
        'chrome-cleanup-on-idle', settings.ChromeCleanupIdleReason.INITIAL);
  }
  Polymer.dom.flush();

  const logsControl = chromeCleanupPage.$$('#chromeCleanupLogsUploadControl');
  assertTrue(!!logsControl);

  cr.webUIListenerCallback(
      'chrome-cleanup-upload-permission-change', false, true);
  Polymer.dom.flush();
  assertTrue(logsControl.checked);

  cr.webUIListenerCallback(
      'chrome-cleanup-upload-permission-change', false, false);
  Polymer.dom.flush();
  assertFalse(logsControl.checked);

  MockInteractions.tap(logsControl.$.control);
  return chromeCleanupProxy.whenCalled('setLogsUploadPermission')
      .then(function(logsUploadEnabled) {
        assertTrue(logsUploadEnabled);
      });
}
/**
 * @param {boolean} testingScanOffered Whether to test the case where scanning
 *     is offered to the user.
 */
@param {boolean} testingScanOffered Whether to test the case where scanning
is offered to the user.
@param { boolean } testingScanOffered Whether to test the case where scanning is offered to the user .
function testLogsUploading(testingScanOffered) {
  if (testingScanOffered) {
    cr.webUIListenerCallback(
        'chrome-cleanup-on-infected', true ,
        defaultScannerResults);
  } else {
    cr.webUIListenerCallback(
        'chrome-cleanup-on-idle', settings.ChromeCleanupIdleReason.INITIAL);
  }
  Polymer.dom.flush();
  const logsControl = chromeCleanupPage.$$('#chromeCleanupLogsUploadControl');
  assertTrue(!!logsControl);
  cr.webUIListenerCallback(
      'chrome-cleanup-upload-permission-change', false, true);
  Polymer.dom.flush();
  assertTrue(logsControl.checked);
  cr.webUIListenerCallback(
      'chrome-cleanup-upload-permission-change', false, false);
  Polymer.dom.flush();
  assertFalse(logsControl.checked);
  MockInteractions.tap(logsControl.$.control);
  return chromeCleanupProxy.whenCalled('setLogsUploadPermission')
      .then(function(logsUploadEnabled) {
        assertTrue(logsUploadEnabled);
      });
}
function testLogsUploading ( testingScanOffered ) { if ( testingScanOffered ) { cr . webUIListenerCallback ( 'chrome-cleanup-on-infected' , true , defaultScannerResults ) ; } else { cr . webUIListenerCallback ( 'chrome-cleanup-on-idle' , settings . ChromeCleanupIdleReason . INITIAL ) ; } Polymer . dom . flush ( ) ; const logsControl = chromeCleanupPage . $$ ( '#chromeCleanupLogsUploadControl' ) ; assertTrue ( ! ! logsControl ) ; cr . webUIListenerCallback ( 'chrome-cleanup-upload-permission-change' , false , true ) ; Polymer . dom . flush ( ) ; assertTrue ( logsControl . checked ) ; cr . webUIListenerCallback ( 'chrome-cleanup-upload-permission-change' , false , false ) ; Polymer . dom . flush ( ) ; assertFalse ( logsControl . checked ) ; MockInteractions . tap ( logsControl . $ . control ) ; return chromeCleanupProxy . whenCalled ( 'setLogsUploadPermission' ) . then ( function ( logsUploadEnabled ) { assertTrue ( logsUploadEnabled ) ; } ) ; }
@param {boolean} testingScanOffered Whether to test the case where scanning
     is offered to the user.
@param { boolean } testingScanOffered Whether to test the case where scanning is offered to the user .
/* isPoweredByPartner */