-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Identifier: 272448.852@safari-7618-branch
- Loading branch information
Dan Robson
committed
Apr 2, 2024
1 parent
57a4cf5
commit 7def06c
Showing
11 changed files
with
191 additions
and
1 deletion.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
LayoutTests/accessibility/iframe-tree-update-with-dirty-layout-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,45 @@ | ||
This test ensures we don't make incorrect updates to the accessibility tree when an iframe has dirty layout. | ||
|
||
Dumping initial AX tree search traversal. | ||
|
||
{AXRole: AXScrollArea} | ||
|
||
{AXRole: AXWebArea} | ||
|
||
{#main AXRole: AXGroup} | ||
|
||
|
||
Dumping new AX tree search traversal. | ||
|
||
{AXRole: AXScrollArea} | ||
|
||
{AXRole: AXWebArea} | ||
|
||
{#main AXRole: AXGroup} | ||
|
||
{AXRole: AXTable} | ||
|
||
{AXRole: AXRow} | ||
|
||
{AXRole: AXCell} | ||
|
||
{AXRole: AXStaticText AXValue: Cell 1} | ||
|
||
{AXRole: AXCell} | ||
|
||
{AXRole: AXStaticText AXValue: Cell 2} | ||
|
||
{AXRole: AXRow} | ||
|
||
{AXRole: AXCell} | ||
|
||
{AXRole: AXStaticText AXValue: Cell 3} | ||
|
||
{AXRole: AXCell} | ||
|
||
{AXRole: AXStaticText AXValue: Cell 4} | ||
|
||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
58 changes: 58 additions & 0 deletions
58
LayoutTests/accessibility/iframe-tree-update-with-dirty-layout.html
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,58 @@ | ||
<!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> | ||
|
||
<iframe id="iframe" onload="runTest()" srcdoc="<main id='main'></main>"></iframe> | ||
|
||
<script> | ||
var output = "This test ensures we don't make incorrect updates to the accessibility tree when an iframe has dirty layout.\n\n"; | ||
window.jsTestIsAsync = true; | ||
|
||
function runTest() { | ||
if (!window.accessibilityController) | ||
return; | ||
|
||
// Touch the tree to ensure the AXObjectCache is created. | ||
touchAccessibilityTree(accessibilityController.rootElement); | ||
output += "Dumping initial AX tree search traversal.\n"; | ||
var webarea = accessibilityController.rootElement.childAtIndex(0); | ||
output += dumpAXSearchTraversal(webarea, { excludeRoles: ["scrollbar"] }); | ||
output += "\n\n"; | ||
|
||
var traversalOutput; | ||
setTimeout(async function() { | ||
const iframeDocument = document.getElementById("iframe").contentWindow.document; | ||
let newTable = iframeDocument.createElement("table"); | ||
newTable.innerHTML = "<tr><th>Cell 1</th><th>Cell 2</th></tr><tr><td>Cell 3</td><td>Cell 4</td></tr>"; | ||
iframeDocument.getElementById("main").appendChild(newTable); | ||
|
||
await waitFor(() => { | ||
// The placement of this forced update is intentionally within this waitFor block as placing it elsewhere | ||
// causes the timing to be different, and the bug not to be triggered. | ||
internals.forceAXObjectCacheUpdate(); | ||
return true; | ||
}); | ||
|
||
await waitFor(() => { | ||
traversalOutput = dumpAXSearchTraversal(webarea, { excludeRoles: ["scrollbar"] }); | ||
return traversalOutput.includes("Cell 1") | ||
&& traversalOutput.includes("Cell 2") | ||
&& traversalOutput.includes("Cell 3") | ||
&& traversalOutput.includes("Cell 4"); | ||
}); | ||
|
||
output += "Dumping new AX tree search traversal.\n"; | ||
output += traversalOutput; | ||
|
||
debug(output); | ||
finishJSTest(); | ||
}, 0); | ||
} | ||
</script> | ||
</body> | ||
</html> | ||
|
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
25 changes: 25 additions & 0 deletions
25
LayoutTests/platform/ios/accessibility/iframe-tree-update-with-dirty-layout-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,25 @@ | ||
This test ensures we don't make incorrect updates to the accessibility tree when an iframe has dirty layout. | ||
|
||
Dumping initial AX tree search traversal. | ||
|
||
{WebArea} | ||
|
||
{#main LandmarkMain} | ||
|
||
|
||
Dumping new AX tree search traversal. | ||
|
||
{WebArea} | ||
|
||
{StaticText AXLabel: Cell 1} | ||
|
||
{StaticText AXLabel: Cell 2} | ||
|
||
{StaticText AXLabel: Cell 3} | ||
|
||
{StaticText AXLabel: Cell 4} | ||
|
||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
41 changes: 41 additions & 0 deletions
41
LayoutTests/platform/mac-wk1/accessibility/iframe-tree-update-with-dirty-layout-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,41 @@ | ||
This test ensures we don't make incorrect updates to the accessibility tree when an iframe has dirty layout. | ||
|
||
Dumping initial AX tree search traversal. | ||
|
||
{AXRole: AXWebArea} | ||
|
||
{#main AXRole: AXGroup} | ||
|
||
|
||
Dumping new AX tree search traversal. | ||
|
||
{AXRole: AXWebArea} | ||
|
||
{#main AXRole: AXGroup} | ||
|
||
{AXRole: AXTable} | ||
|
||
{AXRole: AXRow} | ||
|
||
{AXRole: AXCell} | ||
|
||
{AXRole: AXStaticText AXValue: Cell 1} | ||
|
||
{AXRole: AXCell} | ||
|
||
{AXRole: AXStaticText AXValue: Cell 2} | ||
|
||
{AXRole: AXRow} | ||
|
||
{AXRole: AXCell} | ||
|
||
{AXRole: AXStaticText AXValue: Cell 3} | ||
|
||
{AXRole: AXCell} | ||
|
||
{AXRole: AXStaticText AXValue: Cell 4} | ||
|
||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
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