Sample for https://bugzilla.mozilla.org/show_bug.cgi?id=1407197.
- 1. Open Firefox console to see CSP warnings...
- 2. Click few times "Load new image outside iframe" - new images are loading properly without any CSP
- 3. Click "Set iframe with CSP" - now iframe have own CSP, and image inside it won`t load [good]
- 4. Click again "Load new image outside iframe" - image OUTSIDE iframe will no longer load! [firefox error]
- 5. Click "Set iframe with String" - iframe is without CSP now
- 6. Click again "Load new image outside iframe" - image OUTSIDE iframe will no load! [firefox error] and no console warnings anymore!
- 7. Click "Remove iframe" - iframe is no longer on page
- 8. Click again "Load new image outside iframe" - image on page will no load! [firefox error] and no console warnings anymore!
- 9. Click "Set new iframe with Allow images CSP" - iframe will have CSP with allow images from domain [firefox will ignore new CSP]
- 10. Click again "Load new image outside iframe" - image on page will no load! [firefox error] and no console warnings anymore!
- 11. REPEAT ALL on Chrome - it will work properly
Image: