Fix Instant test flakiness.
Fix Instant test flakiness.

See the bug link for details. Though the root cause (GdkEventConfigure
events closing the popup and causing Instant to Hide()) hasn't been
fixed, it seems that calling FocusOmniboxAndWaitForInstant() and
BringBrowserWindowToFront() fixes both the timeouts as well as the
CHECK(event->button.window) failures, as measured empirically. This is
probably due to both those calls spinning the message loop. I've run
this CL on the linux_chromeos and linux_rel bots a hundred times, and on
the win and win_rel bots about 40 times, with just 1 flake over the
hundreds of runs.

Other changes:

+ Notify Instant when the omnibox already has focus; otherwise we wait
  forever for a page load that never happens.

+ Use WindowedNotificationObserver more robustly. Previously, I had
  reasoned that we couldn't miss notifications, since they result from
  receiving renderer messages, which only happens after we return to the
  MessageLoop. But, there are nested MessageLoop::Run() calls hidden all
  over the place, so it's safer to wrap the observation window properly.

+ MAYBE-ify tests so they still compile, though they are disabled.
+ Split DoesNotCommitURLs into separate tests.
+ Check Task Manager prefixes more robustly.

BUG=146419,145754
R=dhollowa@chromium.org
TEST=Instant tests shouldn't flake, on any platform.

Review URL: https://codereview.chromium.org/10905216

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

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