<s> """<STR_LIT>""" <EOL> from grr . gui import runtests_test <EOL> from grr . lib import access_control <EOL> from grr . lib import action_mocks <EOL> from grr . lib import aff4 <EOL> from grr . lib import config_lib <EOL> from grr . lib import flags <EOL> from grr . lib import test_lib <EOL> from grr . lib . flows . general import timelines <EOL> from grr . lib . rdfvalues import client as rdf_client <EOL> from grr . lib . rdfvalues import crypto as rdf_crypto <EOL> from grr . lib . rdfvalues import paths as rdf_paths <EOL> class TestTimelineView ( test_lib . GRRSeleniumTest ) : <EOL> """<STR_LIT>""" <EOL> def CreateTimelineFixture ( self ) : <EOL> """<STR_LIT>""" <EOL> client_id = rdf_client . ClientURN ( "<STR_LIT>" ) <EOL> token = access_control . ACLToken ( username = "<STR_LIT:test>" , reason = "<STR_LIT>" ) <EOL> fd = aff4 . FACTORY . Create ( client_id , "<STR_LIT>" , token = token ) <EOL> cert = self . ClientCertFromPrivateKey ( <EOL> config_lib . CONFIG [ "<STR_LIT>" ] ) <EOL> client_cert = rdf_crypto . RDFX509Cert ( cert . as_pem ( ) ) <EOL> fd . Set ( fd . Schema . CERT ( client_cert ) ) <EOL> fd . Close ( ) <EOL> with test_lib . VFSOverrider ( <EOL> rdf_paths . PathSpec . PathType . OS , test_lib . ClientVFSHandlerFixture ) : <EOL> client_mock = action_mocks . ActionMock ( "<STR_LIT>" ) <EOL> output_path = "<STR_LIT>" <EOL> for _ in test_lib . TestFlowHelper ( <EOL> "<STR_LIT>" , client_mock , client_id = client_id , <EOL> pathspec = rdf_paths . PathSpec ( <EOL> path = "<STR_LIT:/>" , pathtype = rdf_paths . PathSpec . PathType . OS ) , <EOL> token = token ) : <EOL> pass <EOL> for _ in test_lib . TestFlowHelper ( <EOL> timelines . MACTimes . __name__ , client_mock , client_id = client_id , <EOL> token = token , path = "<STR_LIT:/>" , output = output_path ) : <EOL> pass <EOL> def setUp ( self ) : <EOL> test_lib . GRRSeleniumTest . setUp ( self ) <EOL> with self . ACLChecksDisabled ( ) : <EOL> self . CreateTimelineFixture ( ) <EOL> self . RequestAndGrantClientApproval ( "<STR_LIT>" ) <EOL> def testTimelineViewer ( self ) : <EOL> self . Open ( "<STR_LIT:/>" ) <EOL> self . Type ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> self . Click ( "<STR_LIT>" ) <EOL> self . WaitUntilEqual ( u"<STR_LIT>" , <EOL> self . GetText , "<STR_LIT>" ) <EOL> self . Click ( "<STR_LIT>" ) <EOL> self . Click ( "<STR_LIT>" ) <EOL> self . Click ( "<STR_LIT>" ) <EOL> self . Click ( "<STR_LIT>" ) <EOL> self . Click ( "<STR_LIT>" ) <EOL> self . WaitUntil ( self . IsElementPresent , "<STR_LIT>" ) <EOL> self . assertIn ( "<STR_LIT>" , self . GetText ( "<STR_LIT>" ) ) <EOL> self . Click ( "<STR_LIT>" ) <EOL> self . WaitUntil ( self . IsElementPresent , "<STR_LIT>" ) <EOL> self . Type ( "<STR_LIT>" , <EOL> "<STR_LIT>" ) <EOL> self . Click ( "<STR_LIT>" ) <EOL> self . WaitUntilContains ( "<STR_LIT>" , <EOL> self . GetText , "<STR_LIT>" ) <EOL> self . Click ( "<STR_LIT>" ) <EOL> self . WaitUntilContains ( "<STR_LIT>" , self . GetText , <EOL> "<STR_LIT>" ) <EOL> self . assertTrue ( "<STR_LIT>" in self . GetText ( <EOL> "<STR_LIT>" ) ) <EOL> def main ( argv ) : <EOL> runtests_test . SeleniumTestProgram ( argv = argv ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> flags . StartMain ( main ) </s>
