forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from oven-sh/merge-upstream
Merge upstream
- Loading branch information
Showing
2,473 changed files
with
13,052 additions
and
65,332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
JSTests/stress/ToPropertyKeyOrNumber-AI-should-include-number.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//@ requireOptions("--jitPolicyScale=0", "--useConcurrentJIT=0") | ||
|
||
function opt() { | ||
function f(){ | ||
}((Error)[flag?0:(WebAssembly)])++ | ||
} | ||
flag=true | ||
try{opt()}catch{} | ||
flag=false | ||
try{opt()}catch{} | ||
flag=true | ||
try{opt()}catch{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
LayoutTests/accessibility/dynamic-table-caption-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
This test ensures we maintain the right accessibility text for tables after dynamic caption changes. | ||
|
||
AXTitle: Initial caption | ||
AXDescription: | ||
AXHelp: | ||
PASS: text.includes('Initial caption') === true | ||
AXTitle: Second caption | ||
AXDescription: | ||
AXHelp: | ||
PASS: text.includes('Second caption') === true | ||
AXTitle: | ||
AXDescription: | ||
AXHelp: | ||
PASS: !text.includes('caption') === true | ||
AXTitle: Final caption | ||
AXDescription: | ||
AXHelp: | ||
PASS: text.includes('Final caption') === true | ||
|
||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
Final caption | ||
Author Title | ||
Stephen Hawking A Brief History of Time | ||
Carl Sagan Cosmos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | ||
<html> | ||
<head> | ||
<script src="../resources/accessibility-helper.js"></script> | ||
<script src="../resources/js-test.js"></script> | ||
</head> | ||
<body id="body"> | ||
|
||
<table id="table"> | ||
<caption id="caption">Initial caption</caption> | ||
<thead> | ||
<tr> | ||
<th>Author</th> | ||
<th>Title</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>Stephen Hawking</td> | ||
<td>A Brief History of Time</td> | ||
</tr> | ||
<tr> | ||
<td>Carl Sagan</td> | ||
<td>Cosmos</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<script> | ||
var output = "This test ensures we maintain the right accessibility text for tables after dynamic caption changes.\n\n"; | ||
|
||
if (window.accessibilityController) { | ||
window.jsTestIsAsync = true; | ||
|
||
var table = accessibilityController.accessibleElementById("table"); | ||
var text = platformTextAlternatives(table); | ||
output += `${text}\n`; | ||
output += expect("text.includes('Initial caption')", "true"); | ||
|
||
setTimeout(async function() { | ||
// Wait for page updates caused by initial load to settle down so we don't pass the test by accident. | ||
await sleep(20); | ||
document.getElementById("caption").innerText = "Second caption"; | ||
|
||
await waitFor(() => { | ||
text = platformTextAlternatives(table); | ||
return text.includes("Second caption"); | ||
}); | ||
output += `${text}\n`; | ||
output += expect("text.includes('Second caption')", "true"); | ||
|
||
document.getElementById("body").appendChild(document.getElementById("caption")); | ||
document.getElementById("caption").innerText = "Final caption"; | ||
|
||
await waitFor(() => { | ||
text = platformTextAlternatives(table); | ||
return !text.includes("caption"); | ||
}); | ||
output += `${text}\n`; | ||
output += expect("!text.includes('caption')", "true"); | ||
|
||
let domTable = document.getElementById("table"); | ||
domTable.insertBefore(document.getElementById("caption"), domTable.firstElementChild); | ||
|
||
await waitFor(() => { | ||
text = platformTextAlternatives(table); | ||
return text.includes("Final caption"); | ||
}); | ||
output += `${text}\n`; | ||
output += expect("text.includes('Final caption')", "true"); | ||
|
||
debug(output); | ||
finishJSTest(); | ||
}, 0); | ||
} | ||
</script> | ||
</body> | ||
</html> | ||
|
7 changes: 2 additions & 5 deletions
7
LayoutTests/accessibility/mac/area-with-aria-label-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,26 @@ | ||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | ||
<html> | ||
<head> | ||
<script src="../../resources/js-test-pre.js"></script> | ||
<script src="../../resources/accessibility-helper.js"></script> | ||
<script src="../../resources/js-test.js"></script> | ||
</head> | ||
<body id="body"> | ||
<body> | ||
|
||
<map name="forwardbackward"> | ||
<area id="btn_prev" role="button" alt="" tabindex="0" aria-label="Previous" shape="rect" coords="2,35,21,47" href="#"> | ||
<area id="btn_next" role="button" alt="" tabindex="0" aria-label="Next" shape="rect" coords="56,35,75,47" href="#"> | ||
</map> | ||
<img id="fb" src="#" border="1" width="76" height="76" usemap="#forwardbackward" alt=""> | ||
|
||
<p id="description"></p> | ||
<div id="console"></div> | ||
|
||
<script> | ||
let output = "This tests that aria-label works on area elements.\n\n"; | ||
|
||
description("This tests that aria-label works on area elements."); | ||
|
||
if (window.accessibilityController) { | ||
|
||
document.getElementById("btn_prev").focus(); | ||
shouldBe("accessibilityController.focusedElement.description", "'AXDescription: Previous'"); | ||
|
||
document.getElementById("btn_next").focus(); | ||
shouldBe("accessibilityController.focusedElement.description", "'AXDescription: Next'"); | ||
} | ||
if (window.accessibilityController) { | ||
output += expect("accessibilityController.accessibleElementById('btn_prev').description", "'AXDescription: Previous'"); | ||
output += expect("accessibilityController.accessibleElementById('btn_next').description", "'AXDescription: Next'"); | ||
|
||
debug(output); | ||
} | ||
</script> | ||
|
||
<script src="../../resources/js-test-post.js"></script> | ||
</body> | ||
</html> |
92 changes: 46 additions & 46 deletions
92
LayoutTests/accessibility/mac/malformed-table-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
This tests that contents in malformed tables are accessible. | ||
|
||
PASS: table1.role === 'AXRole: AXTable' | ||
PASS: table2.role === 'AXRole: AXTable' | ||
PASS: table1ColumnCount === 2 | ||
PASS: table1RowCount === 2 | ||
PASS: table2ColumnCount === 2 | ||
PASS: table2RowCount === 2 | ||
PASS: table1.childAtIndex(0).domIdentifier === 'caption1' | ||
PASS: table2.childAtIndex(0).domIdentifier === 'caption2' | ||
|
||
Checking rows for table 1 | ||
PASS: rowA.isEqual(rowB) === true | ||
PASS: rowA.role === 'AXRole: AXRow' | ||
PASS: rowA.isEqual(rowB) === true | ||
PASS: rowA.role === 'AXRole: AXRow' | ||
|
||
Checking rows for table 2 | ||
PASS: rowA.isEqual(rowB) === true | ||
PASS: rowA.role === 'AXRole: AXRow' | ||
PASS: rowA.isEqual(rowB) === true | ||
PASS: rowA.role === 'AXRole: AXRow' | ||
|
||
Checking cells for table 1 | ||
PASS: cellA.isEqual(cellB) === true | ||
PASS: cellA.role === 'AXRole: AXCell' | ||
PASS: cellA.isEqual(cellB) === true | ||
PASS: cellA.role === 'AXRole: AXCell' | ||
PASS: cellA.isEqual(cellB) === true | ||
PASS: cellA.role === 'AXRole: AXCell' | ||
PASS: cellA.isEqual(cellB) === true | ||
PASS: cellA.role === 'AXRole: AXCell' | ||
|
||
Checking cells for table 2 | ||
PASS: cellA.isEqual(cellB) === true | ||
PASS: cellA.role === 'AXRole: AXCell' | ||
PASS: cellA.isEqual(cellB) === true | ||
PASS: cellA.role === 'AXRole: AXCell' | ||
PASS: cellA.isEqual(cellB) === true | ||
PASS: cellA.role === 'AXRole: AXCell' | ||
PASS: cellA.isEqual(cellB) === true | ||
PASS: cellA.role === 'AXRole: AXCell' | ||
|
||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
Table with CSS and ARIA | ||
Heading one Heading two | ||
a b | ||
Table with CSS and no ARIA | ||
Heading one Heading two | ||
a b | ||
This tests that contents in malformed tables are accessible. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS table1.role is 'AXRole: AXTable' | ||
PASS table2.role is 'AXRole: AXTable' | ||
PASS table1ColumnCount is 2 | ||
PASS table1RowCount is 2 | ||
PASS table2ColumnCount is 2 | ||
PASS table2RowCount is 2 | ||
|
||
Check rows for Table1 | ||
PASS rowa.isEqual(rowb) is true | ||
PASS rowa.role is 'AXRole: AXRow' | ||
PASS rowa.isEqual(rowb) is true | ||
PASS rowa.role is 'AXRole: AXRow' | ||
|
||
Check rows for Table2 | ||
PASS rowa.isEqual(rowb) is true | ||
PASS rowa.role is 'AXRole: AXRow' | ||
PASS rowa.isEqual(rowb) is true | ||
PASS rowa.role is 'AXRole: AXRow' | ||
|
||
Check cells for Table1 | ||
PASS cella.isEqual(cellb) is true | ||
PASS cella.role is 'AXRole: AXCell' | ||
PASS cella.isEqual(cellb) is true | ||
PASS cella.role is 'AXRole: AXCell' | ||
PASS cella.isEqual(cellb) is true | ||
PASS cella.role is 'AXRole: AXCell' | ||
PASS cella.isEqual(cellb) is true | ||
PASS cella.role is 'AXRole: AXCell' | ||
|
||
Check cells for Table2 | ||
PASS cella.isEqual(cellb) is true | ||
PASS cella.role is 'AXRole: AXCell' | ||
PASS cella.isEqual(cellb) is true | ||
PASS cella.role is 'AXRole: AXCell' | ||
PASS cella.isEqual(cellb) is true | ||
PASS cella.role is 'AXRole: AXCell' | ||
PASS cella.isEqual(cellb) is true | ||
PASS cella.role is 'AXRole: AXCell' | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
Oops, something went wrong.