- moved the defaults/prefs handling for settings during layout tests into   functions so it's a little easier to follow. - added color sync profile mgmt during layout tests so more images will match. - added signal handlers (like webkit) to do our best to get the color profile   reset if we crash.
- moved the defaults/prefs handling for settings during layout tests into
  functions so it's a little easier to follow.
- added color sync profile mgmt during layout tests so more images will match.
- added signal handlers (like webkit) to do our best to get the color profile
  reset if we crash.

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

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

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