Fixed a bug and a race condition in SpeechInputBrowserTest::TestCancelAll which caused random hangs (test waiting for a navigation event which never occurred) or failures (test exiting too early without effectively starting the speech recognition).
Fixed a bug and a race condition in SpeechInputBrowserTest::TestCancelAll which caused random hangs (test waiting for a navigation event which never occurred) or failures (test exiting too early without effectively starting the speech recognition).

Landed earlier (http://codereview.chromium.org/9315031/) and rollbacked due to the missing race condition fix. Re-enabling now with the fix

BUG=71227
TEST=./out/Release/browser_tests --lib=browser_tests --gtest_print_time


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

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

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