Revert "Bug 1977690 - Remove unused AppRequestInterceptor in androidTests r=aaronmt" for causing fenix-debug failures.
This reverts commit bc9dc5f4296482e17560627acaacd2797e462211.
<!DOCTYPE html><metacharset="utf-8"><title>Test Background Video Is Tainted By drawImage</title><scriptsrc="/tests/SimpleTest/SimpleTest.js"></script><scriptsrc="manifest.js"></script><scriptsrc="background_video.js"></script><linkrel="stylesheet"href="/tests/SimpleTest/test.css"/><scripttype="text/javascript">"use strict";varmanager=newMediaTestManager;functiondrawVideoToCanvas(v){letw=v.width,h=v.height,c=document.createElement('canvas');c.width=w;c.height=h;document.body.appendChild(c);letgfx=c.getContext('2d');if(!gfx){throwError("Unable to obtain context '2d' from canvas");}gfx.drawImage(v,0,0,w,h);}startTest({desc:'Test Background Video Is Tainted By drawImage',prefs:[["media.test.video-suspend",true],["media.suspend-background-video.enabled",true],["media.suspend-background-video.delay-ms",1000]],tests:gDecodeSuspendTests,runTest:(test,token)=>{ok(true,`${test.name}`);letv=appendVideoToDoc(test.name,token);manager.started(token);waitUntilPlaying(v).then(()=>{drawVideoToCanvas(v);ok(v.hasSuspendTaint(),"Video is tainted after drawing to canvas");returncheckVideoDoesntSuspend(v);}).then(()=>{ok(true,'Video ended before decode was suspended');manager.finished(token);}).catch((e)=>{ok(false,'Test failed: '+e.toString());manager.finished(token);});}});</script>