Skip to content

Commit

Permalink
Don't use shared image sources in not-rendered-image-loading-lazy.html.
Browse files Browse the repository at this point in the history
The HTML spec looks at the "list of available images" before performing
lazy-loading. So if any test before loads these sources then the image
may actually load, against the test expectations.

Differential Revision: https://phabricator.services.mozilla.com/D117411

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1711367
gecko-commit: 5955a4790278218a0e474997640404498c7fe7c2
gecko-reviewers: smaug
  • Loading branch information
emilio authored and moz-wptsync-bot committed Jun 11, 2021
1 parent 9e12671 commit 146f12e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

<body>
<!-- These images must not attempt to load -->
<img id="display_none" style="display:none;" src="resources/image.png?2" loading="lazy"
<img id="display_none" style="display:none;" src="resources/image.png?not-rendered-image-loading-lazy-2" loading="lazy"
onload="display_none_img.resolve();" onerror="display_none_img.reject();">
<img id="attribute_hidden" hidden src="resources/image.png?3" loading="lazy"
<img id="attribute_hidden" hidden src="resources/image.png?not-rendered-image-loading-lazy-3" loading="lazy"
onload="attribute_hidden_img.resolve();" onerror="attribute_hidden_img.reject();">
<img id="js_display_none" src="resources/image.png?4" loading="lazy"
<img id="js_display_none" src="resources/image.png?not-rendered-image-loading-lazy-4" loading="lazy"
onload="js_display_none_img.resolve();" onerror="js_display_none_img.reject();">
<script>
document.getElementById("js_display_none").style = 'display:none;';
Expand Down

0 comments on commit 146f12e

Please sign in to comment.