File: test_bug1836801.html

package info (click to toggle)
firefox 141.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,550,616 kB
  • sloc: cpp: 7,426,508; javascript: 6,367,238; ansic: 3,707,354; python: 1,368,984; xml: 623,983; asm: 426,916; java: 184,324; sh: 64,488; makefile: 19,203; objc: 13,059; perl: 12,955; yacc: 4,583; cs: 3,846; pascal: 3,352; lex: 1,720; ruby: 1,071; exp: 762; php: 436; lisp: 258; awk: 247; sql: 66; sed: 54; csh: 10
file content (59 lines) | stat: -rw-r--r-- 1,846 bytes parent folder | download | duplicates (11)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html>
<head>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script src="/tests/SimpleTest/EventUtils.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>

<script>
// this is a crashtest, just getting to the end is a pass, fullscreen
// doesn't work in crashtests though not sure why -->
SimpleTest.waitForExplicitFinish();

SimpleTest.requestFlakyTimeout("crashtest sensitive to timing");

function begin() {
  SimpleTest.waitForFocus(begin2);
}

function begin2() {
  SpecialPowers.pushPrefEnv({
    "set":[["full-screen-api.allow-trusted-requests-only", false]]
  }, startTest);
}

window.addEventListener("load", begin);

const func_0 = async function(arg0) {
  //SpecialPowers.wrap(document).notifyUserGestureActivation();
  await arg0.originalTarget.requestFullscreen()
  arg0.originalTarget.ariaValueText = "a"
}

async function startTest() {
  let a = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas")
  document.documentElement.appendChild(a)
  document.addEventListener("DOMAttrModified", func_0, { })
  let b = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas")
  document.documentElement.appendChild(b)
  b.setAttribute("class", "x")
  //SpecialPowers.wrap(document).notifyUserGestureActivation();
  await b.mozRequestFullScreen()
  let c = document.createElementNS("http://www.w3.org/1999/xhtml", "slot")
  document.documentElement.appendChild(c)
  c.setAttribute("class", "x")
  b.inert = true
  setTimeout(async () => {
    b.setAttribute("title", "a")
  }, 200)
  a.ariaSort = "descending"
  setTimeout(finishup, 400);
}
async function finishup() {
  await new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)));
  await document.exitFullscreen();
  SimpleTest.finish();
}
</script>
</html>