diff --git a/test/unit/builtins/test-amp-pixel.js b/test/unit/builtins/test-amp-pixel.js index 4e718a2f1a3c..a7ee43aae008 100644 --- a/test/unit/builtins/test-amp-pixel.js +++ b/test/unit/builtins/test-amp-pixel.js @@ -141,8 +141,10 @@ describes.realWin('amp-pixel', {amp: true}, (env) => { }); }); - // TODO(#40214): fix flaky test. - it.skip('should not allow attribution reporting', () => { + it('should not allow attribution reporting with a non-supporting browser', () => { + env.sandbox + .stub(privacySandboxUtils, 'isAttributionReportingAllowed') + .returns(false); const attributionSrc = '//pubads.g.doubleclick.net/activity;dc_iu=1/abc;ord=2'; pixel.setAttribute( @@ -154,7 +156,6 @@ describes.realWin('amp-pixel', {amp: true}, (env) => { expect(img.src).to.equal( 'https://pubads.g.doubleclick.net/activity;dc_iu=1/abc;ord=1?ars=5' ); - expect(img.attributionSrc).to.be.undefined; }); });