auto merge of #4569 : donaldpipowitch/servo/add-unit-tests-for-textinput, r=jdm
auto merge of #4569 : donaldpipowitch/servo/add-unit-tests-for-textinput, r=jdm

Please bear with me. This is the first Rust code I've ever written and the first systems programming language I've ever used.

I've added unit tests for all methods of TextInput ( - except `handle_keydown`). I probably didn't cover all cases - I don't know if this is a real requirement until we have some coverage tools which identify all missing cases easily.
If someone could show me how to create a `KeyboardEvent` easily I could add another test for `handle_keydown`.

Other questions:
1. Running `$ time ./mach test-unit -c script test_textinput` takes `3m29.536s` on my MacBook Pro (2012). Any hints on speeding this up?
2. Who is responsible for the feedback of the unit tests? It would be nice if the output could be colored (e.g. make `11 passed;` green, `0 failed;` red and so on.)

saneyuki/servo,hyowon/servo,kindersung/servo,nnethercote/servo,nrc/servo,jimberlage/servo,KiChjang/servo,canaltinova/servo,dhananjay92/servo,ConnorGBrewster/servo,tempbottle/servo,nnethercote/servo,dhananjay92/servo,DominoTree/servo,luniv/servo,pyfisch/servo,nick-thompson/servo,larsbergstrom/servo,Adenilson/prototype-viewing-distance,rentongzhang/servo,boghison/servo,pyfisch/servo,cbrewster/servo,karlito40/servo,saratang/servo,rnestler/servo,samfoo/servo,WriterOfAlicrow/servo,huonw/servo,indykish/servo,dati91/servo,dati91/servo,luniv/servo,eddyb/servo,indykish/servo,luniv/servo,pyfisch/servo,fiji-flo/servo,jdramani/servo,deokjinkim/servo,Adenilson/prototype-viewing-distance,pyecs/servo,CJ8664/servo,wartman4404/servo,nrc/servo,jlegendary/servo,saneyuki/servo,dmarcos/servo,dvberkel/servo,AnthonyBroadCrawford/servo,mattnenterprise/servo,ConnorGBrewster/servo,nnethercote/servo,szeged/servo,vks/servo,dhananjay92/servo,GreenRecycleBin/servo,jimberlage/servo,KiChjang/servo,rixrix/servo,ryancanhelpyou/servo,dati91/servo,notriddle/servo,caldwell/servo,A-deLuna/servo,tafia/servo,runarberg/servo,rentongzhang/servo,upsuper/servo,bjwbell/servo,mattnenterprise/servo,tafia/servo,snf/servo,canaltinova/servo,CJ8664/servo,RenaudParis/servo,thiagopnts/servo,dvberkel/servo,canaltinova/servo,zhangjunlei26/servo,dagnir/servo,Adenilson/prototype-viewing-distance,larsbergstrom/servo,walac/servo,szeged/servo,eddyb/servo,splav/servo,echochamber/servo,notriddle/servo,akosel/servo,caldwell/servo,deokjinkim/servo,larsbergstrom/servo,dsandeephegde/servo,notriddle/servo,saratang/servo,tempbottle/servo,saratang/servo,karlito40/servo,g-k/servo,jimberlage/servo,dsandeephegde/servo,anthgur/servo,walac/servo,thiagopnts/servo,anthgur/servo,jgraham/servo,GyrosOfWar/servo,indykish/servo,kindersung/servo,runarberg/servo,ConnorGBrewster/servo,snf/servo,tschneidereit/servo,karlito40/servo,fiji-flo/servo,ruud-v-a/servo,chotchki/servo,deokjinkim/servo,youprofit/servo,mbrubeck/servo,brendandahl/servo,mt2d2/servo,cbrewster/servo,wpgallih/servo,rixrix/servo,nnethercote/servo,aidanhs/servo,rnestler/servo,mt2d2/servo,WriterOfAlicrow/servo,tschneidereit/servo,echochamber/servo,rixrix/servo,nrc/servo,dhananjay92/servo,youprofit/servo,mdibaiee/servo,indykish/servo,luniv/servo,CJ8664/servo,dvberkel/servo,paulrouget/servo,indykish/servo,szeged/servo,AnthonyBroadCrawford/servo,codemac/servo,saratang/servo,nnethercote/servo,peterjoel/servo,deokjinkim/servo,ryancanhelpyou/servo,wpgallih/servo,peterjoel/servo,huonw/servo,vks/servo,brendandahl/servo,zentner-kyle/servo,wpgallih/servo,cbrewster/servo,tschneidereit/servo,GreenRecycleBin/servo,runarberg/servo,indykish/servo,paulrouget/servo,DominoTree/servo,jdramani/servo,larsbergstrom/servo,g-k/servo,fiji-flo/servo,DominoTree/servo,rixrix/servo,akosel/servo,deokjinkim/servo,saneyuki/servo,rixrix/servo,bjwbell/servo,walac/servo,GreenRecycleBin/servo,vks/servo,splav/servo,rixrix/servo,upsuper/servo,szeged/servo,saratang/servo,DominoTree/servo,jlegendary/servo,canaltinova/servo,evilpie/servo,nnethercote/servo,zentner-kyle/servo,dhananjay92/servo,nick-thompson/servo,KiChjang/servo,DominoTree/servo,aidanhs/servo,pgonda/servo,evilpie/servo,eddyb/servo,SimonSapin/servo,nick-thompson/servo,cbrewster/servo,rnestler/servo,pgonda/servo,cbrewster/servo,hyowon/servo,codemac/servo,DominoTree/servo,tafia/servo,zentner-kyle/servo,KiChjang/servo,s142857/servo,GreenRecycleBin/servo,dmarcos/servo,caldwell/servo,ryancanhelpyou/servo,jdramani/servo,s142857/servo,avadacatavra/servo,pyecs/servo,dmarcos/servo,walac/servo,aweinstock314/servo,tempbottle/servo,steveklabnik/servo,wartman4404/servo,saneyuki/servo,A-deLuna/servo,rixrix/servo,jdramani/servo,nerith/servo,meh/servo,srbhklkrn/SERVOENGINE,steveklabnik/servo,pyecs/servo,zentner-kyle/servo,WriterOfAlicrow/servo,notriddle/servo,saneyuki/servo,evilpie/servo,rixrix/servo,CJ8664/servo,anthgur/servo,A-deLuna/servo,aidanhs/servo,rnestler/servo,boghison/servo,akosel/servo,dvberkel/servo,CJ8664/servo,ruud-v-a/servo,larsbergstrom/servo,splav/servo,dhananjay92/servo,dagnir/servo,saneyuki/servo,tafia/servo,GreenRecycleBin/servo,mbrubeck/servo,runarberg/servo,avadacatavra/servo,AnthonyBroadCrawford/servo,chotchki/servo,splav/servo,steveklabnik/servo,Adenilson/prototype-viewing-distance,zhangjunlei26/servo,dvberkel/servo,jlegendary/servo,dagnir/servo,upsuper/servo,boghison/servo,tempbottle/servo,dagnir/servo,zhangjunlei26/servo,WriterOfAlicrow/servo,echochamber/servo,pyecs/servo,RenaudParis/servo,jgraham/servo,nnethercote/servo,j3parker/servo,chotchki/servo,mattnenterprise/servo,wpgallih/servo,pyfisch/servo,g-k/servo,srbhklkrn/SERVOENGINE,notriddle/servo,pgonda/servo,WriterOfAlicrow/servo,emilio/servo,tschneidereit/servo,RenaudParis/servo,sadmansk/servo,deokjinkim/servo,peterjoel/servo,rentongzhang/servo,dsandeephegde/servo,wpgallih/servo,tafia/servo,splav/servo,snf/servo,ConnorGBrewster/servo,SimonSapin/servo,aidanhs/servo,wpgallih/servo,anthgur/servo,saneyuki/servo,KiChjang/servo,caldwell/servo,peterjoel/servo,bjwbell/servo,g-k/servo,jlegendary/servo,vks/servo,emilio/servo,nrc/servo,szeged/servo,pyecs/servo,runarberg/servo,boghison/servo,KiChjang/servo,karlito40/servo,ryancanhelpyou/servo,AnthonyBroadCrawford/servo,tafia/servo,pyfisch/servo,dmarcos/servo,pyecs/servo,rentongzhang/servo,tempbottle/servo,g-k/servo,mt2d2/servo,SimonSapin/servo,notriddle/servo,dati91/servo,chotchki/servo,deokjinkim/servo,paulrouget/servo,AnthonyBroadCrawford/servo,nick-thompson/servo,rentongzhang/servo,cbrewster/servo,CJ8664/servo,srbhklkrn/SERVOENGINE,fiji-flo/servo,walac/servo,sadmansk/servo,jgraham/servo,paulrouget/servo,notriddle/servo,dagnir/servo,hyowon/servo,caldwell/servo,dati91/servo,huonw/servo,dagnir/servo,avadacatavra/servo,cbrewster/servo,samfoo/servo,larsbergstrom/servo,GyrosOfWar/servo,RenaudParis/servo,fiji-flo/servo,jdramani/servo,jgraham/servo,pgonda/servo,steveklabnik/servo,indykish/servo,A-deLuna/servo,evilpie/servo,nrc/servo,AnthonyBroadCrawford/servo,samfoo/servo,GyrosOfWar/servo,samfoo/servo,huonw/servo,hyowon/servo,zhangjunlei26/servo,codemac/servo,kindersung/servo,dmarcos/servo,aweinstock314/servo,dati91/servo,j3parker/servo,WriterOfAlicrow/servo,luniv/servo,jimberlage/servo,eddyb/servo,samfoo/servo,samfoo/servo,canaltinova/servo,codemac/servo,GreenRecycleBin/servo,aweinstock314/servo,szeged/servo,srbhklkrn/SERVOENGINE,srbhklkrn/SERVOENGINE,nnethercote/servo,KiChjang/servo,larsbergstrom/servo,meh/servo,jdramani/servo,AnthonyBroadCrawford/servo,karlito40/servo,saratang/servo,szeged/servo,youprofit/servo,pyfisch/servo,dsandeephegde/servo,eddyb/servo,youprofit/servo,meh/servo,pgonda/servo,SimonSapin/servo,saneyuki/servo,eddyb/servo,meh/servo,boghison/servo,upsuper/servo,mbrubeck/servo,zhangjunlei26/servo,Adenilson/prototype-viewing-distance,avadacatavra/servo,CJ8664/servo,snf/servo,evilpie/servo,snf/servo,szeged/servo,meh/servo,rentongzhang/servo,anthgur/servo,rnestler/servo,steveklabnik/servo,thiagopnts/servo,dsandeephegde/servo,sadmansk/servo,ruud-v-a/servo,brendandahl/servo,avadacatavra/servo,splav/servo,huonw/servo,wpgallih/servo,dmarcos/servo,mattnenterprise/servo,emilio/servo,zhangjunlei26/servo,brendandahl/servo,bjwbell/servo,chotchki/servo,jimberlage/servo,zentner-kyle/servo,rentongzhang/servo,nrc/servo,KiChjang/servo,chotchki/servo,zhangjunlei26/servo,vks/servo,echochamber/servo,tempbottle/servo,codemac/servo,s142857/servo,mattnenterprise/servo,GreenRecycleBin/servo,mattnenterprise/servo,tschneidereit/servo,echochamber/servo,avadacatavra/servo,szeged/servo,mt2d2/servo,SimonSapin/servo,DominoTree/servo,mdibaiee/servo,SimonSapin/servo,ConnorGBrewster/servo,nerith/servo,j3parker/servo,thiagopnts/servo,Adenilson/prototype-viewing-distance,aweinstock314/servo,jimberlage/servo,emilio/servo,peterjoel/servo,mbrubeck/servo,dati91/servo,sadmansk/servo,kindersung/servo,ConnorGBrewster/servo,evilpie/servo,nnethercote/servo,paulrouget/servo,wartman4404/servo,mdibaiee/servo,A-deLuna/servo,kindersung/servo,wartman4404/servo,jgraham/servo,thiagopnts/servo,bjwbell/servo,caldwell/servo,aweinstock314/servo,codemac/servo,upsuper/servo,canaltinova/servo,tschneidereit/servo,brendandahl/servo,aidanhs/servo,karlito40/servo,karlito40/servo,luniv/servo,pgonda/servo,aidanhs/servo,rixrix/servo,nerith/servo,hyowon/servo,GreenRecycleBin/servo,brendandahl/servo,jdramani/servo,jgraham/servo,eddyb/servo,thiagopnts/servo,caldwell/servo,indykish/servo,j3parker/servo,aweinstock314/servo,mbrubeck/servo,nerith/servo,dsandeephegde/servo,emilio/servo,kindersung/servo,nerith/servo,larsbergstrom/servo,peterjoel/servo,Adenilson/prototype-viewing-distance,CJ8664/servo,mattnenterprise/servo,nick-thompson/servo,j3parker/servo,samfoo/servo,tempbottle/servo,splav/servo,zentner-kyle/servo,SimonSapin/servo,ruud-v-a/servo,akosel/servo,wpgallih/servo,wartman4404/servo,DominoTree/servo,brendandahl/servo,thiagopnts/servo,vks/servo,dmarcos/servo,dagnir/servo,kindersung/servo,eddyb/servo,peterjoel/servo,KiChjang/servo,echochamber/servo,j3parker/servo,s142857/servo,emilio/servo,s142857/servo,nerith/servo,pyfisch/servo,GyrosOfWar/servo,pyfisch/servo,saneyuki/servo,saratang/servo,mdibaiee/servo,jgraham/servo,SimonSapin/servo,srbhklkrn/SERVOENGINE,dvberkel/servo,tafia/servo,nrc/servo,dsandeephegde/servo,nnethercote/servo,ConnorGBrewster/servo,dati91/servo,GyrosOfWar/servo,g-k/servo,peterjoel/servo,jimberlage/servo,rnestler/servo,canaltinova/servo,vks/servo,rnestler/servo,dvberkel/servo,wartman4404/servo,notriddle/servo,huonw/servo,steveklabnik/servo,sadmansk/servo,jlegendary/servo,zhangjunlei26/servo,fiji-flo/servo,ryancanhelpyou/servo,s142857/servo,ruud-v-a/servo,aidanhs/servo,pyfisch/servo,luniv/servo,nick-thompson/servo,indykish/servo,ruud-v-a/servo,akosel/servo,akosel/servo,A-deLuna/servo,notriddle/servo,srbhklkrn/SERVOENGINE,boghison/servo,anthgur/servo,DominoTree/servo,canaltinova/servo,zhangjunlei26/servo,RenaudParis/servo,mdibaiee/servo,echochamber/servo,splav/servo,codemac/servo,wpgallih/servo,jimberlage/servo,anthgur/servo,huonw/servo,dsandeephegde/servo,DominoTree/servo,j3parker/servo,mattnenterprise/servo,mt2d2/servo,mbrubeck/servo,walac/servo,peterjoel/servo,evilpie/servo,snf/servo,rnestler/servo,walac/servo,snf/servo,larsbergstrom/servo,meh/servo,s142857/servo,jimberlage/servo,sadmansk/servo,emilio/servo,aweinstock314/servo,boghison/servo,dhananjay92/servo,larsbergstrom/servo,upsuper/servo,anthgur/servo,tschneidereit/servo,mdibaiee/servo,cbrewster/servo,nerith/servo,youprofit/servo,GyrosOfWar/servo,paulrouget/servo,avadacatavra/servo,bjwbell/servo,akosel/servo,runarberg/servo,KiChjang/servo,szeged/servo,hyowon/servo,nick-thompson/servo,youprofit/servo,saneyuki/servo,mbrubeck/servo,RenaudParis/servo,mt2d2/servo,youprofit/servo,GreenRecycleBin/servo,hyowon/servo,evilpie/servo,upsuper/servo,sadmansk/servo,mbrubeck/servo,notriddle/servo,WriterOfAlicrow/servo,emilio/servo,paulrouget/servo,avadacatavra/servo,thiagopnts/servo,jlegendary/servo,splav/servo,zentner-kyle/servo,pyfisch/servo,A-deLuna/servo,pgonda/servo,g-k/servo,RenaudParis/servo,bjwbell/servo,emilio/servo,wartman4404/servo,ConnorGBrewster/servo,fiji-flo/servo,paulrouget/servo,sadmansk/servo,paulrouget/servo,runarberg/servo,GyrosOfWar/servo,mdibaiee/servo,paulrouget/servo,jlegendary/servo,emilio/servo,evilpie/servo,splav/servo,fiji-flo/servo,mt2d2/servo,pyecs/servo,meh/servo,ryancanhelpyou/servo,upsuper/servo,ryancanhelpyou/servo,steveklabnik/servo,peterjoel/servo