summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-scroll-anchoring/fullscreen-crash.html
blob: 545f2919b55ffe31f942e547d5299c00ee89d715 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html class="test-wait">
<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=823150">

<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>

<style>

#a { height: 700px; }
#b { border: 4px solid #ccc; }

</style>
<div id="a"><div id="b"></div></div>
<script>

onload = () => {
  test_driver.bless("requestFullscreen", step2);
};
step2 = () => {
  b.requestFullscreen();
  b.addEventListener('fullscreenchange', step3);
};
step3 = () => {
  document.designMode = "on";
  document.execCommand("selectAll");
  document.execCommand("formatBlock", false, "p");
  document.documentElement.classList.remove('test-wait');
};

</script>
</html>