'Tests reading of history files written by recent versions of Firefox.'

def testNewHistoryFile(self):

    history_file = os.path.join(self.base_path, 'new_places.sqlite')
    history = firefox3_history.Firefox3History(open(history_file, 'rb'))
    entries = [x for x in history.Parse()]
    self.assertEqual(len(entries), 3)
    self.assertEqual(entries[1][3], 'Slashdot:    News    for    nerds,    stuff    that    matters')
    self.assertEqual(entries[2][0], 1342526323608384L)
    self.assertEqual(entries[2][1], 'FIREFOX3_VISIT')
    self.assertEqual(entries[2][2], 'https://blog.duosecurity.com/2012/07/exploit-mitigations-in-android-jelly-bean-4-1/')
    time_results = [x[0] for x in entries]
    self.assertEqual(time_results, sorted(time_results))
