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
content / test / data / accessibility / regression / relation-points-to-invalid-nodes-crash.html [blame]
<!--
@BLINK-DENY:*
-->
<!-- We don't actually care about the output for this test.
We just want to make sure we don't crash. -->
<head id="head">
<title id="title">Test</title>
<style id="style"></style>
</head>
<body lang="@NO_DUMP" >
<script id="script"></script>
<area id="area" />
<optgroup id="optgroup"></optgroup>
<script>
const relationsToTest = [
'aria-activedescendant',
'aria-controls',
'aria-describedby',
'aria-details',
'aria-errormessage',
'aria-flowto',
'aria-labelledby',
'aria-owns',
];
// Nodes that aren't allowed to have an AXObject,
// or atleast don't satisfy the criteria to have one.
const invalidNodes = [
'head',
'title',
'style',
'script',
'area',
'optgroup'
];
for (const invalidNode of invalidNodes) {
const source = document.createElement('div');
source.setAttribute('aria-invalid', 'true');
for (const relation of relationsToTest) {
source.setAttribute(relation, invalidNode);
}
document.body.appendChild(source);
}
</script>
</body>