Add option for url_fetch_test to wait for a JS expression
Add option for url_fetch_test to wait for a JS expression

This option extends url_fetch_test to support waiting for a JavaScript
expression to evaluate to true. This is used in the Chrome OS
desktopui_GmailLatency test. The browser goes to the test URL and then runs
the test to completion.

BUG=chromium-os:10869
TEST=test on my workstation on Ubuntu, x86-mario, qemu using a web page which
sets a JS value after a period.

Original Review URL: http://codereview.chromium.org/6249003/

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Anton Sargent <asargent@chromium.org>
Reviewed-by: William Chan <willchan@chromium.org>
Reviewed-by: Thiago Farina <tfarina@chromium.org>

Review URL: http://codereview.chromium.org/6288003

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@71408 0039d316-1c4b-4281-b951-d872f2087c98

TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,ltilve/chromium,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,nacl-webkit/chrome_deps,ondra-novak/chromium.src,Just-D/chromium-1,hujiajie/pa-chromium,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,patrickm/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,dednal/chromium.src,patrickm/chromium.src,axinging/chromium-crosswalk,ChromiumWebApps/chromium,jaruba/chromium.src,timopulkkinen/BubbleFish,robclark/chromium,junmin-zhu/chromium-rivertrail,dednal/chromium.src,dednal/chromium.src,jaruba/chromium.src,dushu1203/chromium.src,rogerwang/chromium,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,Chilledheart/chromium,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,keishi/chromium,ChromiumWebApps/chromium,anirudhSK/chromium,Jonekee/chromium.src,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,hujiajie/pa-chromium,robclark/chromium,Pluto-tv/chromium-crosswalk,robclark/chromium,markYoungH/chromium.src,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,ltilve/chromium,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,ChromiumWebApps/chromium,rogerwang/chromium,ltilve/chromium,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,dushu1203/chromium.src,patrickm/chromium.src,patrickm/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,axinging/chromium-crosswalk,Chilledheart/chromium,fujunwei/chromium-crosswalk,M4sse/chromium.src,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,zcbenz/cefode-chromium,ondra-novak/chromium.src,ltilve/chromium,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,jaruba/chromium.src,keishi/chromium,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,chuan9/chromium-crosswalk,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,zcbenz/cefode-chromium,dednal/chromium.src,axinging/chromium-crosswalk,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,hujiajie/pa-chromium,anirudhSK/chromium,rogerwang/chromium,ltilve/chromium,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,mogoweb/chromium-crosswalk,dednal/chromium.src,fujunwei/chromium-crosswalk,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,keishi/chromium,markYoungH/chromium.src,jaruba/chromium.src,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,markYoungH/chromium.src,keishi/chromium,rogerwang/chromium,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,chuan9/chromium-crosswalk,dushu1203/chromium.src,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,keishi/chromium,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,dushu1203/chromium.src,ChromiumWebApps/chromium,littlstar/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,rogerwang/chromium,krieger-od/nwjs_chromium.src,littlstar/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,rogerwang/chromium,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,dednal/chromium.src,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,hujiajie/pa-chromium,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,axinging/chromium-crosswalk,Chilledheart/chromium,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,ondra-novak/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,dednal/chromium.src,ChromiumWebApps/chromium,zcbenz/cefode-chromium,Just-D/chromium-1,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,Chilledheart/chromium,M4sse/chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Chilledheart/chromium,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,robclark/chromium,nacl-webkit/chrome_deps,rogerwang/chromium,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,robclark/chromium,markYoungH/chromium.src,robclark/chromium,ondra-novak/chromium.src,axinging/chromium-crosswalk,axinging/chromium-crosswalk,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,robclark/chromium,Pluto-tv/chromium-crosswalk,ltilve/chromium,jaruba/chromium.src,anirudhSK/chromium,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,chuan9/chromium-crosswalk,robclark/chromium,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,rogerwang/chromium,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,anirudhSK/chromium,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,rogerwang/chromium,littlstar/chromium.src,Chilledheart/chromium,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,keishi/chromium,Jonekee/chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,M4sse/chromium.src,Jonekee/chromium.src,mogoweb/chromium-crosswalk,anirudhSK/chromium,bright-sparks/chromium-spacewalk,robclark/chromium,chuan9/chromium-crosswalk,patrickm/chromium.src,dednal/chromium.src,junmin-zhu/chromium-rivertrail,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,keishi/chromium,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,dushu1203/chromium.src,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,keishi/chromium,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,littlstar/chromium.src,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk,dednal/chromium.src,patrickm/chromium.src,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,keishi/chromium,ltilve/chromium,dednal/chromium.src,markYoungH/chromium.src,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,rogerwang/chromium,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,Just-D/chromium-1,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,anirudhSK/chromium,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,Just-D/chromium-1,anirudhSK/chromium,jaruba/chromium.src,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,ondra-novak/chromium.src,M4sse/chromium.src,robclark/chromium,junmin-zhu/chromium-rivertrail,Chilledheart/chromium,ltilve/chromium,Chilledheart/chromium,patrickm/chromium.src,chuan9/chromium-crosswalk,M4sse/chromium.src,M4sse/chromium.src,anirudhSK/chromium,keishi/chromium,ChromiumWebApps/chromium,hujiajie/pa-chromium