#NEWLINE# def testOnlyTheLatestCrashIsDisplayed( self ) : #NEWLINE# #INDENT# timestamp = rdfvalue . RDFDatetime ( ) . Now ( ) #NEWLINE# client_id = self . CreateClient ( last_ping = timestamp ) #NEWLINE# with self . ACLChecksDisabled ( ) : #NEWLINE# #INDENT# self . RecordCrash ( client_id , ( timestamp - rdfvalue . Duration ( '10s' ) ) ) #NEWLINE# self . RecordCrash ( client_id , ( timestamp - rdfvalue . Duration ( '5s' ) ) ) #NEWLINE# self . RequestAndGrantClientApproval ( client_id ) #NEWLINE# #UNINDENT# with test_lib . FakeTime ( timestamp ) : #NEWLINE# #INDENT# self . Open ( ( '/#c=' + str ( client_id ) ) ) #NEWLINE# self . WaitUntil ( self . IsTextPresent , 'Last crash' ) #NEWLINE# self . WaitUntil ( client_id . IsTextPresent , '5 seconds ago' ) #NEWLINE# self . WaitUntilNot ( self . IsTextPresent , '10 seconds ago' )