Refactor test-amp-ad-custom.js to not mutate global DOM (#23519)
Refactor test-amp-ad-custom.js to not mutate global DOM (#23519)


mhc-gh/amphtml,tlong2/amphtml,ampproject/amphtml,honeybadgerdontcare/amphtml,voyagegroup/amphtml,nexxtv/amphtml,rsimha-amp/amphtml,Gregable/amphtml,alanorozco/amphtml,prateekbh/amphtml,prateekbh/amphtml,danielrozenberg/amphtml,prateekbh/amphtml,zhangsu/amphtml,taboola/amphtml,honeybadgerdontcare/amphtml,rsimha-amp/amphtml,taboola/amphtml,zhangsu/amphtml,src-code/amphtml,voyagegroup/amphtml,jmadler/amphtml,jmadler/amphtml,rsimha-amp/amphtml,jridgewell/amphtml,jpettitt/amphtml,Gregable/amphtml,voyagegroup/amphtml,adup-tech/amphtml,smartadserver/amphtml,zhouyx/amphtml,Gregable/amphtml,alanorozco/amphtml,cory-work/amphtml,erwinmombay/amphtml,erwinmombay/amphtml,mhc-gh/amphtml,Gregable/amphtml,smartadserver/amphtml,jridgewell/amphtml,taboola/amphtml,jpettitt/amphtml,taboola/amphtml,zhouyx/amphtml,danielrozenberg/amphtml,danielrozenberg/amphtml,adup-tech/amphtml,alanorozco/amphtml,ampproject/amphtml,honeybadgerdontcare/amphtml,tlong2/amphtml,jpettitt/amphtml,lannka/amphtml,yandex-pcode/amphtml,cory-work/amphtml,cory-work/amphtml,lannka/amphtml,lannka/amphtml,smartadserver/amphtml,tlong2/amphtml,danielrozenberg/amphtml,adup-tech/amphtml,taboola/amphtml,voyagegroup/amphtml,zhouyx/amphtml,cory-work/amphtml,alanorozco/amphtml,erwinmombay/amphtml,src-code/amphtml,mhc-gh/amphtml,voyagegroup/amphtml,media-net/amphtml,honeybadgerdontcare/amphtml,adup-tech/amphtml,honeybadgerdontcare/amphtml,media-net/amphtml,taboola/amphtml,jmadler/amphtml,Gregable/amphtml,ampproject/amphtml,dotandads/amphtml,yandex-pcode/amphtml,smartadserver/amphtml,jpettitt/amphtml,media-net/amphtml,zhangsu/amphtml,erwinmombay/amphtml,taboola/amphtml,jridgewell/amphtml,tlong2/amphtml,media-net/amphtml,zhouyx/amphtml,danielrozenberg/amphtml,lannka/amphtml,voyagegroup/amphtml,adup-tech/amphtml,prateekbh/amphtml,dotandads/amphtml,lannka/amphtml,jmadler/amphtml,zhouyx/amphtml,dotandads/amphtml,src-code/amphtml,jpettitt/amphtml,zhouyx/amphtml,prateekbh/amphtml,alanorozco/amphtml,yandex-pcode/amphtml,rsimha-amp/amphtml,voyagegroup/amphtml,yandex-pcode/amphtml,jridgewell/amphtml,lannka/amphtml,nexxtv/amphtml,ampproject/amphtml,Gregable/amphtml,mhc-gh/amphtml,mhc-gh/amphtml,jpettitt/amphtml,cory-work/amphtml,sharethrough/amphtml,sharethrough/amphtml,ampproject/amphtml,nexxtv/amphtml,tlong2/amphtml,sharethrough/amphtml,sharethrough/amphtml,dotandads/amphtml,ampproject/amphtml,jmadler/amphtml,prateekbh/amphtml,ampproject/amphtml,dotandads/amphtml,lannka/amphtml,sharethrough/amphtml,ampproject/amphtml,media-net/amphtml,yandex-pcode/amphtml,nexxtv/amphtml,mhc-gh/amphtml,rsimha-amp/amphtml,erwinmombay/amphtml,honeybadgerdontcare/amphtml,sharethrough/amphtml,jmadler/amphtml,yandex-pcode/amphtml,alanorozco/amphtml,alanorozco/amphtml,nexxtv/amphtml,jpettitt/amphtml,media-net/amphtml,zhangsu/amphtml,dotandads/amphtml,jridgewell/amphtml,Gregable/amphtml,media-net/amphtml,zhangsu/amphtml,mhc-gh/amphtml,src-code/amphtml,cory-work/amphtml,smartadserver/amphtml,src-code/amphtml,alanorozco/amphtml,yandex-pcode/amphtml,Gregable/amphtml,tlong2/amphtml,jridgewell/amphtml,honeybadgerdontcare/amphtml,zhouyx/amphtml,danielrozenberg/amphtml,mhc-gh/amphtml,danielrozenberg/amphtml,nexxtv/amphtml,adup-tech/amphtml,prateekbh/amphtml,cory-work/amphtml,nexxtv/amphtml,rsimha-amp/amphtml,media-net/amphtml,jpettitt/amphtml,zhangsu/amphtml,smartadserver/amphtml,erwinmombay/amphtml,danielrozenberg/amphtml,jridgewell/amphtml,rsimha-amp/amphtml,src-code/amphtml