Report when XHR are issued before viewer is visible (#9350)
Report when XHR are issued before viewer is visible (#9350)

* Report when XHR are issued before viewer is visible

* Lint

* Review comments

* Do not log same-origin requests

* Fix tests

* Lint

* Fix tests

* Undo location.origin changes

* Do not log in test mode

jmadler/amphtml,techhtml/amphtml,lannka/amphtml,kamtschatka/amphtml,alanorozco/amphtml,jridgewell/amphtml,Gregable/amphtml,rajkumarsrk/amphtml,wjfang/amphtml,zhucl/amphtml,dotandads/amphtml,keithwrightbos/amphtml,laterpay/amphtml,tlong2/amphtml,tlong2/amphtml,sebastianbenz/amphtml,vmarteev/amphtml,wjfang/amphtml,ampproject/amphtml,avimehta/amphtml,nexxtv/amphtml,vmarteev/amphtml,taboola/amphtml,erwinmombay/amphtml,jridgewell/amphtml,ADITION/amphtml,clawr/amphtml,jridgewell/amphtml,zhangsu/amphtml,cory-work/amphtml,kixer-com/amphtml,zhucl/amphtml,mhc-gh/amphtml,lannka/amphtml,jmadler/amphtml,yandex-pcode/amphtml,prateekbh/amphtml,media-net/amphtml,cvializ/amphtml,ADITION/amphtml,zhouyx/amphtml,zhucl/amphtml,keithwrightbos/amphtml,rsimha-amp/amphtml,tlong2/amphtml,voyagegroup/amphtml,lannka/amphtml,zhangsu/amphtml,kamtschatka/amphtml,pedjoni8/amphtml,camelburrito/amphtml,Gregable/amphtml,widespace-os/amphtml,cory-work/amphtml,bpaduch/amphtml,BenDz/amphtml,yandex-pcode/amphtml,adup-tech/amphtml,zhouyx/amphtml,jpettitt/amphtml,taboola/amphtml,smartadserver/amphtml,Gregable/amphtml,kixer-com/amphtml,Gregable/amphtml,cory-work/amphtml,prateekbh/amphtml,comScore/amphtml,engtat/amphtml,lannka/amphtml,pedjoni8/amphtml,src-code/amphtml,vmarteev/amphtml,clawr/amphtml,yieldbot/amphtml,comScore/amphtml,kmh287/amphtml,engtat/amphtml,donttrustthisbot/amphtml,yieldmo/amphtml,rsimha-amp/amphtml,adiant/amphtml,media-net/amphtml,media-net/amphtml,dotandads/amphtml,rajkumarsrk/amphtml,luciancrasovan/amphtml,jridgewell/amphtml,ampproject/amphtml,yandex-pcode/amphtml,koshka/amphtml,donttrustthisbot/amphtml,tlong2/amphtml,rajkumarsrk/amphtml,koshka/amphtml,zhucl/amphtml,sriramkrish85/amphtml,gumgum/amphtml,yieldmo/amphtml,adup-tech/amphtml,camelburrito/amphtml,kixer-com/amphtml,wjfang/amphtml,techhtml/amphtml,yandex-pcode/amphtml,cory-work/amphtml,techhtml/amphtml,ampproject/amphtml,sebastianbenz/amphtml,pedjoni8/amphtml,yieldmo/amphtml,shawnbuso/amphtml,dotandads/amphtml,Gregable/amphtml,adiant/amphtml,arealit/amphtml,luciancrasovan/amphtml,mhc-gh/amphtml,voyagegroup/amphtml,honeybadgerdontcare/amphtml,yieldbot/amphtml,adiant/amphtml,src-code/amphtml,cvializ/amphtml,alanorozco/amphtml,lannka/amphtml,sriramkrish85/amphtml,bpaduch/amphtml,prateekbh/amphtml,shawnbuso/amphtml,clawr/amphtml,BenDz/amphtml,widespace-os/amphtml,laterpay/amphtml,alanorozco/amphtml,jpettitt/amphtml,prateekbh/amphtml,koshka/amphtml,keithwrightbos/amphtml,chaveznvg/amphtml,zhouyx/amphtml,nexxtv/amphtml,adiant/amphtml,dotandads/amphtml,nexxtv/amphtml,kmh287/amphtml,engtat/amphtml,pedjoni8/amphtml,rsimha-amp/amphtml,shawnbuso/amphtml,comScore/amphtml,donttrustthisbot/amphtml,chaveznvg/amphtml,clawr/amphtml,Gregable/amphtml,rsimha-amp/amphtml,lannka/amphtml,adup-tech/amphtml,nexxtv/amphtml,comScore/amphtml,powdercloud/amphtml,avimehta/amphtml,zhouyx/amphtml,src-code/amphtml,erwinmombay/amphtml,camelburrito/amphtml,avimehta/amphtml,ADITION/amphtml,sriramkrish85/amphtml,ampproject/amphtml,jmadler/amphtml,danielrozenberg/amphtml,honeybadgerdontcare/amphtml,arealit/amphtml,aghassemi/amphtml,rsimha-amp/amphtml,aghassemi/amphtml,honeybadgerdontcare/amphtml,camelburrito/amphtml,kamtschatka/amphtml,jridgewell/amphtml,zhangsu/amphtml,prateekbh/amphtml,ADITION/amphtml,aghassemi/amphtml,mhc-gh/amphtml,smartadserver/amphtml,alanorozco/amphtml,shawnbuso/amphtml,adup-tech/amphtml,erwinmombay/amphtml,engtat/amphtml,engtat/amphtml,sklobovskaya/amphtml,donttrustthisbot/amphtml,techhtml/amphtml,zhouyx/amphtml,sklobovskaya/amphtml,tlong2/amphtml,widespace-os/amphtml,kamtschatka/amphtml,zhangsu/amphtml,camelburrito/amphtml,nexxtv/amphtml,honeybadgerdontcare/amphtml,nexxtv/amphtml,jpettitt/amphtml,widespace-os/amphtml,sharethrough/amphtml,erwinmombay/amphtml,taboola/amphtml,taboola/amphtml,powdercloud/amphtml,yieldbot/amphtml,camelburrito/amphtml,ADITION/amphtml,danielrozenberg/amphtml,media-net/amphtml,clawr/amphtml,luciancrasovan/amphtml,kixer-com/amphtml,gumgum/amphtml,koshka/amphtml,sebastianbenz/amphtml,adup-tech/amphtml,sklobovskaya/amphtml,taboola/amphtml,chaveznvg/amphtml,jridgewell/amphtml,lannka/amphtml,nexxtv/amphtml,BenDz/amphtml,smartadserver/amphtml,media-net/amphtml,wjfang/amphtml,gumgum/amphtml,keithwrightbos/amphtml,zhangsu/amphtml,ampproject/amphtml,ampproject/amphtml,bpaduch/amphtml,jpettitt/amphtml,dotandads/amphtml,avimehta/amphtml,src-code/amphtml,danielrozenberg/amphtml,rajkumarsrk/amphtml,taboola/amphtml,yieldbot/amphtml,chaveznvg/amphtml,voyagegroup/amphtml,aghassemi/amphtml,powdercloud/amphtml,powdercloud/amphtml,sriramkrish85/amphtml,zhucl/amphtml,yieldmo/amphtml,honeybadgerdontcare/amphtml,laterpay/amphtml,widespace-os/amphtml,wjfang/amphtml,donttrustthisbot/amphtml,media-net/amphtml,alanorozco/amphtml,yandex-pcode/amphtml,pedjoni8/amphtml,comScore/amphtml,powdercloud/amphtml,jmadler/amphtml,dotandads/amphtml,luciancrasovan/amphtml,powdercloud/amphtml,prateekbh/amphtml,koshka/amphtml,danielrozenberg/amphtml,danielrozenberg/amphtml,zhucl/amphtml,rajkumarsrk/amphtml,sklobovskaya/amphtml,aghassemi/amphtml,adiant/amphtml,cvializ/amphtml,sharethrough/amphtml,sebastianbenz/amphtml,prateekbh/amphtml,arealit/amphtml,vmarteev/amphtml,keithwrightbos/amphtml,zhouyx/amphtml,sklobovskaya/amphtml,laterpay/amphtml,alanorozco/amphtml,Gregable/amphtml,zhucl/amphtml,yieldmo/amphtml,clawr/amphtml,keithwrightbos/amphtml,arealit/amphtml,alanorozco/amphtml,erwinmombay/amphtml,kamtschatka/amphtml,arealit/amphtml,cvializ/amphtml,vmarteev/amphtml,vmarteev/amphtml,jmadler/amphtml,mhc-gh/amphtml,jridgewell/amphtml,jpettitt/amphtml,vmarteev/amphtml,arealit/amphtml,jpettitt/amphtml,sharethrough/amphtml,mhc-gh/amphtml,kixer-com/amphtml,camelburrito/amphtml,danielrozenberg/amphtml,sebastianbenz/amphtml,smartadserver/amphtml,sriramkrish85/amphtml,mhc-gh/amphtml,danielrozenberg/amphtml,media-net/amphtml,gumgum/amphtml,comScore/amphtml,cory-work/amphtml,yieldmo/amphtml,alanorozco/amphtml,donttrustthisbot/amphtml,sklobovskaya/amphtml,adup-tech/amphtml,adiant/amphtml,wjfang/amphtml,bpaduch/amphtml,erwinmombay/amphtml,chaveznvg/amphtml,mhc-gh/amphtml,sharethrough/amphtml,clawr/amphtml,yandex-pcode/amphtml,comScore/amphtml,arealit/amphtml,keithwrightbos/amphtml,kixer-com/amphtml,sebastianbenz/amphtml,BenDz/amphtml,BenDz/amphtml,zhangsu/amphtml,sharethrough/amphtml,bpaduch/amphtml,Gregable/amphtml,bpaduch/amphtml,zhouyx/amphtml,luciancrasovan/amphtml,koshka/amphtml,voyagegroup/amphtml,luciancrasovan/amphtml,aghassemi/amphtml,gumgum/amphtml,sklobovskaya/amphtml,pedjoni8/amphtml,shawnbuso/amphtml,rajkumarsrk/amphtml,kamtschatka/amphtml,kmh287/amphtml,shawnbuso/amphtml,kixer-com/amphtml,tlong2/amphtml,yieldbot/amphtml,mhc-gh/amphtml,chaveznvg/amphtml,avimehta/amphtml,taboola/amphtml,jmadler/amphtml,yieldbot/amphtml,laterpay/amphtml,voyagegroup/amphtml,smartadserver/amphtml,voyagegroup/amphtml,cvializ/amphtml,widespace-os/amphtml,rajkumarsrk/amphtml,gumgum/amphtml,laterpay/amphtml,jpettitt/amphtml,kmh287/amphtml,powdercloud/amphtml,shawnbuso/amphtml,kmh287/amphtml,gumgum/amphtml,bpaduch/amphtml,yandex-pcode/amphtml,rsimha-amp/amphtml,luciancrasovan/amphtml,engtat/amphtml,danielrozenberg/amphtml,BenDz/amphtml,rsimha-amp/amphtml,adiant/amphtml,src-code/amphtml,avimehta/amphtml,jpettitt/amphtml,voyagegroup/amphtml,sharethrough/amphtml,src-code/amphtml,engtat/amphtml,honeybadgerdontcare/amphtml,sriramkrish85/amphtml,yieldmo/amphtml,techhtml/amphtml,honeybadgerdontcare/amphtml,media-net/amphtml,ampproject/amphtml,cory-work/amphtml,techhtml/amphtml,cvializ/amphtml,ampproject/amphtml,donttrustthisbot/amphtml,smartadserver/amphtml,kmh287/amphtml,wjfang/amphtml,cory-work/amphtml