agent/browser/ie/pagetest/PagetestReporting.cpp
/*-----------------------------------------------------------------------------
	Check to make sure there are no ETags
-----------------------------------------------------------------------------*/
Check to make sure there are no ETags
Check to make sure there are no ETags
void CPagetestReporting::CheckEtags()
{
	etagScore = -1;
	int count = 0;
	int total = 0;
	ATLTRACE(_T("[Pagetest] - CheckEtags\n"));
	POSITION pos = events.GetHeadPosition();
	while( pos )
	{
		CTrackedEvent * e = events.GetNext(pos);
		if( e && e->type == CTrackedEvent::etWinInetRequest && !e->ignore )
		{
			CWinInetRequest * w = (CWinInetRequest *)e;
			if( w->fromNet )
			{
				count++;
				if( w->response.etag.IsEmpty() )
					w->etagScore = 100;
				else
					w->etagScore = 0;
				total += w->etagScore;
			}
		}
	}
	if( count )
		etagScore = total / count;
}
void CPagetestReporting :: CheckEtags ( ) { etagScore = -1 ; int count = 0 ; int total = 0 ; ATLTRACE ( _T ( " \n " ) ) ; POSITION pos = events . GetHeadPosition ( ) ; while ( pos ) { CTrackedEvent * e = events . GetNext ( pos ) ; if ( e && e -> type == CTrackedEvent :: etWinInetRequest && ! e -> ignore ) { CWinInetRequest * w = ( CWinInetRequest * ) e ; if ( w -> fromNet ) { count ++ ; if ( w -> response . etag . IsEmpty ( ) ) w -> etagScore = 100 ; else w -> etagScore = 0 ; total += w -> etagScore ; } } } if ( count ) etagScore = total / count ; }
Check to make sure there are no ETags
Check to make sure there are no ETags
// default to pass
 // average the cookie scores of all of the objects for the page
