mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 05:08:36 +02:00
Automatic update from web-platform-tests [fullscreen] wrap event listener callback in `t.step_func` (#18992) This is to avoid a harness error if `trans.requestFullscreen()` is not supported: https://wpt.fyi/results/fullscreen/rendering/fullscreen-css-transition.html?run_id=314000010&run_id=293450006&run_id=308130006&run_id=291640006 -- wpt-commits: 7b9eeb74bb91868cdb2d4c81f983dc7af6fe381f wpt-pr: 18992
27 lines
905 B
HTML
27 lines
905 B
HTML
<!DOCTYPE html>
|
|
<title>Transitions should not be stopped by going fullscreen</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/resources/testdriver.js"></script>
|
|
<script src="/resources/testdriver-vendor.js"></script>
|
|
<style>
|
|
#trans {
|
|
transition: color steps(1, end) 100s;
|
|
color: green;
|
|
}
|
|
</style>
|
|
<div id="trans">Should be green</div>
|
|
<script>
|
|
async_test(t => {
|
|
document.onfullscreenchange = t.step_func_done(() => {
|
|
assert_equals(document.fullscreenElement, trans);
|
|
assert_equals(getComputedStyle(trans).color, "rgb(0, 128, 0)", "Transition is in progress - still green");
|
|
});
|
|
trans.addEventListener('click', t.step_func(() => {
|
|
trans.style.color = "red";
|
|
trans.offsetTop;
|
|
trans.requestFullscreen();
|
|
}), {once: true});
|
|
test_driver.click(trans);
|
|
});
|
|
</script>
|