Update web-platform-tests to revision 78f764c05c229883e87ad135c7153051a66e2851

This commit is contained in:
WPT Sync Bot 2019-03-06 20:32:15 -05:00
parent 55347aa39f
commit bf84a079f9
1983 changed files with 58006 additions and 31437 deletions

View file

@ -21,7 +21,7 @@ img {
#image-container {
position: absolute;
top: 400%;
top: 10000px;
}
</style>
<body>
@ -58,4 +58,4 @@ img {
await img_auto.load_complete;
}, "Sanity-check: Verify that all images load after they are scrolled into view.");
</script>
</body>
</body>

View file

@ -16,7 +16,7 @@ iframe {
.spacer {
width: 100%;
height: 300%;
height: 10000px;
}
</style>
<div class="spacer"></div>

View file

@ -20,13 +20,13 @@ img {
#image-container {
position: absolute;
top: 400%;
top: 10000px;
}
</style>
<body>
<p>Image inserted further below.</p>
<div id="image-container">
<img id="off" lazyload="off" src="http://{{hosts[alt][www1]}}:{{ports[http][0]}}/feature-policy/experimental-features/resources/lazyload.png"></img>
<img id="off" load="eager" src="http://{{hosts[alt][www1]}}:{{ports[http][0]}}/feature-policy/experimental-features/resources/lazyload.png"></img>
</div>
<script>
var img = document.querySelector("img");
@ -40,6 +40,6 @@ img {
promise_test( async(t) => {
await window.load_complete;
assert_true(img.did_load, "Image should have loaded.");
}, "When feature is enabled, lazyload=OFF works as expected.");
}, "When feature is enabled, load=eager works as expected.");
</script>
</body>
</body>

View file

@ -16,7 +16,7 @@ iframe {
.spacer {
width: 100%;
height: 300%;
height: 10000px;
}
</style>
<div class="spacer"></div>
@ -31,12 +31,12 @@ iframe {
window.scrollTo(0, 0);
// Sanity-check: Make sure lazyload='on' works as intended.
// Sanity-check: Make sure load='lazy' works as intended.
promise_test(async(t) => {
// Add a frame with lazyload="on".
// Add a frame with load="lazy".
let frame_on = createIframe(document.body, {
id: "ON",
lazyload: "on",
load: "lazy",
src: `${cross_origin_url}?id=ON`
});
// Sanity-check: The frame is not visible.
@ -48,17 +48,17 @@ iframe {
await waitForMessageOrTimeout(t, "ON", load_timeout);
assert_equals(msg_or_timeout_attr_on,
expected_timeout_msg,
"With lazyload='on', the frame should not load.");
"With load='lazy', the frame should not load.");
}, "Sanity-check: Contents do not load immediately (no eager-loading) " +
"when the lazyload attribute is 'on' and frame is in viewport.");
"when the load attribute is 'lazy' and frame is in viewport.");
// When feature is enabled, a frame can turn off lazy loading by setting the
// attribute to 'off'.
promise_test(async(t) => {
// Add a frame with lazyload="off".
// Add a frame with load="eager".
let frame_off = createIframe(document.body, {
id: "OFF",
lazyload: "off",
load: "eager",
src: `${cross_origin_url}?id=OFF`
});
// Sanity-check: The frame is not visible.
@ -71,7 +71,7 @@ iframe {
assert_equals(msg_or_timeout_attr_off,
expected_load_msg,
"With lazyload='off', the frame should load.");
"With load='eager', the frame should load.");
}, "When 'lazyload' feature is enabled, a frame can avoid lazyloading by " +
"setting 'lazyload' attribute to 'off'");
"setting 'load' attribute to 'eager'");
</script>

View file

@ -19,7 +19,7 @@ img {
#image-container {
position: absolute;
top: 400%;
top: 10000px;
}
</style>
<body>
@ -45,4 +45,4 @@ img {
}, "Verify 'lazyload' attribute state 'on' works as expected: image loads only when in " +
"viewport.");
</script>
</body>
</body>