'Test that downloading the Chrome history works.'

def testChromeHistoryFetch(self):

    for s in flow_test_lib.TestFlowHelper(webhistory.ChromeHistory.__name__, self.client_mock, check_flow_errors=False, client_id=self.client_id, username='test', token=self.token, pathtype=rdf_paths.PathSpec.PathType.TSK):
        session_id = s
    fs_path = '/home/test/.config/google-chrome/Default/History'
    output_path = self.client_id.Add('fs/tsk').Add(self.base_path.replace('\\', '/')).Add('test_img.dd').Add(fs_path.replace('\\', '/'))
    fd = aff4.FACTORY.Open(output_path, token=self.token)
    self.assertTrue((fd.size > 20000))
    fd = flow.GRRFlow.ResultCollectionForFID(session_id, token=self.token)
    self.assertGreater(len(fd), 50)
    self.assertIn('funnycats.exe', '\n'.join([utils.SmartStr(x) for x in fd.GenerateItems()]))
