Skip to content

Commit

Permalink
LazyLoad: Merge scroll.html into image-loading-lazy.tentative.html
Browse files Browse the repository at this point in the history
The two tests do the same thing but scroll.html checks for placeholder, so move
that functionality into image-loading-lazy.tentative.html and remove scroll.html.

Bug: 1031157
Change-Id: Id0b15fb1a2866933ecaa072a10f4fbc8655d033c
  • Loading branch information
rwlbuis authored and chromium-wpt-export-bot committed Dec 10, 2019
1 parent fa41b43 commit a211252
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions loading/lazyload/image-loading-lazy.tentative.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<link rel="help" href="https://github.com/scott-little/lazyload">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="common.js"></script>
</head>

<!--
Expand All @@ -24,12 +25,16 @@

window.addEventListener("load", t.step_func(function() {
assert_true(has_in_viewport_loaded, "The in_viewport element should have loaded before window.load().");
assert_true(document.getElementById("in_viewport").complete);
assert_false(has_window_loaded, "The window.load() event should only fire once.");
has_window_loaded = true;
document.getElementById("below_viewport").scrollIntoView();
}));

const below_viewport_img_onload = t.step_func_done(function() {
assert_true(is_image_fully_loaded(
document.getElementById("below_viewport"),
document.getElementById("in_viewport")));
assert_true(has_window_loaded, "The window.load() event should have fired before below_viewport loaded.");
});
</script>
Expand Down

0 comments on commit a211252

Please sign in to comment.